mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-11-04 17:50:18 +01:00
Code cleanup.
This commit is contained in:
parent
29a3391ed8
commit
0657d9c559
@ -15,7 +15,6 @@ import org.bukkit.Server;
|
|||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.util.config.Configuration;
|
import org.bukkit.util.config.Configuration;
|
||||||
import org.dynmap.Event;
|
|
||||||
import org.dynmap.web.Json;
|
import org.dynmap.web.Json;
|
||||||
import org.json.simple.JSONArray;
|
import org.json.simple.JSONArray;
|
||||||
import org.json.simple.JSONObject;
|
import org.json.simple.JSONObject;
|
||||||
@ -45,16 +44,14 @@ class JsonTimerTask extends TimerTask {
|
|||||||
File outputFile;
|
File outputFile;
|
||||||
|
|
||||||
//Handles Reading WebChat
|
//Handles Reading WebChat
|
||||||
if(configuration.getNode("web").getBoolean("allowwebchat", false))
|
if (configuration.getNode("web").getBoolean("allowwebchat", false)) {
|
||||||
{
|
|
||||||
File webChatPath = new File(this.configuration.getString("webpath", "web"), "standalone/dynmap_webchat.json");
|
File webChatPath = new File(this.configuration.getString("webpath", "web"), "standalone/dynmap_webchat.json");
|
||||||
if (webChatPath.isAbsolute())
|
if (webChatPath.isAbsolute())
|
||||||
outputFile = webChatPath;
|
outputFile = webChatPath;
|
||||||
else {
|
else {
|
||||||
outputFile = new File(plugin.getDataFolder(), webChatPath.toString());
|
outputFile = new File(plugin.getDataFolder(), webChatPath.toString());
|
||||||
}
|
}
|
||||||
if(webChatPath.exists() && lastTimestamp != 0)
|
if (webChatPath.exists() && lastTimestamp != 0) {
|
||||||
{
|
|
||||||
JSONArray jsonMsgs = null;
|
JSONArray jsonMsgs = null;
|
||||||
try {
|
try {
|
||||||
FileReader inputFileReader = new FileReader(webChatPath);
|
FileReader inputFileReader = new FileReader(webChatPath);
|
||||||
@ -70,8 +67,7 @@ class JsonTimerTask extends TimerTask {
|
|||||||
Iterator iter = jsonMsgs.iterator();
|
Iterator iter = jsonMsgs.iterator();
|
||||||
while (iter.hasNext()) {
|
while (iter.hasNext()) {
|
||||||
JSONObject o = (JSONObject) iter.next();
|
JSONObject o = (JSONObject) iter.next();
|
||||||
if(Long.parseLong(String.valueOf(o.get("timestamp"))) >= (lastTimestamp))
|
if (Long.parseLong(String.valueOf(o.get("timestamp"))) >= (lastTimestamp)) {
|
||||||
{
|
|
||||||
plugin.webChat(String.valueOf(o.get("name")), String.valueOf(o.get("message")));
|
plugin.webChat(String.valueOf(o.get("name")), String.valueOf(o.get("message")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package org.dynmap.flat;
|
package org.dynmap.flat;
|
||||||
|
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.awt.color.ColorSpace;
|
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import java.awt.image.WritableRaster;
|
import java.awt.image.WritableRaster;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@ -88,7 +87,6 @@ public class FlatMap extends MapType {
|
|||||||
if (c == null)
|
if (c == null)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
||||||
Color.RGBtoHSB(c.getRed(), c.getGreen(), c.getBlue(), hsb);
|
Color.RGBtoHSB(c.getRed(), c.getGreen(), c.getBlue(), hsb);
|
||||||
|
|
||||||
float normalheight = 64;
|
float normalheight = 64;
|
||||||
|
@ -3,7 +3,6 @@ package org.dynmap.web;
|
|||||||
import java.lang.reflect.Array;
|
import java.lang.reflect.Array;
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
import java.lang.reflect.Modifier;
|
import java.lang.reflect.Modifier;
|
||||||
import java.security.KeyStore.Entry;
|
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
Loading…
Reference in New Issue
Block a user