40 lines
1.6 KiB
Diff
40 lines
1.6 KiB
Diff
|
From 6b6b2aa138326bf742a1a379b23ae083617ab565 Mon Sep 17 00:00:00 2001
|
||
|
From: Smove <jan@lavasurvival.net>
|
||
|
Date: Sat, 1 Feb 2014 18:12:16 +1100
|
||
|
Subject: [PATCH] Implement Locale Getter for Players
|
||
|
|
||
|
|
||
|
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||
|
index a4c8843..ec73994 100644
|
||
|
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||
|
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||
|
@@ -30,7 +30,7 @@ import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
|
||
|
public class EntityPlayer extends EntityHuman implements ICrafting {
|
||
|
|
||
|
private static final Logger bM = LogManager.getLogger();
|
||
|
- private String locale = "en_US";
|
||
|
+ public String locale = "en_US"; // Spigot
|
||
|
public PlayerConnection playerConnection;
|
||
|
public final MinecraftServer server;
|
||
|
public final PlayerInteractManager playerInteractManager;
|
||
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||
|
index 16b1fc9..1bb1a8f 100644
|
||
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||
|
@@ -1294,6 +1294,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||
|
server.getServer().getPlayerList().moveToWorld( getHandle(), 0, false );
|
||
|
}
|
||
|
}
|
||
|
+
|
||
|
+ @Override
|
||
|
+ public String getLocale()
|
||
|
+ {
|
||
|
+ return getHandle().locale;
|
||
|
+ }
|
||
|
};
|
||
|
|
||
|
public Player.Spigot spigot()
|
||
|
--
|
||
|
1.8.3.2
|
||
|
|