diff --git a/src/main/java/org/dynmap/DynmapBlockListener.java b/src/main/java/org/dynmap/DynmapBlockListener.java index 23e62d50..af334b3b 100644 --- a/src/main/java/org/dynmap/DynmapBlockListener.java +++ b/src/main/java/org/dynmap/DynmapBlockListener.java @@ -1,14 +1,12 @@ package org.dynmap; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Iterator; -import java.util.logging.Logger; -import org.bukkit.*; -import org.bukkit.event.block.*; +import org.bukkit.block.Block; +import org.bukkit.block.BlockDamageLevel; +import org.bukkit.event.block.BlockDamageEvent; +import org.bukkit.event.block.BlockListener; +import org.bukkit.event.block.BlockPlaceEvent; public class DynmapBlockListener extends BlockListener { - private static final Logger log = Logger.getLogger("Minecraft"); private MapManager mgr; public DynmapBlockListener(MapManager mgr) { @@ -16,13 +14,13 @@ public class DynmapBlockListener extends BlockListener { } @Override - public void onBlockPlaced(BlockPlacedEvent event) { - Block blockPlaced = event.getBlock(); + public void onBlockPlaced(BlockPlaceEvent event) { + Block blockPlaced = event.getBlockPlaced(); mgr.touch(blockPlaced.getX(), blockPlaced.getY(), blockPlaced.getZ()); } @Override - public void onBlockDamaged(BlockDamagedEvent event) { + public void onBlockDamaged(BlockDamageEvent event) { if (event.getDamageLevel() == BlockDamageLevel.BROKEN) { Block blockBroken = event.getBlock(); mgr.touch(blockBroken.getX(), blockBroken.getY(), blockBroken.getZ()); diff --git a/src/main/java/org/dynmap/DynmapPlayerListener.java b/src/main/java/org/dynmap/DynmapPlayerListener.java index 592e93e8..649b3ef1 100644 --- a/src/main/java/org/dynmap/DynmapPlayerListener.java +++ b/src/main/java/org/dynmap/DynmapPlayerListener.java @@ -1,12 +1,10 @@ package org.dynmap; -import java.util.logging.Logger; -import org.bukkit.*; +import org.bukkit.entity.Player; import org.bukkit.event.player.PlayerChatEvent; import org.bukkit.event.player.PlayerListener; public class DynmapPlayerListener extends PlayerListener { - private static final Logger log = Logger.getLogger("Minecraft"); private MapManager mgr; public DynmapPlayerListener(MapManager mgr) { diff --git a/src/main/java/org/dynmap/DynmapPlugin.java b/src/main/java/org/dynmap/DynmapPlugin.java index 3ecf43d0..d5ac0942 100644 --- a/src/main/java/org/dynmap/DynmapPlugin.java +++ b/src/main/java/org/dynmap/DynmapPlugin.java @@ -11,7 +11,6 @@ import org.bukkit.event.block.BlockListener; import org.bukkit.plugin.*; import org.bukkit.plugin.java.*; import org.dynmap.debug.BukkitPlayerDebugger; -import org.dynmap.debug.NullDebugger; public class DynmapPlugin extends JavaPlugin { diff --git a/src/main/java/org/dynmap/Map.java b/src/main/java/org/dynmap/Map.java index 46e7643c..a976149e 100644 --- a/src/main/java/org/dynmap/Map.java +++ b/src/main/java/org/dynmap/Map.java @@ -1,6 +1,5 @@ package org.dynmap; -import org.bukkit.Block; import org.bukkit.Location; import org.bukkit.World; import org.dynmap.debug.Debugger; diff --git a/src/main/java/org/dynmap/MapManager.java b/src/main/java/org/dynmap/MapManager.java index 73c00a18..e4619d8a 100644 --- a/src/main/java/org/dynmap/MapManager.java +++ b/src/main/java/org/dynmap/MapManager.java @@ -1,46 +1,12 @@ package org.dynmap; -import java.awt.Color; -import java.awt.Graphics2D; -import java.awt.Image; -import java.awt.Insets; -import java.awt.RenderingHints; -import java.awt.image.BufferedImage; -import java.awt.image.WritableRaster; -import java.io.BufferedInputStream; import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.OutputStreamWriter; -import java.io.UnsupportedEncodingException; -import java.io.Writer; -import java.net.MalformedURLException; -import java.net.URL; -import java.util.Collection; -import java.util.Comparator; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; -import java.util.LinkedList; -import java.util.List; -import java.util.ListIterator; -import java.util.Map; -import java.util.NoSuchElementException; -import java.util.Scanner; -import java.util.Vector; -import java.util.logging.Level; import java.util.logging.Logger; -import org.bukkit.*; +import org.bukkit.Location; +import org.bukkit.World; import org.dynmap.debug.Debugger; -import org.dynmap.kzedmap.CaveTileRenderer; -import org.dynmap.kzedmap.DefaultTileRenderer; import org.dynmap.kzedmap.KzedMap; -import org.dynmap.kzedmap.MapTileRenderer; - -import javax.imageio.ImageIO; public class MapManager extends Thread { protected static final Logger log = Logger.getLogger("Minecraft"); diff --git a/src/main/java/org/dynmap/WebServer.java b/src/main/java/org/dynmap/WebServer.java index 2b6c9b82..92b43956 100644 --- a/src/main/java/org/dynmap/WebServer.java +++ b/src/main/java/org/dynmap/WebServer.java @@ -1,13 +1,14 @@ package org.dynmap; -import java.io.*; -import java.net.*; -import java.util.*; -import org.bukkit.*; -import org.dynmap.debug.Debugger; - +import java.io.IOException; +import java.net.InetAddress; +import java.net.ServerSocket; +import java.net.Socket; import java.util.logging.Logger; +import org.bukkit.Server; +import org.dynmap.debug.Debugger; + public class WebServer extends Thread { public static final String VERSION = "Huncraft"; diff --git a/src/main/java/org/dynmap/WebServerRequest.java b/src/main/java/org/dynmap/WebServerRequest.java index e9163f9e..63bbbd08 100644 --- a/src/main/java/org/dynmap/WebServerRequest.java +++ b/src/main/java/org/dynmap/WebServerRequest.java @@ -10,10 +10,11 @@ import java.io.InputStreamReader; import java.net.Socket; import java.util.Date; import java.util.HashMap; -import java.util.List; import java.util.Map; import java.util.logging.Logger; -import org.bukkit.*; + +import org.bukkit.Server; +import org.bukkit.entity.Player; import org.dynmap.debug.Debugger; public class WebServerRequest extends Thread { diff --git a/src/main/java/org/dynmap/debug/BukkitPlayerDebugger.java b/src/main/java/org/dynmap/debug/BukkitPlayerDebugger.java index 866ad4e5..8ceaa509 100644 --- a/src/main/java/org/dynmap/debug/BukkitPlayerDebugger.java +++ b/src/main/java/org/dynmap/debug/BukkitPlayerDebugger.java @@ -5,7 +5,7 @@ import java.util.logging.Level; import java.util.logging.Logger; import org.bukkit.ChatColor; -import org.bukkit.Player; +import org.bukkit.entity.Player; import org.bukkit.event.Event; import org.bukkit.event.Event.Priority; import org.bukkit.event.player.PlayerChatEvent; @@ -17,7 +17,7 @@ import org.bukkit.plugin.java.JavaPlugin; public class BukkitPlayerDebugger implements Debugger { protected static final Logger log = Logger.getLogger("Minecraft"); - private boolean isLogging = true; + private boolean isLogging = false; private JavaPlugin plugin; private HashSet debugees = new HashSet(); diff --git a/src/main/java/org/dynmap/kzedmap/CaveTileRenderer.java b/src/main/java/org/dynmap/kzedmap/CaveTileRenderer.java index 67bb1ed9..68ef5e79 100644 --- a/src/main/java/org/dynmap/kzedmap/CaveTileRenderer.java +++ b/src/main/java/org/dynmap/kzedmap/CaveTileRenderer.java @@ -1,10 +1,8 @@ package org.dynmap.kzedmap; import java.awt.Color; -import java.util.Map; import org.bukkit.World; -import org.dynmap.MapManager; import org.dynmap.debug.Debugger; public class CaveTileRenderer extends DefaultTileRenderer { diff --git a/src/main/java/org/dynmap/kzedmap/DefaultTileRenderer.java b/src/main/java/org/dynmap/kzedmap/DefaultTileRenderer.java index de9596da..ed646297 100644 --- a/src/main/java/org/dynmap/kzedmap/DefaultTileRenderer.java +++ b/src/main/java/org/dynmap/kzedmap/DefaultTileRenderer.java @@ -1,23 +1,14 @@ package org.dynmap.kzedmap; import java.awt.Color; -import java.awt.Graphics2D; -import java.awt.RenderingHints; import java.awt.image.BufferedImage; import java.awt.image.WritableRaster; import java.io.File; import java.io.IOException; -import java.util.Map; -import java.util.logging.Level; -import java.util.logging.Logger; import javax.imageio.ImageIO; -import org.bukkit.Block; -import org.bukkit.Chunk; import org.bukkit.World; -import org.dynmap.MapManager; -import org.dynmap.MapTile; import org.dynmap.debug.Debugger; public class DefaultTileRenderer implements MapTileRenderer { diff --git a/src/main/java/org/dynmap/kzedmap/KzedMap.java b/src/main/java/org/dynmap/kzedmap/KzedMap.java index e6d30de1..2a10dd16 100644 --- a/src/main/java/org/dynmap/kzedmap/KzedMap.java +++ b/src/main/java/org/dynmap/kzedmap/KzedMap.java @@ -6,14 +6,12 @@ import java.io.FileInputStream; import java.io.InputStream; import java.util.HashMap; import java.util.Scanner; -import java.util.logging.Level; import org.bukkit.Location; import org.bukkit.World; import org.dynmap.Map; import org.dynmap.MapManager; import org.dynmap.MapTile; -import org.dynmap.StaleQueue; import org.dynmap.debug.Debugger; public class KzedMap extends Map { diff --git a/src/main/java/org/dynmap/kzedmap/KzedMapTile.java b/src/main/java/org/dynmap/kzedmap/KzedMapTile.java index 9620a071..da4ed069 100644 --- a/src/main/java/org/dynmap/kzedmap/KzedMapTile.java +++ b/src/main/java/org/dynmap/kzedmap/KzedMapTile.java @@ -1,19 +1,7 @@ package org.dynmap.kzedmap; import java.util.logging.Logger; -import java.util.logging.Level; -import java.awt.*; -import java.awt.image.*; - -import java.io.File; -import java.io.IOException; - -import javax.imageio.ImageIO; - -import org.bukkit.Player; -import org.bukkit.World; -import org.bukkit.Server; import org.dynmap.MapTile; public class KzedMapTile extends MapTile { diff --git a/src/main/java/org/dynmap/kzedmap/MapTileRenderer.java b/src/main/java/org/dynmap/kzedmap/MapTileRenderer.java index e6b3dc88..d75dc8aa 100644 --- a/src/main/java/org/dynmap/kzedmap/MapTileRenderer.java +++ b/src/main/java/org/dynmap/kzedmap/MapTileRenderer.java @@ -1,6 +1,5 @@ package org.dynmap.kzedmap; -import org.dynmap.MapTile; public interface MapTileRenderer { String getName(); diff --git a/src/main/java/org/dynmap/kzedmap/ZoomedTileRenderer.java b/src/main/java/org/dynmap/kzedmap/ZoomedTileRenderer.java index 5f806480..24e9e39d 100644 --- a/src/main/java/org/dynmap/kzedmap/ZoomedTileRenderer.java +++ b/src/main/java/org/dynmap/kzedmap/ZoomedTileRenderer.java @@ -3,7 +3,6 @@ package org.dynmap.kzedmap; import java.awt.Graphics2D; import java.awt.RenderingHints; import java.awt.image.BufferedImage; -import java.awt.image.WritableRaster; import java.io.File; import java.io.IOException;