From 07ed9fbc48ff2d13c70ee9a8e701fafefe754a40 Mon Sep 17 00:00:00 2001 From: Ben Woo <30431861+benwoo1110@users.noreply.github.com> Date: Sat, 23 Nov 2024 21:28:05 +0800 Subject: [PATCH] Cleanup MVConfigReloadEvent and deprecate MVRespawnEvent --- .../multiverse/core/event/MVConfigReloadEvent.java | 2 +- .../mvplugins/multiverse/core/event/MVRespawnEvent.java | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/mvplugins/multiverse/core/event/MVConfigReloadEvent.java b/src/main/java/org/mvplugins/multiverse/core/event/MVConfigReloadEvent.java index a80a39ee..f6fcadf5 100644 --- a/src/main/java/org/mvplugins/multiverse/core/event/MVConfigReloadEvent.java +++ b/src/main/java/org/mvplugins/multiverse/core/event/MVConfigReloadEvent.java @@ -16,7 +16,7 @@ import org.bukkit.event.HandlerList; * Called when the Multiverse-config should be reloaded. */ public class MVConfigReloadEvent extends Event { - private List configsLoaded; + private final List configsLoaded; public MVConfigReloadEvent(List configsLoaded) { this.configsLoaded = configsLoaded; diff --git a/src/main/java/org/mvplugins/multiverse/core/event/MVRespawnEvent.java b/src/main/java/org/mvplugins/multiverse/core/event/MVRespawnEvent.java index 5190122d..ffc51f22 100644 --- a/src/main/java/org/mvplugins/multiverse/core/event/MVRespawnEvent.java +++ b/src/main/java/org/mvplugins/multiverse/core/event/MVRespawnEvent.java @@ -15,11 +15,12 @@ import org.bukkit.event.HandlerList; /** * Called when a player is respawning. */ +// todo: remove or update its usage. The respawnMethod is always "compatibility" for some reason +@Deprecated public class MVRespawnEvent extends Event { - private Player player; + private final Player player; + private final String respawnMethod; private Location location; - private String respawnMethod; - public MVRespawnEvent(Location spawningAt, Player p, String respawnMethod) { this.player = p;