From 29890d7c20be2533be71c7238e7c352b95aeb853 Mon Sep 17 00:00:00 2001 From: Andrew Steinborn Date: Thu, 22 Oct 2020 01:09:30 -0400 Subject: [PATCH] Further shuffling of event classes. --- .../api/event/{proxy => connection}/ProxyQueryEvent.java | 2 +- .../event/{proxy => lifecycle}/ProxyInitializeEvent.java | 2 +- .../api/event/{proxy => lifecycle}/ProxyReloadEvent.java | 2 +- .../api/event/{proxy => lifecycle}/ProxyShutdownEvent.java | 2 +- .../api/event/{proxy => lifecycle}/package-info.java | 2 +- .../main/java/com/velocitypowered/proxy/VelocityServer.java | 5 ++--- .../velocitypowered/proxy/plugin/VelocityEventManager.java | 3 +-- .../proxy/protocol/netty/GS4QueryHandler.java | 6 +++--- 8 files changed, 11 insertions(+), 13 deletions(-) rename api/src/main/java/com/velocitypowered/api/event/{proxy => connection}/ProxyQueryEvent.java (97%) rename api/src/main/java/com/velocitypowered/api/event/{proxy => lifecycle}/ProxyInitializeEvent.java (83%) rename api/src/main/java/com/velocitypowered/api/event/{proxy => lifecycle}/ProxyReloadEvent.java (81%) rename api/src/main/java/com/velocitypowered/api/event/{proxy => lifecycle}/ProxyShutdownEvent.java (83%) rename api/src/main/java/com/velocitypowered/api/event/{proxy => lifecycle}/package-info.java (58%) diff --git a/api/src/main/java/com/velocitypowered/api/event/proxy/ProxyQueryEvent.java b/api/src/main/java/com/velocitypowered/api/event/connection/ProxyQueryEvent.java similarity index 97% rename from api/src/main/java/com/velocitypowered/api/event/proxy/ProxyQueryEvent.java rename to api/src/main/java/com/velocitypowered/api/event/connection/ProxyQueryEvent.java index 3fe08408e..f9cf5bf2b 100644 --- a/api/src/main/java/com/velocitypowered/api/event/proxy/ProxyQueryEvent.java +++ b/api/src/main/java/com/velocitypowered/api/event/connection/ProxyQueryEvent.java @@ -1,4 +1,4 @@ -package com.velocitypowered.api.event.proxy; +package com.velocitypowered.api.event.connection; import com.google.common.base.Preconditions; import com.velocitypowered.api.proxy.server.QueryResponse; diff --git a/api/src/main/java/com/velocitypowered/api/event/proxy/ProxyInitializeEvent.java b/api/src/main/java/com/velocitypowered/api/event/lifecycle/ProxyInitializeEvent.java similarity index 83% rename from api/src/main/java/com/velocitypowered/api/event/proxy/ProxyInitializeEvent.java rename to api/src/main/java/com/velocitypowered/api/event/lifecycle/ProxyInitializeEvent.java index 7a439fa8f..3a55a388d 100644 --- a/api/src/main/java/com/velocitypowered/api/event/proxy/ProxyInitializeEvent.java +++ b/api/src/main/java/com/velocitypowered/api/event/lifecycle/ProxyInitializeEvent.java @@ -1,4 +1,4 @@ -package com.velocitypowered.api.event.proxy; +package com.velocitypowered.api.event.lifecycle; /** * This event is fired by the proxy after plugins have been loaded but before the proxy starts diff --git a/api/src/main/java/com/velocitypowered/api/event/proxy/ProxyReloadEvent.java b/api/src/main/java/com/velocitypowered/api/event/lifecycle/ProxyReloadEvent.java similarity index 81% rename from api/src/main/java/com/velocitypowered/api/event/proxy/ProxyReloadEvent.java rename to api/src/main/java/com/velocitypowered/api/event/lifecycle/ProxyReloadEvent.java index ec1ed1ad0..d29684142 100644 --- a/api/src/main/java/com/velocitypowered/api/event/proxy/ProxyReloadEvent.java +++ b/api/src/main/java/com/velocitypowered/api/event/lifecycle/ProxyReloadEvent.java @@ -1,4 +1,4 @@ -package com.velocitypowered.api.event.proxy; +package com.velocitypowered.api.event.lifecycle; /** * This event is fired when the proxy is reloaded by the user using {@code /velocity reload}. diff --git a/api/src/main/java/com/velocitypowered/api/event/proxy/ProxyShutdownEvent.java b/api/src/main/java/com/velocitypowered/api/event/lifecycle/ProxyShutdownEvent.java similarity index 83% rename from api/src/main/java/com/velocitypowered/api/event/proxy/ProxyShutdownEvent.java rename to api/src/main/java/com/velocitypowered/api/event/lifecycle/ProxyShutdownEvent.java index dc99fde0c..010b61821 100644 --- a/api/src/main/java/com/velocitypowered/api/event/proxy/ProxyShutdownEvent.java +++ b/api/src/main/java/com/velocitypowered/api/event/lifecycle/ProxyShutdownEvent.java @@ -1,4 +1,4 @@ -package com.velocitypowered.api.event.proxy; +package com.velocitypowered.api.event.lifecycle; /** * This event is fired by the proxy after the proxy has stopped accepting connections but before the diff --git a/api/src/main/java/com/velocitypowered/api/event/proxy/package-info.java b/api/src/main/java/com/velocitypowered/api/event/lifecycle/package-info.java similarity index 58% rename from api/src/main/java/com/velocitypowered/api/event/proxy/package-info.java rename to api/src/main/java/com/velocitypowered/api/event/lifecycle/package-info.java index 3b7aab6b7..c19111823 100644 --- a/api/src/main/java/com/velocitypowered/api/event/proxy/package-info.java +++ b/api/src/main/java/com/velocitypowered/api/event/lifecycle/package-info.java @@ -1,4 +1,4 @@ /** * Provides events for handling the lifecycle of the proxy. */ -package com.velocitypowered.api.event.proxy; \ No newline at end of file +package com.velocitypowered.api.event.lifecycle; \ No newline at end of file diff --git a/proxy/src/main/java/com/velocitypowered/proxy/VelocityServer.java b/proxy/src/main/java/com/velocitypowered/proxy/VelocityServer.java index ae0dbab22..249f8cb40 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/VelocityServer.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/VelocityServer.java @@ -6,8 +6,8 @@ import com.google.common.collect.ImmutableList; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.velocitypowered.api.event.EventManager; -import com.velocitypowered.api.event.proxy.ProxyInitializeEvent; -import com.velocitypowered.api.event.proxy.ProxyReloadEvent; +import com.velocitypowered.api.event.lifecycle.ProxyInitializeEvent; +import com.velocitypowered.api.event.lifecycle.ProxyReloadEvent; import com.velocitypowered.api.network.ProtocolVersion; import com.velocitypowered.api.plugin.PluginContainer; import com.velocitypowered.api.plugin.PluginManager; @@ -30,7 +30,6 @@ import com.velocitypowered.proxy.network.ConnectionManager; import com.velocitypowered.proxy.plugin.VelocityEventManager; import com.velocitypowered.proxy.plugin.VelocityPluginManager; import com.velocitypowered.proxy.protocol.ProtocolUtils; -import com.velocitypowered.proxy.protocol.packet.Chat; import com.velocitypowered.proxy.protocol.util.FaviconSerializer; import com.velocitypowered.proxy.protocol.util.GameProfileSerializer; import com.velocitypowered.proxy.scheduler.VelocityScheduler; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/plugin/VelocityEventManager.java b/proxy/src/main/java/com/velocitypowered/proxy/plugin/VelocityEventManager.java index 3ebe459b2..b914dfd85 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/plugin/VelocityEventManager.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/plugin/VelocityEventManager.java @@ -6,9 +6,8 @@ import com.google.common.collect.Multimaps; import com.google.common.util.concurrent.ThreadFactoryBuilder; import com.velocitypowered.api.event.EventHandler; import com.velocitypowered.api.event.EventManager; -import com.velocitypowered.api.event.PostOrder; import com.velocitypowered.api.event.Subscribe; -import com.velocitypowered.api.event.proxy.ProxyShutdownEvent; +import com.velocitypowered.api.event.lifecycle.ProxyShutdownEvent; import com.velocitypowered.api.plugin.PluginManager; import java.lang.reflect.Method; import java.net.URL; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/protocol/netty/GS4QueryHandler.java b/proxy/src/main/java/com/velocitypowered/proxy/protocol/netty/GS4QueryHandler.java index c5ac5f8d9..d6b9a78ab 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/protocol/netty/GS4QueryHandler.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/protocol/netty/GS4QueryHandler.java @@ -1,12 +1,12 @@ package com.velocitypowered.proxy.protocol.netty; -import static com.velocitypowered.api.event.proxy.ProxyQueryEvent.QueryType.BASIC; -import static com.velocitypowered.api.event.proxy.ProxyQueryEvent.QueryType.FULL; +import static com.velocitypowered.api.event.connection.ProxyQueryEvent.QueryType.BASIC; +import static com.velocitypowered.api.event.connection.ProxyQueryEvent.QueryType.FULL; import com.google.common.cache.Cache; import com.google.common.cache.CacheBuilder; import com.google.common.collect.ImmutableSet; -import com.velocitypowered.api.event.proxy.ProxyQueryEvent; +import com.velocitypowered.api.event.connection.ProxyQueryEvent; import com.velocitypowered.api.network.ProtocolVersion; import com.velocitypowered.api.plugin.PluginContainer; import com.velocitypowered.api.plugin.PluginDescription;