1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-20 03:35:51 +00:00

Added opening messages to locale

This commit is contained in:
Daniel Walsh 2019-10-11 23:11:02 +01:00
parent 8cb37a1850
commit 6b62a45ffa
3 changed files with 5 additions and 1 deletions

View File

@ -73,6 +73,8 @@ public class SlimefunLocalization extends Localization {
setDefaultMessage("messages.cannot-place" ,"&cYou cannot place that block there!");
setDefaultMessage("messages.no-pvp" ,"&cYou cannot pvp in here!");
setDefaultMessage("messages.radiation" ,"&4You have been exposed to deadly radiation! &cGet rid of the radioactive item or equip the complete hazmat suit!");
setDefaultMessage("messages.opening-guide", "&bOpening guide...");
setDefaultMessage("messages.opening-backpack", "&bOpening backpack...");
setDefaultMessage("machines.pattern-not-found", "&eSorry, I could not recognize this Pattern. Please place the Items in the correct Pattern into the Dispenser.");
setDefaultMessage("machines.unknown-material", "&eSorry, I could not recognize the Item in my Dispenser. Please put something in that I know.");

View File

@ -255,7 +255,7 @@ public final class SlimefunGuide {
}
private static void openMainMenuAsync(final Player player, final boolean survival, final boolean book, final int selected_page) {
player.sendMessage(ChatColor.AQUA + "Opening guide...");
Slimefun.getLocal().sendMessage(player, "messages.opening-guide");
PlayerProfile.get(player, profile ->
Bukkit.getScheduler().runTask(SlimefunPlugin.instance, () -> openMainMenu(profile, survival, book, selected_page))
);

View File

@ -2,6 +2,7 @@ package me.mrCookieSlime.Slimefun.listeners;
import java.util.List;
import me.mrCookieSlime.Slimefun.Setup.SlimefunLocalization;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.Sound;
@ -116,6 +117,7 @@ public class BackpackListener implements Listener {
if (item.getAmount() == 1) {
if (Slimefun.hasUnlocked(p, sfItem, true)) {
Slimefun.getLocal().sendMessage(p, "messages.opening-backpack");
PlayerProfile.get(p, profile -> {
for (int line = 0; line < item.getItemMeta().getLore().size(); line++) {
if (item.getItemMeta().getLore().get(line).equals(ChatColor.translateAlternateColorCodes('&', "&7ID: <ID>"))) {