From ca1c9ef2e1af3738ef93d712cd4d10e65a7212ac Mon Sep 17 00:00:00 2001 From: Erik Broes Date: Wed, 23 Mar 2011 16:39:25 +0100 Subject: [PATCH] Minor cleanups --- src/main/java/net/minecraft/server/Chunk.java | 3 ++- src/main/java/net/minecraft/server/ConsoleLogManager.java | 5 +++-- src/main/java/net/minecraft/server/EntityCow.java | 2 -- src/main/java/net/minecraft/server/ItemBlock.java | 2 -- src/main/java/net/minecraft/server/ItemBucket.java | 7 ------- src/main/java/net/minecraft/server/ItemInWorldManager.java | 2 +- src/main/java/net/minecraft/server/MinecraftServer.java | 1 - src/main/java/net/minecraft/server/NetServerHandler.java | 6 ++++-- .../net/minecraft/server/ServerConfigurationManager.java | 1 - src/main/java/net/minecraft/server/WorldServer.java | 1 - 10 files changed, 10 insertions(+), 20 deletions(-) diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java index 22920c2e3f..95e5fdcd47 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -7,9 +7,10 @@ import java.util.List; import java.util.Map; import java.util.Random; -// CraftBukkit +// CraftBukkit start import org.bukkit.Location; import org.bukkit.craftbukkit.CraftWorld; +// CraftBukkit end public class Chunk { diff --git a/src/main/java/net/minecraft/server/ConsoleLogManager.java b/src/main/java/net/minecraft/server/ConsoleLogManager.java index 53308077ce..3798a4d358 100644 --- a/src/main/java/net/minecraft/server/ConsoleLogManager.java +++ b/src/main/java/net/minecraft/server/ConsoleLogManager.java @@ -6,10 +6,11 @@ import java.util.logging.FileHandler; import java.util.logging.Level; import java.util.logging.Logger; -import java.util.logging.Handler; // CraftBukkit -import jline.ConsoleReader; +// CraftBukkit start +import java.util.logging.Handler; import org.bukkit.craftbukkit.util.ShortConsoleLogFormatter; import org.bukkit.craftbukkit.util.TerminalConsoleHandler; +// CraftBukkit end public class ConsoleLogManager { diff --git a/src/main/java/net/minecraft/server/EntityCow.java b/src/main/java/net/minecraft/server/EntityCow.java index 9a2fa72ac2..de1f779e6f 100644 --- a/src/main/java/net/minecraft/server/EntityCow.java +++ b/src/main/java/net/minecraft/server/EntityCow.java @@ -2,10 +2,8 @@ package net.minecraft.server; // CraftBukkit start import org.bukkit.Location; -import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.event.CraftEventFactory; import org.bukkit.craftbukkit.inventory.CraftItemStack; -import org.bukkit.entity.Player; import org.bukkit.event.player.PlayerBucketFillEvent; // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/ItemBlock.java b/src/main/java/net/minecraft/server/ItemBlock.java index a7eb4f22e4..4ad9ec1a71 100644 --- a/src/main/java/net/minecraft/server/ItemBlock.java +++ b/src/main/java/net/minecraft/server/ItemBlock.java @@ -1,8 +1,6 @@ package net.minecraft.server; // CraftBukkit start -import org.bukkit.Material; -import org.bukkit.block.BlockFace; import org.bukkit.block.BlockState; import org.bukkit.craftbukkit.block.CraftBlockState; import org.bukkit.craftbukkit.event.CraftEventFactory; diff --git a/src/main/java/net/minecraft/server/ItemBucket.java b/src/main/java/net/minecraft/server/ItemBucket.java index 187a1cedd9..fe9b859f02 100644 --- a/src/main/java/net/minecraft/server/ItemBucket.java +++ b/src/main/java/net/minecraft/server/ItemBucket.java @@ -2,17 +2,10 @@ package net.minecraft.server; // CraftBukkit start import org.bukkit.Location; -import org.bukkit.block.BlockFace; -import org.bukkit.craftbukkit.block.CraftBlock; import org.bukkit.craftbukkit.event.CraftEventFactory; import org.bukkit.craftbukkit.inventory.CraftItemStack; -import org.bukkit.craftbukkit.CraftServer; -import org.bukkit.craftbukkit.CraftWorld; -import org.bukkit.entity.Player; -import org.bukkit.event.Event.Type; import org.bukkit.event.player.PlayerBucketEmptyEvent; import org.bukkit.event.player.PlayerBucketFillEvent; -import org.bukkit.event.player.PlayerItemEvent; // CraftBukkit end public class ItemBucket extends Item { diff --git a/src/main/java/net/minecraft/server/ItemInWorldManager.java b/src/main/java/net/minecraft/server/ItemInWorldManager.java index 6623dc9df8..52acfd3a57 100644 --- a/src/main/java/net/minecraft/server/ItemInWorldManager.java +++ b/src/main/java/net/minecraft/server/ItemInWorldManager.java @@ -14,7 +14,7 @@ public class ItemInWorldManager { private World b; public EntityHuman a; - public float c = 0.0F; // CraftBukkit private -> public + private float c = 0.0F; private int d; private int e = 0; private float f = 0.0F; diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java index a2a8b10e79..476e57ad3b 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -17,7 +17,6 @@ import java.io.PrintStream; import java.net.UnknownHostException; import jline.ConsoleReader; import joptsimple.OptionSet; -import org.bukkit.command.ConsoleCommandSender; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.LoggerOutputStream; import org.bukkit.craftbukkit.command.ColouredConsoleSender; diff --git a/src/main/java/net/minecraft/server/NetServerHandler.java b/src/main/java/net/minecraft/server/NetServerHandler.java index be2ec45856..89979c72a9 100644 --- a/src/main/java/net/minecraft/server/NetServerHandler.java +++ b/src/main/java/net/minecraft/server/NetServerHandler.java @@ -16,7 +16,6 @@ import org.bukkit.craftbukkit.inventory.CraftItemStack; import org.bukkit.craftbukkit.entity.CraftPlayer; import org.bukkit.craftbukkit.event.CraftEventFactory; import org.bukkit.craftbukkit.CraftServer; -import org.bukkit.craftbukkit.TextWrapper; import org.bukkit.entity.Player; import org.bukkit.event.Event.Type; import org.bukkit.event.block.*; @@ -496,11 +495,13 @@ public class NetServerHandler extends NetHandler implements ICommandListener { } public void a(String s, Object[] aobject) { + // CraftBukkit start -- rarely it would send a disconnect line twice if (!this.c) { a.info(this.e.name + " lost connection: " + s); this.d.f.a((Packet) (new Packet3Chat("\u00A7e" + this.e.name + " left the game."))); this.d.f.c(this.e); } + // CraftBukkit end this.c = true; } @@ -841,7 +842,8 @@ public class NetServerHandler extends NetHandler implements ICommandListener { } tileentitysign.h(); - this.e.world.g(i, k, j); // CraftBukkit + // CraftBukkit + this.e.world.g(i, k, j); } } } diff --git a/src/main/java/net/minecraft/server/ServerConfigurationManager.java b/src/main/java/net/minecraft/server/ServerConfigurationManager.java index 6cc6a7a124..f752e8b4da 100644 --- a/src/main/java/net/minecraft/server/ServerConfigurationManager.java +++ b/src/main/java/net/minecraft/server/ServerConfigurationManager.java @@ -14,7 +14,6 @@ import java.util.logging.Logger; // CraftBukkit start import org.bukkit.Location; -import org.bukkit.command.ConsoleCommandSender; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.CraftWorld; import org.bukkit.craftbukkit.command.ColouredConsoleSender; diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java index 157170c408..4b07b047d6 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -5,7 +5,6 @@ import java.util.List; import java.util.Random; // CraftBukkit start -import java.io.File; import org.bukkit.BlockChangeDelegate; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.CraftWorld;