SteamWar/SpigotCore
Archiviert
13
0

Experimental ReflectionFix
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
Lixfel 2023-03-03 17:17:26 +01:00
Ursprung ea9b11c263
Commit f4e2051ec0

Datei anzeigen

@ -156,6 +156,9 @@ public final class Reflection {
@Override @Override
public void set(Object target, Object value) { public void set(Object target, Object value) {
try { try {
if(field.getDeclaringClass() == int.class)
field.setInt(target, (int)value);
else
field.set(target, value); field.set(target, value);
} catch (IllegalAccessException e) { } catch (IllegalAccessException e) {
throw new IllegalArgumentException("Cannot access reflection.", e); throw new IllegalArgumentException("Cannot access reflection.", e);