2016-03-01 01:23:45 +01:00
|
|
|
From 2514d0515c9a29dafd7394e6c6f0becb9d81334e 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
|
2016-02-29 22:33:06 +01:00
|
|
|
index 6cda7b9..2f1d95b 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
|
2016-02-29 22:33:06 +01:00
|
|
|
@@ -25,7 +25,7 @@ import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
|
2014-07-21 22:46:54 +02:00
|
|
|
public class EntityPlayer extends EntityHuman implements ICrafting {
|
|
|
|
|
2016-02-29 22:33:06 +01:00
|
|
|
private static final Logger bQ = LogManager.getLogger();
|
2014-07-21 22:46:54 +02:00
|
|
|
- private String locale = "en_US";
|
2016-02-29 22:33:06 +01:00
|
|
|
+ public String locale = "en_US"; // Spigot private -> public
|
2014-07-21 22:46:54 +02:00
|
|
|
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
|
2016-02-29 22:33:06 +01:00
|
|
|
index 7c9f8e2..79c9267 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
|
2016-02-29 22:33:06 +01:00
|
|
|
@@ -1494,6 +1494,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()
|
|
|
|
--
|
2016-02-29 22:33:06 +01:00
|
|
|
2.5.0
|
2014-07-21 22:46:54 +02:00
|
|
|
|