Fixed to be compatible with latest Dynmap.

This commit is contained in:
FrozenCow 2011-01-15 23:18:16 +01:00
parent 53e7ab73a0
commit 18a1f484d8
14 changed files with 23 additions and 88 deletions

View File

@ -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());

View File

@ -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) {

View File

@ -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 {

View File

@ -1,6 +1,5 @@
package org.dynmap;
import org.bukkit.Block;
import org.bukkit.Location;
import org.bukkit.World;
import org.dynmap.debug.Debugger;

View File

@ -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");

View File

@ -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";

View File

@ -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 {

View File

@ -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<Player> debugees = new HashSet<Player>();

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -1,6 +1,5 @@
package org.dynmap.kzedmap;
import org.dynmap.MapTile;
public interface MapTileRenderer {
String getName();

View File

@ -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;