Get player via BukkitService; add unit tests for commands

This commit is contained in:
ljacqu
2016-04-08 19:56:44 +02:00
parent 0cda9a7698
commit e2b50b72a5
14 changed files with 525 additions and 44 deletions
@@ -232,10 +232,6 @@ public final class Utils {
}
}
public static Player getPlayer(String name) {
return wrapper.getServer().getPlayerExact(name); // bukkit will lowercase the input
}
public static boolean isNPC(Player player) {
return player.hasMetadata("NPC") || plugin.getPluginHooks().isNpcInCombatTagPlus(player);
}