Protect against block breaking and block placing in jails

Unless the player has admin permission. This does not include the
penalties as those will be done in a future commit. This also has a
little better performance on the block placing and breaking events, if
these checks are disabled.
This commit is contained in:
graywolf336
2014-01-08 15:02:24 -06:00
parent ab74a158b8
commit d734d99e88
7 changed files with 89 additions and 4 deletions

View File

@ -43,7 +43,7 @@ public class JailMain extends JavaPlugin {
pm = new PrisonerManager(this);
PluginManager plm = this.getServer().getPluginManager();
plm.registerEvents(new BlockListener(), this);
plm.registerEvents(new BlockListener(this), this);
plm.registerEvents(new EntityListener(), this);
plm.registerEvents(new HandCuffListener(this), this);
plm.registerEvents(new PlayerListener(this), this);
@ -54,7 +54,7 @@ public class JailMain extends JavaPlugin {
if(debug) getLogger().info("Debugging enabled.");
getLogger().info("Successfully loaded, is our impression.");
getLogger().info("Completed enablement.");
}
public void onDisable() {