forked from SteamWar/SteamWar
Format code
This commit is contained in:
@@ -44,7 +44,7 @@ public abstract class PacketHandler {
|
||||
protected PacketHandler() {
|
||||
Method[] methods = getClass().getMethods();
|
||||
for (Method method : methods) {
|
||||
if(method.getParameterCount() != 1 || !NetworkPacket.class.isAssignableFrom(method.getParameterTypes()[0])) {
|
||||
if (method.getParameterCount() != 1 || !NetworkPacket.class.isAssignableFrom(method.getParameterTypes()[0])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -73,5 +73,6 @@ public abstract class PacketHandler {
|
||||
}
|
||||
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
protected @interface Handler {}
|
||||
protected @interface Handler {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ public class RandomGenerator {
|
||||
}
|
||||
|
||||
public static <T> T generateRandom(Class<T> clazz) {
|
||||
if(clazz.isEnum()) {
|
||||
if (clazz.isEnum()) {
|
||||
return generateRandomEnum(clazz);
|
||||
} else {
|
||||
return (T) generators.get(clazz).apply(clazz);
|
||||
|
||||
Reference in New Issue
Block a user