Move #isNpc method to PlayerUtils

- After dropping our hook to CombatTagPlus it is not relevant for it to be in PluginHooksService anymore
This commit is contained in:
ljacqu
2017-10-21 12:08:23 +02:00
parent 58657f5d3f
commit 4e8deec258
11 changed files with 49 additions and 51 deletions
@@ -39,4 +39,15 @@ public final class PlayerUtils {
public static String getPlayerIp(Player p) {
return p.getAddress().getAddress().getHostAddress();
}
/**
* Returns if the player is an NPC or not.
*
* @param player The player to check
*
* @return True if the player is an NPC, false otherwise
*/
public static boolean isNpc(Player player) {
return player.hasMetadata("NPC");
}
}