diff --git a/src/main/java/com/songoda/epicfurnaces/command/CommandManager.java b/src/main/java/com/songoda/epicfurnaces/command/CommandManager.java index 1e2cb90..bfeffbd 100644 --- a/src/main/java/com/songoda/epicfurnaces/command/CommandManager.java +++ b/src/main/java/com/songoda/epicfurnaces/command/CommandManager.java @@ -52,7 +52,7 @@ public class CommandManager implements CommandExecutor { } } } - plugin.getLocale().newMessage("&7The command you entered does not exist or is spelt incorrectly.").sendPrefixedMessage(commandSender); + plugin.getLocale().getMessage("&7The command you entered does not exist or is spelt incorrectly.").sendPrefixedMessage(commandSender); return true; } @@ -69,7 +69,7 @@ public class CommandManager implements CommandExecutor { } return; } - plugin.getLocale().newMessage("event.general.nopermission").sendPrefixedMessage(sender); + plugin.getLocale().getMessage("event.general.nopermission").sendPrefixedMessage(sender); } public List getCommands() { diff --git a/src/main/java/com/songoda/epicfurnaces/utils/settings/SettingsManager.java b/src/main/java/com/songoda/epicfurnaces/utils/settings/SettingsManager.java index e45e1db..8dc5140 100644 --- a/src/main/java/com/songoda/epicfurnaces/utils/settings/SettingsManager.java +++ b/src/main/java/com/songoda/epicfurnaces/utils/settings/SettingsManager.java @@ -11,6 +11,7 @@ import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.inventory.InventoryClickEvent; +import org.bukkit.event.inventory.InventoryType; import org.bukkit.event.player.AsyncPlayerChatEvent; import org.bukkit.inventory.Inventory; import org.bukkit.inventory.ItemStack; @@ -35,6 +36,7 @@ public class SettingsManager implements Listener { @EventHandler public void onInventoryClick(InventoryClickEvent event) { + if (event.getView().getType() != InventoryType.CHEST) return; ItemStack clickedItem = event.getCurrentItem(); if (event.getInventory() != event.getWhoClicked().getOpenInventory().getTopInventory()