Quick-Hack: Disable WorldEdit-Integration for Performance-Reason

This commit is contained in:
Jascha Starke 2014-01-04 21:03:31 +01:00
parent 06e08c630e
commit 47fb0e137a
2 changed files with 15 additions and 1 deletions

View file

@ -73,7 +73,7 @@ public class ModBlockStates extends CoreModule<LimitedCreative> {
return;
}
super.onEnable();
if (plugin.getServer().getPluginManager().isPluginEnabled("WorldEdit")) {
if (plugin.getServer().getPluginManager().isPluginEnabled("WorldEdit") && config.getWorldeditIntegration()) {
new BukkitRunnable() {
@Override
public void run() {

View file

@ -158,6 +158,20 @@ public class BlockStateConfig extends Configuration implements IConfigurationSub
return ignoredWorlds;
}
/**
* BlockStateWorldEditIntegration
*
* Allows you to disable hook into WorldEdit for better Performance. By default Integration is enable, so it logs
* block modifications via worldedit as creative-placed blocks in the database.
* A server reload (better restart) is needed to disabled WE-Integration.
*
* default: true
*/
@IsConfigurationNode(order = 600)
public boolean getWorldeditIntegration() {
return config.getBoolean("worldeditIntegration", true);
}
protected void setTool(Object val) throws InvalidValueException {
String v = (String) val;
Material m = null;