Dieser Commit ist enthalten in:
Ursprung
cf59dc9720
Commit
2ddfa9e80f
@ -82,7 +82,11 @@ public abstract class PacketHandler {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (method.getParameterCount() == 2) {
|
if (method.getParameterCount() == 2) {
|
||||||
|
if (metaInfos == null || method.getParameterTypes()[1].isAssignableFrom(metaInfos.getClass())) {
|
||||||
method.invoke(this, packet, metaInfos);
|
method.invoke(this, packet, metaInfos);
|
||||||
|
} else {
|
||||||
|
throw new IllegalArgumentException("MetaInfos is not assignable to " + method.getParameterTypes()[1]);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
method.invoke(this, packet);
|
method.invoke(this, packet);
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren