3
0

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
+ 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);
+ if (material != null)
+ if (material != null && net.minecraft.server.MinecraftServer.kcauldronConfig.loggingMaterialInjection.getValue())
+ {
+ if (isForgeBlock)
+ {

View File

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