From 0e9e813dbf54765bd00f6f6fcf3193c207850c0b Mon Sep 17 00:00:00 2001 From: boy0001 Date: Sun, 22 Feb 2015 23:47:43 +1100 Subject: [PATCH] template --- .../com/intellectualcrafters/plot/commands/Template.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Template.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Template.java index cad1dd87c..0f18ea275 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Template.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Template.java @@ -29,6 +29,7 @@ import com.intellectualcrafters.plot.PlotSquared; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.object.PlotWorld; +import com.intellectualcrafters.plot.util.BlockManager; import com.intellectualcrafters.plot.util.MainUtil; public class Template extends SubCommand { @@ -42,9 +43,9 @@ public class Template extends SubCommand { MainUtil.sendMessage(plr, C.COMMAND_SYNTAX, "/plot template "); return false; } - final World world = Bukkit.getWorld(args[1]); - final PlotWorld plotworld = PlotSquared.getPlotWorld(args[1]); - if ((world == null) || (plotworld == null)) { + String world = args[1]; + final PlotWorld plotworld = PlotSquared.getPlotWorld(world); + if (!BlockManager.manager.isWorld(world) || (plotworld == null)) { MainUtil.sendMessage(plr, C.NOT_VALID_PLOT_WORLD); return false; }