mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-27 07:34:27 +00: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
6180d15c17
commit
a1e095bba7
@ -17,10 +17,12 @@ public class PacketOpcodesUtil {
|
||||
Field[] fields = PacketOpcodes.class.getFields();
|
||||
|
||||
for (Field f : fields) {
|
||||
try {
|
||||
opcodeMap.put(f.getInt(null), f.getName());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
if(f.getType().equals(int.class)) {
|
||||
try {
|
||||
opcodeMap.put(f.getInt(null), f.getName());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user