From c22a4769089bedd58360b7b354ec811271187e21 Mon Sep 17 00:00:00 2001 From: boy0001 Date: Sat, 8 Nov 2014 12:01:12 +1100 Subject: [PATCH] incremented version number --- .../src/main/java/com/intellectualcrafters/plot/PWE.java | 2 +- .../com/intellectualcrafters/plot/database/SQLManager.java | 4 ++-- .../intellectualcrafters/plot/listeners/PlayerEvents.java | 6 +++++- PlotSquared/src/main/resources/plugin.yml | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/PWE.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/PWE.java index 2a0039340..8c4942c00 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/PWE.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/PWE.java @@ -49,7 +49,7 @@ public class PWE { final Location bloc = PlotHelper.getPlotBottomLoc(w, plot.id); final Location tloc = PlotHelper.getPlotTopLoc(w, plot.id); - final Vector bvec = new Vector(bloc.getBlockX() + 1, bloc.getBlockY() + 1, bloc.getBlockZ() + 1); + final Vector bvec = new Vector(bloc.getBlockX() + 1, bloc.getBlockY(), bloc.getBlockZ() + 1); final Vector tvec = new Vector(tloc.getBlockX(), tloc.getBlockY(), tloc.getBlockZ()); final LocalWorld lw = PlotMain.worldEdit.wrapPlayer(p).getWorld(); diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/database/SQLManager.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/database/SQLManager.java index 5c823e634..09dc80d71 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/database/SQLManager.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/database/SQLManager.java @@ -571,7 +571,7 @@ public class SQLManager extends AbstractDB { if (element.contains(":")) { final String[] split = element.split(":"); try { - flags.add(new Flag(FlagManager.getFlag(split[0], true), split[1])); + flags.add(new Flag(FlagManager.getFlag(split[0], true), split[1].replace("´", ",").replace("¯", ":"))); } catch (final Exception e) { exception = true; @@ -649,7 +649,7 @@ public class SQLManager extends AbstractDB { if (i != 0) { flag_string.append(","); } - flag_string.append(flag.getKey() + ":" + flag.getValue()); + flag_string.append(flag.getKey() + ":" + flag.getValue().replace(",", "´").replace(":", "¯")); i++; } runTask(new Runnable() { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java index 6e7b1019b..a0f2772ad 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java @@ -176,6 +176,10 @@ public class PlayerEvents extends com.intellectualcrafters.plot.listeners.PlotLi return; } if (isInPlot(event.getBlock().getLocation())) { + if (event.getBlock().getY()==0) { + event.setCancelled(true); + return; + } final Plot plot = getCurrentPlot(event.getBlock().getLocation()); if (!plot.hasRights(event.getPlayer())) { event.setCancelled(true); @@ -408,7 +412,7 @@ public class PlayerEvents extends com.intellectualcrafters.plot.listeners.PlotLi if (event.getClickedBlock() == null) { return; } - final World world = event.getPlayer().getWorld(); + final World world = event.getPlayer().getWorld(); if (!isPlotWorld(world)) { return; } diff --git a/PlotSquared/src/main/resources/plugin.yml b/PlotSquared/src/main/resources/plugin.yml index 0971c5d4f..a3c350278 100644 --- a/PlotSquared/src/main/resources/plugin.yml +++ b/PlotSquared/src/main/resources/plugin.yml @@ -1,6 +1,6 @@ name: PlotSquared main: com.intellectualcrafters.plot.PlotMain -version: 2.2.1 +version: 2.2.2 load: STARTUP description: > Easy, yet powerful Plot World generation and management.