mirror of
https://github.com/songoda/EpicHeads.git
synced 2024-11-26 04:25:16 +01:00
Fixed NPE
This commit is contained in:
parent
87d9565818
commit
1a2ce3c4b4
@ -84,7 +84,7 @@ public class CommandManager implements CommandExecutor {
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
instance.getLocale().newMessage("event.general.nopermission").sendPrefixedMessage(sender);
|
instance.getLocale().getMessage("event.general.nopermission").sendPrefixedMessage(sender);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<AbstractCommand> getCommands() {
|
public List<AbstractCommand> getCommands() {
|
||||||
|
@ -11,6 +11,7 @@ import org.bukkit.entity.Player;
|
|||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
import org.bukkit.event.inventory.InventoryClickEvent;
|
||||||
|
import org.bukkit.event.inventory.InventoryType;
|
||||||
import org.bukkit.event.player.AsyncPlayerChatEvent;
|
import org.bukkit.event.player.AsyncPlayerChatEvent;
|
||||||
import org.bukkit.inventory.Inventory;
|
import org.bukkit.inventory.Inventory;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
@ -35,6 +36,7 @@ public class SettingsManager implements Listener {
|
|||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onInventoryClick(InventoryClickEvent event) {
|
public void onInventoryClick(InventoryClickEvent event) {
|
||||||
|
if (event.getView().getType() != InventoryType.CHEST) return;
|
||||||
ItemStack clickedItem = event.getCurrentItem();
|
ItemStack clickedItem = event.getCurrentItem();
|
||||||
|
|
||||||
if (event.getInventory() != event.getWhoClicked().getOpenInventory().getTopInventory()
|
if (event.getInventory() != event.getWhoClicked().getOpenInventory().getTopInventory()
|
||||||
|
Loading…
Reference in New Issue
Block a user