mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2025-01-07 00:08:20 +01:00
Fix players getting drawn back to a really old location if
they get, then lose the "moving" permission. Silently catch all exceptions in command execution that can't be handled anyway.
This commit is contained in:
parent
b10a02d424
commit
e8d8341d3b
@ -83,6 +83,8 @@ public abstract class Check {
|
|||||||
plugin.getServer().dispatchCommand(noCheatCommandSender, command);
|
plugin.getServer().dispatchCommand(noCheatCommandSender, command);
|
||||||
} catch(CommandException e) {
|
} catch(CommandException e) {
|
||||||
System.out.println("[NoCheat] failed to execute the command '" + command + "': " + e.getMessage() + ", please check if everything is setup correct.");
|
System.out.println("[NoCheat] failed to execute the command '" + command + "': " + e.getMessage() + ", please check if everything is setup correct.");
|
||||||
|
} catch(Exception e) {
|
||||||
|
// I don't care in this case, your problem if your command fails
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -111,6 +111,9 @@ public class MovingEventManager extends EventManagerImpl {
|
|||||||
final CCMoving cc = MovingCheck.getConfig(player.getConfigurationStore());
|
final CCMoving cc = MovingCheck.getConfig(player.getConfigurationStore());
|
||||||
|
|
||||||
if(!cc.check || player.hasPermission(Permissions.MOVING)) {
|
if(!cc.check || player.hasPermission(Permissions.MOVING)) {
|
||||||
|
// Just because he is allowed now, doesn't mean he will always
|
||||||
|
// be. So forget data about the player related to moving
|
||||||
|
player.getDataStore().get("moving").clearCriticalData();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user