code cleanup

This commit is contained in:
FalsePattern committed 2022-07-31 20:41:56 +02:00
1 parent eaec528f5d
commit 316908baae
76 files changed
+691 -622

No files matched your search

@@ -1,4 +1,4 @@
/**
/*
* Copyright (C) 2022 FalsePattern
* All Rights Reserved
*
@@ -36,11 +36,20 @@ import java.util.List;
* You can use this event to manually trigger a synchronization request. The two different flavors are used on the two
* different game sides. If you want to trigger this on the server, use {@link #postServer}, and if on the client, use
* {@link #postClient}
*
*/
@StableAPI(since = "0.10.0")
@RequiredArgsConstructor(access = AccessLevel.PROTECTED)
public class ConfigSyncRequestEvent extends Event {
@StableAPI(since = "0.10.0")
public static void postClient() {
FMLCommonHandler.instance().bus().post(new Client());
}
@StableAPI(since = "0.10.0")
public static void postServer(List<EntityPlayerMP> players) {
FMLCommonHandler.instance().bus().post(new Server(new ArrayList<>(players)));
}
@StableAPI(since = "0.10.0")
public static class Client extends ConfigSyncRequestEvent {
@@ -55,14 +64,4 @@ public class ConfigSyncRequestEvent extends Event {
return Collections.unmodifiableList(players);
}
}
@StableAPI(since = "0.10.0")
public static void postClient() {
FMLCommonHandler.instance().bus().post(new Client());
}
@StableAPI(since = "0.10.0")
public static void postServer(List<EntityPlayerMP> players) {
FMLCommonHandler.instance().bus().post(new Server(new ArrayList<>(players)));
}
}