mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-09-18 18:01:17 +02:00
Cleanup BlockProperties on disable.
This commit is contained in:
parent
8c3ed77c7c
commit
abe22f8104
@ -1465,4 +1465,15 @@ public class BlockProperties {
|
|||||||
public static void setBreakPenaltyOffGround(float breakPenaltyOffGround) {
|
public static void setBreakPenaltyOffGround(float breakPenaltyOffGround) {
|
||||||
BlockProperties.breakPenaltyOffGround = breakPenaltyOffGround;
|
BlockProperties.breakPenaltyOffGround = breakPenaltyOffGround;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Cleanup. Call init() to re-initialize.
|
||||||
|
*/
|
||||||
|
public static void cleanup() {
|
||||||
|
pLoc.cleanup();
|
||||||
|
pLoc = null;
|
||||||
|
blockCache.cleanup();
|
||||||
|
blockCache = null;
|
||||||
|
// TODO: might empty mappings...
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -392,6 +392,10 @@ public class NoCheatPlus extends JavaPlugin implements NoCheatPlusAPI {
|
|||||||
removeComponent(obj);
|
removeComponent(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Cleanup BlockProperties.
|
||||||
|
if (verbose) LogUtil.logInfo("[NoCheatPlus] Cleanup BlockProperties...");
|
||||||
|
BlockProperties.cleanup();
|
||||||
|
|
||||||
if (verbose) LogUtil.logInfo("[NoCheatPlus] Cleanup some mappings...");
|
if (verbose) LogUtil.logInfo("[NoCheatPlus] Cleanup some mappings...");
|
||||||
// Remove listeners.
|
// Remove listeners.
|
||||||
listeners.clear();
|
listeners.clear();
|
||||||
|
Loading…
Reference in New Issue
Block a user