mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-09-05 03:31:09 +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) {
|
||||
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);
|
||||
}
|
||||
|
||||
// Cleanup BlockProperties.
|
||||
if (verbose) LogUtil.logInfo("[NoCheatPlus] Cleanup BlockProperties...");
|
||||
BlockProperties.cleanup();
|
||||
|
||||
if (verbose) LogUtil.logInfo("[NoCheatPlus] Cleanup some mappings...");
|
||||
// Remove listeners.
|
||||
listeners.clear();
|
||||
|
|
Loading…
Reference in New Issue
Block a user