From 8e66e52958886ce82b05603f984a452e7b1459d3 Mon Sep 17 00:00:00 2001 From: durron597 Date: Wed, 5 Jan 2011 05:33:32 -0500 Subject: [PATCH 1/3] fixed bug where water wasn't flowing --- src/main/java/net/minecraft/server/BlockFlowing.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/minecraft/server/BlockFlowing.java b/src/main/java/net/minecraft/server/BlockFlowing.java index d5d7ef8f4b..e23ddf19c6 100644 --- a/src/main/java/net/minecraft/server/BlockFlowing.java +++ b/src/main/java/net/minecraft/server/BlockFlowing.java @@ -113,8 +113,8 @@ public class BlockFlowing extends BlockFluids { } // Craftbukkit all four cardinal directions. Do not change the order! BlockFace[] faces = new BlockFace[]{ BlockFace.North, BlockFace.South, BlockFace.East, BlockFace.West }; + int index = 0; for (BlockFace currentFace : faces) { - int index = 0; if (aflag[index]) { BlockFromToEvent event = new BlockFromToEvent(Type.BLOCK_FLOW, source, currentFace); ((WorldServer) world).getServer().getPluginManager().callEvent(event); From 4792d55a08c9cb05a29a75219bdac996bdbee0e5 Mon Sep 17 00:00:00 2001 From: Animosity Date: Wed, 5 Jan 2011 10:47:57 +0800 Subject: [PATCH 2/3] Actually allow cancellation of player chat events --- src/main/java/net/minecraft/server/NetServerHandler.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/net/minecraft/server/NetServerHandler.java b/src/main/java/net/minecraft/server/NetServerHandler.java index 7cfe5ff5f8..2fd1c49f78 100644 --- a/src/main/java/net/minecraft/server/NetServerHandler.java +++ b/src/main/java/net/minecraft/server/NetServerHandler.java @@ -419,6 +419,7 @@ implements ICommandListener { PlayerChatEvent event = new PlayerChatEvent(Type.PLAYER_CHAT, player, s); server.getPluginManager().callEvent(event); s = (new StringBuilder()).append("<").append(event.getPlayer().getName()).append("> ").append(event.getMessage()).toString(); + if (event.isCancelled()) return; // CraftBukkit stop a.info(s); From 786488603efdc6da423cbf3fdd1d7e7372fa4497 Mon Sep 17 00:00:00 2001 From: FrozenCow Date: Tue, 4 Jan 2011 16:22:22 +0800 Subject: [PATCH 3/3] Added Server.getTime and Server.setTime --- src/main/java/org/bukkit/craftbukkit/CraftServer.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java index 216a26b6e5..b8acb6c1f2 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -87,6 +87,14 @@ public final class CraftServer implements Server { return new World[] { console.e.getWorld() }; } + public long getTime() { + return console.e.e; + } + + public void setTime(long time) { + console.e.e = time; + } + public ServerConfigurationManager getHandle() { return server; }