give some info if packet cant be translated

give some info if packet cant be translated so reporting it would be more easy for poeple
This commit is contained in:
WesleyVanNeck 2019-10-02 08:52:19 +02:00 committed by GitHub
parent 91a80f7dee
commit a762e8d937
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -53,9 +53,10 @@ public class Registry<T> {
if (MAP.containsKey(clazz)) {
((PacketTranslator<P>) MAP.get(clazz)).translate(packet, session);
}
} catch (NullPointerException ex) {
GeyserLogger.DEFAULT.debug("Could not translate packet " + packet.getClass().getSimpleName());
} catch (Throwable ex) {
GeyserLogger.DEFAULT.error("Could not translate packet " + packet.getClass().getSimpleName(), ex);
ex.printStackTrace();
}
return false;
}
}