diff --git a/src/main/java/space/devport/wertik/czechcraftquery/api/events/CzechcraftServerDropEvent.java b/src/main/java/space/devport/wertik/czechcraftquery/api/events/ServerAdvanceEvent.java similarity index 83% rename from src/main/java/space/devport/wertik/czechcraftquery/api/events/CzechcraftServerDropEvent.java rename to src/main/java/space/devport/wertik/czechcraftquery/api/events/ServerAdvanceEvent.java index 67a5dc5..fadd318 100644 --- a/src/main/java/space/devport/wertik/czechcraftquery/api/events/CzechcraftServerDropEvent.java +++ b/src/main/java/space/devport/wertik/czechcraftquery/api/events/ServerAdvanceEvent.java @@ -6,12 +6,12 @@ import org.jetbrains.annotations.NotNull; import space.devport.wertik.czechcraftquery.system.struct.response.impl.ServerInfoResponse; -public class CzechcraftServerDropEvent extends Event { +public class ServerAdvanceEvent extends Event { @Getter private final ServerInfoResponse response; - public CzechcraftServerDropEvent(ServerInfoResponse response) { + public ServerAdvanceEvent(ServerInfoResponse response) { this.response = response; } diff --git a/src/main/java/space/devport/wertik/czechcraftquery/api/events/CzechcraftServerAdvanceEvent.java b/src/main/java/space/devport/wertik/czechcraftquery/api/events/ServerDropEvent.java similarity index 83% rename from src/main/java/space/devport/wertik/czechcraftquery/api/events/CzechcraftServerAdvanceEvent.java rename to src/main/java/space/devport/wertik/czechcraftquery/api/events/ServerDropEvent.java index 2547fca..0c6687c 100644 --- a/src/main/java/space/devport/wertik/czechcraftquery/api/events/CzechcraftServerAdvanceEvent.java +++ b/src/main/java/space/devport/wertik/czechcraftquery/api/events/ServerDropEvent.java @@ -6,12 +6,12 @@ import org.jetbrains.annotations.NotNull; import space.devport.wertik.czechcraftquery.system.struct.response.impl.ServerInfoResponse; -public class CzechcraftServerAdvanceEvent extends Event { +public class ServerDropEvent extends Event { @Getter private final ServerInfoResponse response; - public CzechcraftServerAdvanceEvent(ServerInfoResponse response) { + public ServerDropEvent(ServerInfoResponse response) { this.response = response; } diff --git a/src/main/java/space/devport/wertik/czechcraftquery/listeners/PositionChangeListener.java b/src/main/java/space/devport/wertik/czechcraftquery/listeners/PositionChangeListener.java index 1ff1527..0c66556 100644 --- a/src/main/java/space/devport/wertik/czechcraftquery/listeners/PositionChangeListener.java +++ b/src/main/java/space/devport/wertik/czechcraftquery/listeners/PositionChangeListener.java @@ -5,8 +5,8 @@ import space.devport.utils.ConsoleOutput; import space.devport.utils.struct.Rewards; import space.devport.wertik.czechcraftquery.QueryPlugin; -import space.devport.wertik.czechcraftquery.api.events.CzechcraftServerAdvanceEvent; -import space.devport.wertik.czechcraftquery.api.events.CzechcraftServerDropEvent; +import space.devport.wertik.czechcraftquery.api.events.ServerAdvanceEvent; +import space.devport.wertik.czechcraftquery.api.events.ServerDropEvent; public class PositionChangeListener implements Listener { @@ -26,7 +26,7 @@ public void load() { } @EventHandler - public void onAdvance(CzechcraftServerAdvanceEvent event) { + public void onAdvance(ServerAdvanceEvent event) { ConsoleOutput.getInstance().debug("Caught event: " + event.getResponse().toString()); if (!plugin.getConfig().getBoolean("advance.enabled", false)) return; @@ -39,7 +39,7 @@ public void onAdvance(CzechcraftServerAdvanceEvent event) { } @EventHandler - public void onDrop(CzechcraftServerDropEvent event) { + public void onDrop(ServerDropEvent event) { ConsoleOutput.getInstance().debug("Caught event: " + event.getResponse().toString()); if (!plugin.getConfig().getBoolean("drop.enabled", false)) return; diff --git a/src/main/java/space/devport/wertik/czechcraftquery/system/struct/RequestType.java b/src/main/java/space/devport/wertik/czechcraftquery/system/struct/RequestType.java index b31b452..c208b53 100644 --- a/src/main/java/space/devport/wertik/czechcraftquery/system/struct/RequestType.java +++ b/src/main/java/space/devport/wertik/czechcraftquery/system/struct/RequestType.java @@ -5,8 +5,8 @@ import lombok.Setter; import org.jetbrains.annotations.NotNull; import space.devport.wertik.czechcraftquery.QueryPlugin; -import space.devport.wertik.czechcraftquery.api.events.CzechcraftServerAdvanceEvent; -import space.devport.wertik.czechcraftquery.api.events.CzechcraftServerDropEvent; +import space.devport.wertik.czechcraftquery.api.events.ServerAdvanceEvent; +import space.devport.wertik.czechcraftquery.api.events.ServerDropEvent; import space.devport.wertik.czechcraftquery.exception.ResponseParserException; import space.devport.wertik.czechcraftquery.system.struct.context.ContextModifier; import space.devport.wertik.czechcraftquery.system.struct.context.RequestContext; @@ -58,9 +58,9 @@ public RequestContext strip(@NotNull RequestContext context) { ServerInfoResponse toCacheResponse = (ServerInfoResponse) toCache; if (cachedResponse.getPosition() > toCacheResponse.getPosition()) { - QueryPlugin.callEvent(new CzechcraftServerAdvanceEvent(toCacheResponse)); + QueryPlugin.callEvent(new ServerAdvanceEvent(toCacheResponse)); } else if (cachedResponse.getPosition() < toCacheResponse.getPosition()) { - QueryPlugin.callEvent(new CzechcraftServerDropEvent(toCacheResponse)); + QueryPlugin.callEvent(new ServerDropEvent(toCacheResponse)); } }),