1
0
forked from xjboss/KCauldronX

Disable dumb material injection logging

This commit is contained in:
Prototik 2015-06-03 23:39:51 +07:00
parent 27d13cce59
commit c755e7f9a4
2 changed files with 5 additions and 1 deletions

View File

@ -19,7 +19,7 @@
+ // Cauldron start - register item/block materials for Bukkit + // Cauldron start - register item/block materials for Bukkit
+ boolean isForgeBlock = p_148756_3_ instanceof Block && (p_148756_3_.getClass().getName().length() > 3 && !p_148756_3_.getClass().getName().startsWith("net.minecraft.block")) ? true : false; + boolean isForgeBlock = p_148756_3_ instanceof Block && (p_148756_3_.getClass().getName().length() > 3 && !p_148756_3_.getClass().getName().startsWith("net.minecraft.block")) ? true : false;
+ org.bukkit.Material material = org.bukkit.Material.addMaterial(p_148756_1_, p_148756_2_, isForgeBlock); + org.bukkit.Material material = org.bukkit.Material.addMaterial(p_148756_1_, p_148756_2_, isForgeBlock);
+ if (material != null) + if (material != null && net.minecraft.server.MinecraftServer.kcauldronConfig.loggingMaterialInjection.getValue())
+ { + {
+ if (isForgeBlock) + if (isForgeBlock)
+ { + {

View File

@ -24,6 +24,9 @@ public class KCauldronConfig extends ConfigBase {
public StringSetting updatecheckerInstallAs = new StringSetting(this, public StringSetting updatecheckerInstallAs = new StringSetting(this,
"updatechecker.installAs", "", "Install new version with specified name"); "updatechecker.installAs", "", "Install new version with specified name");
public BoolSetting loggingMaterialInjection = new BoolSetting(this,
"loggin.materialInjection", false, "Log material injection event");
public KCauldronConfig() { public KCauldronConfig() {
super("kcauldron.yml", "kc"); super("kcauldron.yml", "kc");
register(commandEnable); register(commandEnable);
@ -33,6 +36,7 @@ public class KCauldronConfig extends ConfigBase {
register(updatecheckerAutoinstall); register(updatecheckerAutoinstall);
register(updatecheckerQuite); register(updatecheckerQuite);
register(updatecheckerInstallAs); register(updatecheckerInstallAs);
register(loggingMaterialInjection);
load(); load();
} }