mirror of
https://github.com/songoda/UltimateRepairing.git
synced 2024-11-01 00:10:19 +01:00
Fixed NPE
This commit is contained in:
parent
d26ac6a16a
commit
6067d30700
@ -72,7 +72,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<AbstractCommand> getCommands() {
|
||||
|
@ -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()
|
||||
|
@ -21,6 +21,7 @@ interface.repair.itemlore = "&7Click to repair with %item%."
|
||||
|
||||
#Event Messages
|
||||
|
||||
event.general.nopermission = "&cYou do not have permission to do that."
|
||||
event.repair.timeout = "&cYour repair timed out..."
|
||||
event.repair.notdamaged = "&aThis item is not damaged."
|
||||
event.repair.needspace = "&cYou need to have free space above the anvil!"
|
||||
|
Loading…
Reference in New Issue
Block a user