From 4f249b585cc01777619884598c35c55c8861b369 Mon Sep 17 00:00:00 2001 From: Daniel Chesters Date: Sat, 19 Feb 2011 21:29:51 +0100 Subject: [PATCH] Fix encoding in net.minecraft.server files. --- .../net/minecraft/server/MinecraftServer.java | 20 +++++++++---------- .../net/minecraft/server/NetLoginHandler.java | 2 +- .../minecraft/server/NetServerHandler.java | 10 +++++----- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java index 6f16c45c3a..f3c4c97d71 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -185,7 +185,7 @@ public class MinecraftServer implements ICommandListener, Runnable { // Craftbukkit start for (WorldServer world : worlds) { world.a(true, (IProgressUpdate) null); - + Event worldSaved = new WorldEvent( Event.Type.WORLD_SAVED, world.getWorld() ); server.getPluginManager().callEvent( worldSaved ); } @@ -310,14 +310,14 @@ public class MinecraftServer implements ICommandListener, Runnable { } ((CraftScheduler) server.getScheduler()).mainThreadHeartbeat(this.h); - + for (WorldServer world : worlds) { world.f(); while (world.d()) { ; } - + world.c(); } // Craftbukkit end @@ -366,11 +366,11 @@ public class MinecraftServer implements ICommandListener, Runnable { // Craftbukkit start for (WorldServer world : worlds) { world.a(true, (IProgressUpdate) null); - + Event worldSaved = new WorldEvent( Event.Type.WORLD_SAVED, world.getWorld() ); server.getPluginManager().callEvent( worldSaved ); } - + this.f.d(); // Craftbukkit end @@ -398,11 +398,11 @@ public class MinecraftServer implements ICommandListener, Runnable { s2 = s.substring(s.indexOf(" ")).trim(); this.f.e(s2); this.a(s1, "Opping " + s2); - this.f.a(s2, "§eYou are now op!"); + this.f.a(s2, "\u00A7eYou are now op!"); } else if (s.toLowerCase().startsWith("deop ")) { s2 = s.substring(s.indexOf(" ")).trim(); this.f.f(s2); - this.f.a(s2, "§eYou are no longer op!"); + this.f.a(s2, "\u00A7eYou are no longer op!"); this.a(s1, "De-opping " + s2); } else if (s.toLowerCase().startsWith("ban-ip ")) { s2 = s.substring(s.indexOf(" ")).trim(); @@ -507,14 +507,14 @@ public class MinecraftServer implements ICommandListener, Runnable { } else if (s.toLowerCase().startsWith("say ")) { s = s.substring(s.indexOf(" ")).trim(); a.info("[" + s1 + "] " + s); - this.f.a((Packet) (new Packet3Chat("§d[Server] " + s))); + this.f.a((Packet) (new Packet3Chat("\u00A7d[Server] " + s))); } else if (s.toLowerCase().startsWith("tell ")) { astring = s.split(" "); if (astring.length >= 3) { s = s.substring(s.indexOf(" ")).trim(); s = s.substring(s.indexOf(" ")).trim(); a.info("[" + s1 + "->" + astring[1] + "] " + s); - s = "§7" + s1 + " whispers " + s; + s = "\u00A77" + s1 + " whispers " + s; a.info(s); if (!this.f.a(astring[1], (Packet) (new Packet3Chat(s)))) { icommandlistener.b("There\'s no player by that name online."); @@ -554,7 +554,7 @@ public class MinecraftServer implements ICommandListener, Runnable { private void a(String s, String s1) { String s2 = s + ": " + s1; - this.f.i("§7(" + s2 + ")"); + this.f.i("\u00A77(" + s2 + ")"); a.info(s2); } diff --git a/src/main/java/net/minecraft/server/NetLoginHandler.java b/src/main/java/net/minecraft/server/NetLoginHandler.java index 6347e38968..0714d8ce1a 100644 --- a/src/main/java/net/minecraft/server/NetLoginHandler.java +++ b/src/main/java/net/minecraft/server/NetLoginHandler.java @@ -82,7 +82,7 @@ public class NetLoginHandler extends NetHandler { // Craftbukkit start netserverhandler.b((Packet) (new Packet1Login("", "", entityplayer.id, entityplayer.world.u, (byte) entityplayer.world.q.g))); netserverhandler.b((Packet) (new Packet6SpawnPosition(entityplayer.world.spawnX, entityplayer.world.spawnY, entityplayer.world.spawnZ))); - this.e.f.a((Packet) (new Packet3Chat("§e" + entityplayer.name + " joined the game."))); + this.e.f.a((Packet) (new Packet3Chat("\u00A7e" + entityplayer.name + " joined the game."))); this.e.f.a(entityplayer); netserverhandler.a(entityplayer.locX, entityplayer.locY, entityplayer.locZ, entityplayer.yaw, entityplayer.pitch); this.e.c.a(netserverhandler); diff --git a/src/main/java/net/minecraft/server/NetServerHandler.java b/src/main/java/net/minecraft/server/NetServerHandler.java index ec91edfa79..7713d24bf7 100644 --- a/src/main/java/net/minecraft/server/NetServerHandler.java +++ b/src/main/java/net/minecraft/server/NetServerHandler.java @@ -83,7 +83,7 @@ public class NetServerHandler extends NetHandler implements ICommandListener { public void a(String s) { // CraftBukkit start - String leaveMessage = "§e" + this.e.name + " left the game."; + String leaveMessage = "\u00A7e" + this.e.name + " left the game."; PlayerKickEvent kickEvent = new PlayerKickEvent(org.bukkit.event.Event.Type.PLAYER_KICK, server.getPlayer(this.e), s, leaveMessage); server.getPluginManager().callEvent(kickEvent); if (kickEvent.isCancelled()) { @@ -551,7 +551,7 @@ public class NetServerHandler extends NetHandler implements ICommandListener { public void a(String s, Object[] aobject) { a.info(this.e.name + " lost connection: " + s); - this.d.f.a((Packet) (new Packet3Chat("§e" + this.e.name + " left the game."))); + this.d.f.a((Packet) (new Packet3Chat("\u00A7e" + this.e.name + " left the game."))); this.d.f.c(this.e); this.c = true; } @@ -669,10 +669,10 @@ public class NetServerHandler extends NetHandler implements ICommandListener { if (astring.length >= 3) { s = s.substring(s.indexOf(" ")).trim(); s = s.substring(s.indexOf(" ")).trim(); - s = "§7" + this.e.name + " whispers " + s; + s = "\u00A77" + this.e.name + " whispers " + s; a.info(s + " to " + astring[1]); if (!this.d.f.a(astring[1], (Packet) (new Packet3Chat(s)))) { - this.b((Packet) (new Packet3Chat("§cThere\'s no player by that name online."))); + this.b((Packet) (new Packet3Chat("\u00A7cThere\'s no player by that name online."))); } } } else { @@ -729,7 +729,7 @@ public class NetServerHandler extends NetHandler implements ICommandListener { } public void b(String s) { - this.b((Packet) (new Packet3Chat("§7" + s))); + this.b((Packet) (new Packet3Chat("\u00A77" + s))); } public String c() {