[ci skip] Cleanup events (#10202)

This commit is contained in:
Lulu13022002
2024-02-01 10:15:57 +01:00
parent d676979ea0
commit f7e469eb2e
187 changed files with 2415 additions and 2258 deletions

View File

@@ -16,6 +16,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+import org.bukkit.event.HandlerList;
+import org.bukkit.event.player.PlayerEvent;
+import org.jetbrains.annotations.ApiStatus;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+/**
+ * Called when the locale of the player is changed.
@@ -24,11 +26,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ */
+@Deprecated(forRemoval = true) @ApiStatus.ScheduledForRemoval(inVersion = "1.21")
+public class PlayerLocaleChangeEvent extends PlayerEvent {
+ private static final HandlerList handlers = new HandlerList();
+
+ private static final HandlerList HANDLER_LIST = new HandlerList();
+
+ private final String oldLocale;
+ private final String newLocale;
+
+ public PlayerLocaleChangeEvent(final Player player, final String oldLocale, final String newLocale) {
+ @ApiStatus.Internal
+ public PlayerLocaleChangeEvent(final @NotNull Player player, final @Nullable String oldLocale, final @NotNull String newLocale) {
+ super(player);
+ this.oldLocale = oldLocale;
+ this.newLocale = newLocale;
@@ -39,8 +44,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ *
+ * @return player's old locale
+ */
+ @Nullable
+ public String getOldLocale() {
+ return oldLocale;
+ return this.oldLocale;
+ }
+
+ /**
@@ -48,16 +54,19 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ *
+ * @return player's new locale
+ */
+ @NotNull
+ public String getNewLocale() {
+ return newLocale;
+ return this.newLocale;
+ }
+
+ @Override
+ @NotNull
+ public HandlerList getHandlers() {
+ return handlers;
+ return HANDLER_LIST;
+ }
+
+ @NotNull
+ public static HandlerList getHandlerList() {
+ return handlers;
+ return HANDLER_LIST;
+ }
+}