diff --git a/src/main/java/com/songoda/epicanchors/command/CommandManager.java b/src/main/java/com/songoda/epicanchors/command/CommandManager.java index 0252397..2dba608 100644 --- a/src/main/java/com/songoda/epicanchors/command/CommandManager.java +++ b/src/main/java/com/songoda/epicanchors/command/CommandManager.java @@ -69,7 +69,7 @@ public class CommandManager implements CommandExecutor { } return; } - instance.getLocale().newMessage("event.general.nopermission").sendPrefixedMessage(sender); + instance.getLocale().getMessage("event.general.nopermission").sendPrefixedMessage(sender); } public List getCommands() { diff --git a/src/main/java/com/songoda/epicanchors/utils/settings/SettingsManager.java b/src/main/java/com/songoda/epicanchors/utils/settings/SettingsManager.java index 68a00ef..1850cf9 100644 --- a/src/main/java/com/songoda/epicanchors/utils/settings/SettingsManager.java +++ b/src/main/java/com/songoda/epicanchors/utils/settings/SettingsManager.java @@ -13,6 +13,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; @@ -37,6 +38,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()