mirror of
https://github.com/asofold/CompatNoCheatPlus.git
synced 2024-11-18 11:16:23 +01:00
(bugfix) Citizens2 hook should unregister correctly on reloading etc.
This commit is contained in:
parent
5518ccd6bb
commit
73784131a5
@ -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.
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
name: CompatNoCheatPlus
|
||||
main: me.asofold.bpl.cncp.CompatNoCheatPlus
|
||||
version: 6.0.0
|
||||
version: 6.0.1
|
||||
loadbefore:
|
||||
- NoCheatPlus
|
||||
softdepend:
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user