mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-18 00:05:11 +01:00
Remove deprecated method usage
This commit is contained in:
parent
5ceabe2146
commit
f38d3b4545
@ -99,7 +99,7 @@ public class NewAPI {
|
||||
* @return true if the player is an npc
|
||||
*/
|
||||
public boolean isNPC(Player player) {
|
||||
return Utils.isNPC(player);
|
||||
return plugin.getPluginHooks().isNpc(player);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -451,14 +451,19 @@ public class AuthMePlayerListener implements Listener {
|
||||
|
||||
@EventHandler(ignoreCancelled = true, priority = EventPriority.LOWEST)
|
||||
public void onPlayerInventoryClick(InventoryClickEvent event) {
|
||||
if (event.getWhoClicked() == null)
|
||||
if (event.getWhoClicked() == null) {
|
||||
return;
|
||||
if (!(event.getWhoClicked() instanceof Player))
|
||||
}
|
||||
if (!(event.getWhoClicked() instanceof Player)) {
|
||||
return;
|
||||
if (Utils.checkAuth((Player) event.getWhoClicked()))
|
||||
}
|
||||
Player player = (Player) event.getWhoClicked();
|
||||
if (Utils.checkAuth(player)) {
|
||||
return;
|
||||
if (Utils.isNPC((Player) event.getWhoClicked()))
|
||||
}
|
||||
if (plugin.getPluginHooks().isNpc(player)) {
|
||||
return;
|
||||
}
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user