From 1a019e4e8425803fe83a124a39cf955fcdb8664f Mon Sep 17 00:00:00 2001 From: Richard Date: Sun, 17 Jan 2016 22:15:29 -0200 Subject: [PATCH] Goddamn debug messages. --- .../SkStuff/expressions/ExprFireProof.java | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/src/me/TheBukor/SkStuff/expressions/ExprFireProof.java b/src/me/TheBukor/SkStuff/expressions/ExprFireProof.java index b56607a..b460a7d 100644 --- a/src/me/TheBukor/SkStuff/expressions/ExprFireProof.java +++ b/src/me/TheBukor/SkStuff/expressions/ExprFireProof.java @@ -4,7 +4,6 @@ import java.lang.reflect.Field; import javax.annotation.Nullable; -import org.bukkit.Bukkit; import org.bukkit.entity.Entity; import org.bukkit.event.Event; @@ -20,8 +19,6 @@ public class ExprFireProof extends SimpleExpression { private Expression entity; private Class craftEntClass = ReflectionUtils.getOBCClass("entity.CraftEntity"); - private Class entityClass = ReflectionUtils.getNMSClass("Entity"); - @Override public Class getReturnType() { return Boolean.class; @@ -75,21 +72,7 @@ public class ExprFireProof extends SimpleExpression { if (mode == ChangeMode.SET) { Boolean newValue = (Boolean) delta[0]; try { - //Field field = nmsEnt.getClass().getDeclaredField("fireProof"); - Bukkit.broadcastMessage("Looping all declared fields..."); - Field field = null; - int i = 1; - for (Field f : entityClass.getDeclaredFields()) { - Bukkit.broadcastMessage("Field #" + i + " = \u00A7b" + f.getName()); - if (f.getName().toLowerCase().contains("fire")) { - field = f; - } - i++; - } - if (field == null) { - Bukkit.broadcastMessage("No field containing \"fire\" was found..."); - return; - } + Field field = nmsEnt.getClass().getDeclaredField("fireProof"); field.setAccessible(true); field.setBoolean(nmsEnt, newValue); field.setAccessible(false);