diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 5d90abca9..829e0513f 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -10,8 +10,13 @@
-
+
+
+
+
+
+
@@ -38,8 +43,8 @@
-
-
+
+
@@ -58,38 +63,38 @@
-
-
+
+
-
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
@@ -185,8 +190,6 @@
-
-
@@ -199,6 +202,8 @@
+
+
@@ -285,28 +290,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -329,100 +312,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -654,7 +543,7 @@
-
+
1411382351159
@@ -892,11 +781,15 @@
1414069969139
1414069969139
-
+
+ 1414241164578
+ 1414241164578
+
+
-
+
@@ -934,6 +827,7 @@
+
@@ -945,7 +839,6 @@
-
@@ -994,7 +887,6 @@
-
@@ -1019,7 +911,8 @@
-
+
+
@@ -1238,6 +1131,7 @@
+
@@ -1255,20 +1149,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1377,24 +1257,40 @@
-
-
+
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/PlotSquared/src/com/intellectualcrafters/plot/PlotMain.java b/PlotSquared/src/com/intellectualcrafters/plot/PlotMain.java
index 12e53a0ce..47d7999e3 100644
--- a/PlotSquared/src/com/intellectualcrafters/plot/PlotMain.java
+++ b/PlotSquared/src/com/intellectualcrafters/plot/PlotMain.java
@@ -9,16 +9,10 @@
package com.intellectualcrafters.plot;
import ca.mera.CameraAPI;
-
import com.intellectualcrafters.plot.Logger.LogLevel;
-import com.intellectualcrafters.plot.Settings.Web;
import com.intellectualcrafters.plot.commands.Camera;
import com.intellectualcrafters.plot.commands.MainCommand;
-import com.intellectualcrafters.plot.database.DBFunc;
-import com.intellectualcrafters.plot.database.MySQL;
-import com.intellectualcrafters.plot.database.PlotMeConverter;
-import com.intellectualcrafters.plot.database.SQLManager;
-import com.intellectualcrafters.plot.database.SQLite;
+import com.intellectualcrafters.plot.database.*;
import com.intellectualcrafters.plot.events.PlayerTeleportToPlotEvent;
import com.intellectualcrafters.plot.events.PlotDeleteEvent;
import com.intellectualcrafters.plot.generator.DefaultPlotManager;
@@ -31,10 +25,8 @@ import com.intellectualcrafters.plot.uuid.PlotUUIDSaver;
import com.intellectualcrafters.plot.uuid.UUIDSaver;
import com.sk89q.worldedit.bukkit.WorldEditPlugin;
import com.sk89q.worldguard.bukkit.WorldGuardPlugin;
-
import me.confuser.barapi.BarAPI;
import net.milkbowl.vault.economy.Economy;
-
import org.bukkit.*;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.entity.Entity;
@@ -718,10 +710,6 @@ public class PlotMain extends JavaPlugin {
useEconomy = (economy != null);
getServer().getScheduler().scheduleSyncRepeatingTask(this, new Lag(), 100L, 1L);
- if (Web.ENABLED) {
- sendConsoleSenderMessage(C.PREFIX.s() + "Web Is not implemented yet. Please bear with us.");
- }
-
try {
new SetBlockFast();
PlotHelper.canSetFast = true;
@@ -945,8 +933,6 @@ public class PlotMain extends JavaPlugin {
settings.put("Use Metrics", "" + Settings.METRICS);
settings.put("Delete Plots On Ban", "" + Settings.DELETE_PLOTS_ON_BAN);
settings.put("Mob Pathfinding", "" + Settings.MOB_PATHFINDING);
- settings.put("Web Enabled", "" + Web.ENABLED);
- settings.put("Web Port", "" + Web.PORT);
settings.put("DB Mysql Enabled", "" + Settings.DB.USE_MYSQL);
settings.put("DB SQLite Enabled", "" + Settings.DB.USE_SQLITE);
settings.put("Auto Clear Enabled", "" + Settings.AUTO_CLEAR);
@@ -1077,9 +1063,6 @@ public class PlotMain extends JavaPlugin {
options.put("worldguard.enabled", Settings.WORLDGUARD);
options.put("kill_road_mobs", Settings.KILL_ROAD_MOBS_DEFAULT);
options.put("mob_pathfinding", Settings.MOB_PATHFINDING_DEFAULT);
- options.put("web.enabled", Web.ENABLED);
- options.put("web.directory", "/var/www");
- options.put("web.port", Web.PORT);
options.put("metrics", true);
options.put("debug", true);
options.put("clear.auto.enabled", false);
@@ -1096,9 +1079,6 @@ public class PlotMain extends JavaPlugin {
if (Settings.DEBUG) {
sendConsoleSenderMessage(C.PREFIX.s() + "&6Debug Mode Enabled (Default). Edit the config to turn this off.");
}
- Web.ENABLED = config.getBoolean("web.enabled");
- Web.PORT = config.getInt("web.port");
- Web.PATH = config.getString("web.directory");
Settings.KILL_ROAD_MOBS = config.getBoolean("kill_road_mobs");
Settings.WORLDGUARD = config.getBoolean("worldguard.enabled");
Settings.MOB_PATHFINDING = config.getBoolean("mob_pathfinding");
diff --git a/PlotSquared/src/com/intellectualcrafters/plot/Settings.java b/PlotSquared/src/com/intellectualcrafters/plot/Settings.java
index 29ff27347..6e62b1f11 100644
--- a/PlotSquared/src/com/intellectualcrafters/plot/Settings.java
+++ b/PlotSquared/src/com/intellectualcrafters/plot/Settings.java
@@ -70,12 +70,6 @@ public class Settings {
public static boolean AUTO_UPDATE = false;
}
- public static class Web {
- public static boolean ENABLED = false;
- public static int PORT = 9000;
- public static String PATH = "/var/www";
- }
-
/**
* Database settings
*
diff --git a/PlotSquared/src/com/intellectualcrafters/plot/commands/Set.java b/PlotSquared/src/com/intellectualcrafters/plot/commands/Set.java
index e5eac2f8c..2fe1f8f67 100644
--- a/PlotSquared/src/com/intellectualcrafters/plot/commands/Set.java
+++ b/PlotSquared/src/com/intellectualcrafters/plot/commands/Set.java
@@ -366,13 +366,13 @@ public class Set extends SubCommand {
}
catch (Exception e) {
}
- if (FlagManager.getFlags().contains(af) || ((PlotMain.worldGuardListener != null) && PlotMain.worldGuardListener.str_flags.contains(args[1].toLowerCase()))) {
+ if (FlagManager.getFlags().contains(af)) {
StringBuilder a = new StringBuilder();
if(args.length > 1) {
for(int x = 1; x < args.length; x++)
- a.append(" " + args[x]);
+ a.append(" ").append(args[x]);
}
- plr.performCommand("plot set flag " + args[0] + args);
+ plr.performCommand("plot set flag " + args[0] + a.toString());
return true;
}
}
diff --git a/PlotSquared/src/com/intellectualsites/web/IndexHandler.java b/PlotSquared/src/com/intellectualsites/web/IndexHandler.java
deleted file mode 100644
index 2eb358ff5..000000000
--- a/PlotSquared/src/com/intellectualsites/web/IndexHandler.java
+++ /dev/null
@@ -1,98 +0,0 @@
-package com.intellectualsites.web;
-
-import java.io.PrintStream;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.bukkit.plugin.java.JavaPlugin;
-import org.simpleframework.http.Request;
-import org.simpleframework.http.Response;
-import org.simpleframework.http.core.Container;
-
-/**
- * Created by Citymonstret on 2014-09-20.
- */
-public class IndexHandler implements Container {
-
- private JavaPlugin plugin;
- private String title;
-
- public IndexHandler(JavaPlugin plugin, String title) {
- this.plugin = plugin;
- this.title = title;
- }
-
- @Override
- public void handle(Request request, Response response) {
- try {
- PrintStream body;
- long time;
- String coverage;
-
- body = response.getPrintStream();
- time = System.currentTimeMillis();
- request.getQuery();
- request.getPath();
-
- if ((request.getInteger("page")) < 0) {
- }
- if (((coverage = request.getTarget()) == null) || coverage.equals("/")) {
- coverage = "index";
- }
-
- coverage = coverage.toLowerCase();
-
- List list = new ArrayList<>(Arrays.asList(new String[] { "install", "index", "stylesheet" }));
-
- if (!list.contains(coverage)) {
- coverage = "index";
- }
-
- if (coverage.equals("stylesheet")) {
- response.setValue("Content-Type", "text/css");
- response.setValue("Server", "PlotWeb/1.0 (Simple 5.0)");
- response.setDate("Date", time);
- response.setDate("Last-Modified", time);
-
- ResourceHandler stylesheet =
- new ResourceHandler("stylesheet", ResourceHandler.FileType.CSS, this.plugin.getDataFolder());
-
- String stylesheetHTML = stylesheet.getHTML();
-
- stylesheet.done();
-
- body.print(stylesheetHTML);
- }
- else {
- response.setValue("Content-Type", "html");
- response.setValue("Server", "PlotWeb/1.0 (Simple 5.0)");
- response.setDate("Date", time);
- response.setDate("Last-Modified", time);
-
- ResourceHandler header =
- new ResourceHandler("header", ResourceHandler.FileType.HTML, this.plugin.getDataFolder());
- ResourceHandler footer =
- new ResourceHandler("footer", ResourceHandler.FileType.HTML, this.plugin.getDataFolder());
- ResourceHandler cPage =
- new ResourceHandler(coverage, ResourceHandler.FileType.HTML, this.plugin.getDataFolder());
-
- String headerHTML = header.getHTML().replace("@title", this.title);
- String footerHTML = footer.getHTML();
- String cPageHTML = cPage.getHTML();
-
- header.done();
- footer.done();
- cPage.done();
-
- body.print(headerHTML);
- body.print(cPageHTML);
- body.print(footerHTML);
- }
- body.close();
- }
- catch (Exception e) {
- e.printStackTrace();
- }
- }
-}
diff --git a/PlotSquared/src/com/intellectualsites/web/PlotWeb.java b/PlotSquared/src/com/intellectualsites/web/PlotWeb.java
deleted file mode 100644
index fb9260710..000000000
--- a/PlotSquared/src/com/intellectualsites/web/PlotWeb.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package com.intellectualsites.web;
-
-import java.net.InetSocketAddress;
-import java.net.SocketAddress;
-
-import org.bukkit.plugin.java.JavaPlugin;
-import org.simpleframework.http.core.Container;
-import org.simpleframework.http.core.ContainerServer;
-import org.simpleframework.transport.Server;
-import org.simpleframework.transport.connect.Connection;
-import org.simpleframework.transport.connect.SocketConnection;
-
-import com.intellectualcrafters.plot.PlotMain;
-
-/**
- * Created by Citymonstret on 2014-09-20.
- */
-public class PlotWeb {
-
- // TODO instructions on how to setup and use PlotWeb.
-
- public static PlotWeb PLOTWEB;
-
- private String title;
- private int port;
- private Server server;
- private Connection connection;
- private Container container;
- private SocketAddress address;
-
- public PlotWeb(String title, int port) {
- this.title = title;
- this.port = port;
- }
-
- public void start() throws Exception {
- this.container = new IndexHandler(JavaPlugin.getPlugin(PlotMain.class), this.title);
- this.server = new ContainerServer(this.container);
- this.connection = new SocketConnection(this.server);
- this.address = new InetSocketAddress(this.port);
-
- this.connection.connect(this.address);
- PLOTWEB = this;
- }
-
- public void stop() throws Exception {
- this.connection.close();
- PLOTWEB = null;
- }
-}
diff --git a/PlotSquared/src/com/intellectualsites/web/ResourceHandler.java b/PlotSquared/src/com/intellectualsites/web/ResourceHandler.java
deleted file mode 100644
index ceb93fbf6..000000000
--- a/PlotSquared/src/com/intellectualsites/web/ResourceHandler.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package com.intellectualsites.web;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.InputStreamReader;
-
-/**
- * Created by Citymonstret on 2014-09-20.
- */
-public class ResourceHandler {
-
- private File file;
- private BufferedReader reader;
-
- public ResourceHandler(String filePath, FileType fileType, File folder) throws Exception {
- if (fileType == FileType.CSS) {
- this.file =
- new File(folder.toPath().toString() + File.separator + "web" + File.separator + "css"
- + File.separator + filePath + "." + fileType.toString());
- }
- else {
- this.file =
- new File(folder.toPath().toString() + File.separator + "web" + File.separator + filePath + "."
- + fileType.toString());
- }
- }
-
- public String getHTML() throws Exception {
- StringBuilder html = new StringBuilder();
- this.reader = new BufferedReader(new InputStreamReader(new FileInputStream(this.file)));
- String line = "";
- while ((line = this.reader.readLine()) != null) {
- html.append(line);
- }
- return html.toString();
- }
-
- public void done() throws Exception {
- this.reader.close();
- }
-
- public static enum FileType {
- CSS("css"),
- HTML("html"),
- JS("js");
-
- private String ext;
-
- FileType(String ext) {
- this.ext = ext;
- }
-
- @Override
- public String toString() {
- return this.ext;
- }
- }
-}
diff --git a/PlotSquared/src/com/intellectualsites/web/Test.java b/PlotSquared/src/com/intellectualsites/web/Test.java
deleted file mode 100644
index 3691e3857..000000000
--- a/PlotSquared/src/com/intellectualsites/web/Test.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.intellectualsites.web;
-
-/**
- * Created by Citymonstret on 2014-09-20.
- */
-public class Test {
-
- public static void main(String[] args) {
- try {
- new PlotWeb("Test", 9000).start();
- }
- catch (Exception e) {
- e.printStackTrace();
- }
- }
-
-}