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:
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user