Archiviert
13
0

Implement Locale Getter for Players

Dieser Commit ist enthalten in:
Smove 2014-02-01 18:12:22 +11:00 committet von md_5
Ursprung 16afc3b31c
Commit b4530237fb
4 geänderte Dateien mit 75 neuen und 6 gelöschten Zeilen

Datei anzeigen

@ -0,0 +1,30 @@
From a75411c70903a67ed6353397dc4513551fb61d7a Mon Sep 17 00:00:00 2001
From: Smove <jan@lavasurvival.net>
Date: Sat, 1 Feb 2014 18:10:49 +1100
Subject: [PATCH] Implement Locale Getter for Players
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index adef230..8489bc9 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1067,6 +1067,16 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
{
throw new UnsupportedOperationException( "Not supported yet." );
}
+
+ /**
+ * Gets player locale language.
+ *
+ * @return the player's client language settings
+ */
+ public String getLocale()
+ {
+ throw new UnsupportedOperationException( "Not supported yet." );
+ }
}
Spigot spigot();
--
1.8.3.2

Datei anzeigen

@ -1,14 +1,14 @@
From 45a1459ce02062300b758f2053a689b87f074ac0 Mon Sep 17 00:00:00 2001
From d206e513d6dcf5b1cd4278d5fb2742915385bc41 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Fri, 28 Jun 2013 19:52:54 +1000
Subject: [PATCH] Disallow Interaction With Self
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 31be464..6e54ad1 100644
index 08cf293..018127b 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1047,6 +1047,13 @@ public class PlayerConnection implements PacketPlayInListener {
@@ -1037,6 +1037,13 @@ public class PlayerConnection implements PacketPlayInListener {
if (this.player.dead) return; // CraftBukkit
WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension);
Entity entity = packetplayinuseentity.a((World) worldserver);

Datei anzeigen

@ -1,14 +1,14 @@
From 5d7b5a54c8934babbd9e8250971df954ecea9c61 Mon Sep 17 00:00:00 2001
From 48e13501d3e0d30e4bcc0a875894254e87f5029b Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sun, 8 Dec 2013 16:52:42 +1100
Subject: [PATCH] Remove OS X Special Chars from Signs
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index e88adfa..1903362 100644
index 733b9d3..a462492 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1562,6 +1562,7 @@ public class PlayerConnection implements PacketPlayInListener {
@@ -1552,6 +1552,7 @@ public class PlayerConnection implements PacketPlayInListener {
for (j = 0; j < 4; ++j) {
boolean flag = true;

Datei anzeigen

@ -0,0 +1,39 @@
From 6b6b2aa138326bf742a1a379b23ae083617ab565 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 a4c8843..ec73994 100644
--- 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
index 16b1fc9..1bb1a8f 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1294,6 +1294,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
server.getServer().getPlayerList().moveToWorld( getHandle(), 0, false );
}
}
+
+ @Override
+ public String getLocale()
+ {
+ return getHandle().locale;
+ }
};
public Player.Spigot spigot()
--
1.8.3.2