(bugfix) Citizens2 hook should unregister correctly on reloading etc.

This commit is contained in:
asofold 2012-08-24 13:49:04 +02:00
parent 5518ccd6bb
commit 73784131a5
4 changed files with 6 additions and 3 deletions

View File

@ -34,6 +34,9 @@ Generic abstract class for the mcMMO style cancelling of next x events + ticks a
VERSION HISTORY
---------------------------
(6.0.1)
- (bugfix) Citizens2 hook should unregister correctly on reloading etc.
(6.0.0)
- (BIG CHANGE) Restructure to load before NoCheatPlus.

View File

@ -1,6 +1,6 @@
name: CompatNoCheatPlus
main: me.asofold.bpl.cncp.CompatNoCheatPlus
version: 6.0.0
version: 6.0.1
loadbefore:
- NoCheatPlus
softdepend:

View File

@ -30,7 +30,7 @@ public class HookCitizens2 extends AbstractHook {
@Override
public NCPHook getNCPHook() {
if (ncpHook == null){
return new NCPHook() {
ncpHook = new NCPHook() {
@Override
public boolean onCheckFailure(CheckType checkType, Player player) {
return CitizensAPI.getNPCRegistry().isNPC(player);

View File

@ -51,7 +51,7 @@ public class HookFacadeImpl implements HookFacade, NCPHook {
final String name = player.getName();
if (cancel.equals(name)){
if (player == null || player.getTicksLived() != cancelTicks){
if (player.getTicksLived() != cancelTicks){
// System.out.println("[cncp] No cancel (ticks/player): "+event.getPlayer().getName());
cancel = null;
}