geforkt von Mirrors/Paper
c7f1eed0bf
3beb7729816 a77ed5758a7 52c130fc6d9
40 Zeilen
1.5 KiB
Diff
40 Zeilen
1.5 KiB
Diff
From e71c1d6d248d0248748772d988b16434cc9e4198 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 dafd55c..42b68e5 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
|
@@ -27,7 +27,7 @@ import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
|
|
public class EntityPlayer extends EntityHuman implements ICrafting {
|
|
|
|
private static final Logger bF = 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 6c10b1a..960ad48 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
@@ -1401,6 +1401,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|
getHandle().playerConnection.sendPacket( packet );
|
|
}
|
|
}
|
|
+
|
|
+ @Override
|
|
+ public String getLocale()
|
|
+ {
|
|
+ return getHandle().locale;
|
|
+ }
|
|
};
|
|
|
|
public Player.Spigot spigot()
|
|
--
|
|
2.1.0
|
|
|