Commit fffa5a9c authored by Benjamin Elsdon's avatar Benjamin Elsdon Committed by Melledy
Browse files

Fix "Attempt to get java.util.List field 'PacketOpcodes.BANNED_PACKETS' with...

Fix "Attempt to get java.util.List field 'PacketOpcodes.BANNED_PACKETS' with illegal data type conversion to int"
parent c147ebda
...@@ -17,10 +17,12 @@ public class PacketOpcodesUtil { ...@@ -17,10 +17,12 @@ public class PacketOpcodesUtil {
Field[] fields = PacketOpcodes.class.getFields(); Field[] fields = PacketOpcodes.class.getFields();
for (Field f : fields) { for (Field f : fields) {
try { if(f.getType().equals(int.class)) {
opcodeMap.put(f.getInt(null), f.getName()); try {
} catch (Exception e) { opcodeMap.put(f.getInt(null), f.getName());
e.printStackTrace(); } catch (Exception e) {
e.printStackTrace();
}
} }
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment