2014-08-31 20:56:05 +02:00
|
|
|
From 942c17e940e5eaf6d2e2e27cece7206848a1842d Mon Sep 17 00:00:00 2001
|
2014-07-21 22:46:54 +02:00
|
|
|
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
|
2014-08-18 17:43:17 +02:00
|
|
|
index 7eb66ea..a48a1c0 100644
|
2014-07-21 22:46:54 +02:00
|
|
|
--- 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 bL = 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
|
2014-08-18 17:43:17 +02:00
|
|
|
index 5a39069..3ef8662 100644
|
2014-07-21 22:46:54 +02:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
2014-08-18 17:43:17 +02:00
|
|
|
@@ -1363,6 +1363,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
2014-07-21 22:46:54 +02:00
|
|
|
getHandle().playerConnection.sendPacket( packet );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public String getLocale()
|
|
|
|
+ {
|
|
|
|
+ return getHandle().locale;
|
|
|
|
+ }
|
|
|
|
};
|
|
|
|
|
|
|
|
public Player.Spigot spigot()
|
|
|
|
--
|
|
|
|
1.9.1
|
|
|
|
|