Quick-Hack: Disable WorldEdit-Integration for Performance-Reason
This commit is contained in:
parent
06e08c630e
commit
47fb0e137a
2 changed files with 15 additions and 1 deletions
|
@ -73,7 +73,7 @@ public class ModBlockStates extends CoreModule<LimitedCreative> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
super.onEnable();
|
super.onEnable();
|
||||||
if (plugin.getServer().getPluginManager().isPluginEnabled("WorldEdit")) {
|
if (plugin.getServer().getPluginManager().isPluginEnabled("WorldEdit") && config.getWorldeditIntegration()) {
|
||||||
new BukkitRunnable() {
|
new BukkitRunnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|
|
@ -158,6 +158,20 @@ public class BlockStateConfig extends Configuration implements IConfigurationSub
|
||||||
return ignoredWorlds;
|
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 {
|
protected void setTool(Object val) throws InvalidValueException {
|
||||||
String v = (String) val;
|
String v = (String) val;
|
||||||
Material m = null;
|
Material m = null;
|
||||||
|
|
Loading…
Reference in a new issue