Paper/CraftBukkit-Patches/0100-Implement-Locale-Getter-for-Players.patch

40 lines
1.6 KiB
Diff
Raw Normal View History

2014-04-03 22:12:44 +02:00
From 83cf51e11cb329bcf376392d6af7c4921a798e02 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
2014-03-26 21:34:47 +01:00
index c1caca7..ca06f60 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 {
2014-03-23 01:06:43 +01:00
private static final Logger bL = LogManager.getLogger();
2014-02-01 08:12:22 +01: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
2014-04-03 22:12:44 +02:00
index a220aed..9c55316 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-04-03 22:12:44 +02:00
@@ -1358,6 +1358,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
getHandle().playerConnection.sendPacket( packet );
2014-02-01 08:12:22 +01:00
}
}
+
+ @Override
+ public String getLocale()
+ {
+ return getHandle().locale;
+ }
};
public Player.Spigot spigot()
--
2014-04-03 22:12:44 +02:00
1.8.5.2.msysgit.0
2014-02-01 08:12:22 +01:00