mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-02-04 09:43:23 +08:00
Fix "Attempt to get java.util.List field 'PacketOpcodes.BANNED_PACKETS' with illegal data type conversion to int"
This commit is contained in:
parent
c147ebda8f
commit
fffa5a9c47
@ -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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user