General npc support, fixes and enhancements

This commit is contained in:
Gabriele C
2015-09-15 16:33:32 +02:00
parent c473e81eb9
commit 026d84427b
15 changed files with 40 additions and 102 deletions
@@ -1,27 +0,0 @@
package fr.xephi.authme.plugin.manager;
import org.bukkit.entity.Entity;
import fr.xephi.authme.AuthMe;
import net.citizensnpcs.api.CitizensAPI;
public class CitizensCommunicator {
public AuthMe instance;
public CitizensCommunicator(AuthMe instance) {
this.instance = instance;
}
public boolean isNPC(final Entity player) {
if (!this.instance.isCitizensActive)
return false;
try {
return CitizensAPI.getNPCRegistry().isNPC(player);
} catch (NoClassDefFoundError ncdfe) {
return false;
} catch (Exception npe) {
return false;
}
}
}