Add MetaInfos #5
@ -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);
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren