13
0
geforkt von Mirrors/Paper
Paper/CraftBukkit-Patches/0101-Implement-Locale-Getter-for-Players.patch

40 Zeilen
1.6 KiB
Diff

2014-03-09 23:14:45 +01:00
From 271c82210bf71b7fe7d09c1cb50717100fec9f43 Mon Sep 17 00:00:00 2001
2014-02-01 08:12:22 +01: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
index 9b853a9..95dbeb9 100644
2014-02-01 08:12:22 +01: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 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
2014-02-12 14:48:26 +01:00
index a717d34..53c8a0b 100644
2014-02-01 08:12:22 +01:00
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
2014-02-12 14:48:26 +01:00
@@ -1292,6 +1292,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
2014-02-01 08:12:22 +01:00
server.getServer().getPlayerList().moveToWorld( getHandle(), 0, false );
}
}
+
+ @Override
+ public String getLocale()
+ {
+ return getHandle().locale;
+ }
};
public Player.Spigot spigot()
--
2014-03-09 22:37:28 +01:00
1.8.3.2
2014-02-01 08:12:22 +01:00