mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-11-09 12:10:37 +01:00
Do not undo command changes.
Instead just clear the list. It appears that this leads to recalculation of permissions, which leads to freezing during disabling the plugin having NPC plugins like Citizens 2 in place. Undoing the changes is not that important anyway.
This commit is contained in:
parent
cfa397fabc
commit
9838cf4393
@ -345,9 +345,12 @@ public class NoCheatPlus extends JavaPlugin implements NoCheatPlusAPI {
|
|||||||
if (verbose) LogUtil.logInfo("[NoCheatPlus] Cleanup DataManager...");
|
if (verbose) LogUtil.logInfo("[NoCheatPlus] Cleanup DataManager...");
|
||||||
dataMan.onDisable();
|
dataMan.onDisable();
|
||||||
|
|
||||||
// Restore changed commands.
|
// Clear command changes list (compatibility issues with NPCs, leads to rrecalculation of perms).
|
||||||
if (verbose) LogUtil.logInfo("[NoCheatPlus] Undo command changes...");
|
changedCommands.clear();
|
||||||
undoCommandChanges();
|
changedCommands = null;
|
||||||
|
// // Restore changed commands.
|
||||||
|
// if (verbose) LogUtil.logInfo("[NoCheatPlus] Undo command changes...");
|
||||||
|
// undoCommandChanges();
|
||||||
|
|
||||||
// Cleanup the configuration manager.
|
// Cleanup the configuration manager.
|
||||||
if (verbose) LogUtil.logInfo("[NoCheatPlus] Cleanup ConfigManager...");
|
if (verbose) LogUtil.logInfo("[NoCheatPlus] Cleanup ConfigManager...");
|
||||||
@ -361,6 +364,7 @@ public class NoCheatPlus extends JavaPlugin implements NoCheatPlusAPI {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Does not undo 100%, but restore old permission, permission-message, label (unlikely to be changed), permission default.
|
* Does not undo 100%, but restore old permission, permission-message, label (unlikely to be changed), permission default.
|
||||||
|
* @deprecated Leads to compatibility issues with NPC plugins such as Citizens 2, due to recalculation of permissions (specifically during disabling).
|
||||||
*/
|
*/
|
||||||
public void undoCommandChanges() {
|
public void undoCommandChanges() {
|
||||||
if (changedCommands != null){
|
if (changedCommands != null){
|
||||||
|
Loading…
Reference in New Issue
Block a user