Fix stuff
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
yoyosource 2022-06-14 13:53:26 +02:00
Ursprung cf59dc9720
Commit 2ddfa9e80f

Datei anzeigen

@ -82,7 +82,11 @@ public abstract class PacketHandler {
return;
}
if (method.getParameterCount() == 2) {
method.invoke(this, packet, metaInfos);
if (metaInfos == null || method.getParameterTypes()[1].isAssignableFrom(metaInfos.getClass())) {
method.invoke(this, packet, metaInfos);
} else {
throw new IllegalArgumentException("MetaInfos is not assignable to " + method.getParameterTypes()[1]);
}
} else {
method.invoke(this, packet);
}