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:
Evenprime 2012-01-04 20:44:13 +01:00
parent b10a02d424
commit e8d8341d3b
2 changed files with 5 additions and 0 deletions

View File

@ -83,6 +83,8 @@ public abstract class Check {
plugin.getServer().dispatchCommand(noCheatCommandSender, command);
} catch(CommandException e) {
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
}
}
});

View File

@ -111,6 +111,9 @@ public class MovingEventManager extends EventManagerImpl {
final CCMoving cc = MovingCheck.getConfig(player.getConfigurationStore());
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;
}