mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-29 22:13:42 +01:00
e4d10a6d67
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 122289ff Add FaceAttachable interface to handle Grindstone facing in common with Switches a6db750e SPIGOT-5647: ZombieVillager entity should have getVillagerType() CraftBukkit Changes:bbe3d58e
SPIGOT-5650: Lectern.setPage(int) causes a NullPointerException3075579f
Add FaceAttachable interface to handle Grindstone facing in common with Switches95bd4238
SPIGOT-5647: ZombieVillager entity should have getVillagerType()4d975ac3
SPIGOT-5617: setBlockData does not work when NotPlayEvent is called by redstone current
66 lines
1.8 KiB
Diff
66 lines
1.8 KiB
Diff
From a986444a1c2cce777677717b45e92227b9c9e192 Mon Sep 17 00:00:00 2001
|
|
From: Isaac Moore <rmsy@me.com>
|
|
Date: Mon, 29 Feb 2016 18:02:25 -0600
|
|
Subject: [PATCH] Add PlayerLocaleChangeEvent
|
|
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/event/player/PlayerLocaleChangeEvent.java b/src/main/java/com/destroystokyo/paper/event/player/PlayerLocaleChangeEvent.java
|
|
new file mode 100644
|
|
index 000000000..29dd763a9
|
|
--- /dev/null
|
|
+++ b/src/main/java/com/destroystokyo/paper/event/player/PlayerLocaleChangeEvent.java
|
|
@@ -0,0 +1,50 @@
|
|
+package com.destroystokyo.paper.event.player;
|
|
+
|
|
+import org.bukkit.entity.Player;
|
|
+import org.bukkit.event.HandlerList;
|
|
+import org.bukkit.event.player.PlayerEvent;
|
|
+
|
|
+/**
|
|
+ * Called when the locale of the player is changed.
|
|
+ *
|
|
+ * @deprecated Replaced by {@link org.bukkit.event.player.PlayerLocaleChangeEvent} upstream
|
|
+ */
|
|
+@Deprecated
|
|
+public class PlayerLocaleChangeEvent extends PlayerEvent {
|
|
+ private static final HandlerList handlers = new HandlerList();
|
|
+ private final String oldLocale;
|
|
+ private final String newLocale;
|
|
+
|
|
+ public PlayerLocaleChangeEvent(final Player player, final String oldLocale, final String newLocale) {
|
|
+ super(player);
|
|
+ this.oldLocale = oldLocale;
|
|
+ this.newLocale = newLocale;
|
|
+ }
|
|
+
|
|
+ /**
|
|
+ * Gets the locale the player switched from.
|
|
+ *
|
|
+ * @return player's old locale
|
|
+ */
|
|
+ public String getOldLocale() {
|
|
+ return oldLocale;
|
|
+ }
|
|
+
|
|
+ /**
|
|
+ * Gets the locale the player is changed to.
|
|
+ *
|
|
+ * @return player's new locale
|
|
+ */
|
|
+ public String getNewLocale() {
|
|
+ return newLocale;
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public HandlerList getHandlers() {
|
|
+ return handlers;
|
|
+ }
|
|
+
|
|
+ public static HandlerList getHandlerList() {
|
|
+ return handlers;
|
|
+ }
|
|
+}
|
|
--
|
|
2.25.1
|
|
|