not a handler lol

This commit is contained in:
Leijurv
2018-11-18 11:27:38 -08:00
parent 3c913a7b85
commit dfb49179c5
@@ -32,9 +32,11 @@ public enum ConstructingDeserializer implements MessageDeserializer {
MSGS = new ArrayList<>(); MSGS = new ArrayList<>();
// imagine doing something in reflect but it's actually concise and you don't need to catch 42069 different exceptions. huh. // imagine doing something in reflect but it's actually concise and you don't need to catch 42069 different exceptions. huh.
for (Method m : IMessageListener.class.getDeclaredMethods()) { for (Method m : IMessageListener.class.getDeclaredMethods()) {
if (m.getName().equals("handle")) {
MSGS.add((Class<? extends SerializableMessage>) m.getParameterTypes()[0]); MSGS.add((Class<? extends SerializableMessage>) m.getParameterTypes()[0]);
} }
} }
}
@Override @Override
public SerializableMessage deserialize(DataInputStream in) throws IOException { public SerializableMessage deserialize(DataInputStream in) throws IOException {