2015-07-10 14:33:16 +02:00
|
|
|
From c0fc0c1045109ab22822c09d664da315180026b1 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
|
2015-06-09 01:16:01 +02:00
|
|
|
index ffdf25c..3438d3a 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
|
2014-11-28 02:17:45 +01:00
|
|
|
@@ -27,7 +27,7 @@ import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
|
2014-07-21 22:46:54 +02:00
|
|
|
public class EntityPlayer extends EntityHuman implements ICrafting {
|
|
|
|
|
2015-02-28 12:36:22 +01:00
|
|
|
private static final Logger bH = LogManager.getLogger();
|
2014-07-21 22:46:54 +02:00
|
|
|
- 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
|
2015-07-10 14:33:16 +02:00
|
|
|
index 0868ff7..de22116 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
|
2015-07-10 14:33:16 +02:00
|
|
|
@@ -1434,6 +1434,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()
|
|
|
|
--
|
2015-05-09 22:23:26 +02:00
|
|
|
2.1.4
|
2014-07-21 22:46:54 +02:00
|
|
|
|