mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-01-19 16:59:36 +01:00
template
This commit is contained in:
parent
81f3e6ef24
commit
0e9e813dbf
@ -29,6 +29,7 @@ import com.intellectualcrafters.plot.PlotSquared;
|
|||||||
import com.intellectualcrafters.plot.config.C;
|
import com.intellectualcrafters.plot.config.C;
|
||||||
import com.intellectualcrafters.plot.object.PlotPlayer;
|
import com.intellectualcrafters.plot.object.PlotPlayer;
|
||||||
import com.intellectualcrafters.plot.object.PlotWorld;
|
import com.intellectualcrafters.plot.object.PlotWorld;
|
||||||
|
import com.intellectualcrafters.plot.util.BlockManager;
|
||||||
import com.intellectualcrafters.plot.util.MainUtil;
|
import com.intellectualcrafters.plot.util.MainUtil;
|
||||||
|
|
||||||
public class Template extends SubCommand {
|
public class Template extends SubCommand {
|
||||||
@ -42,9 +43,9 @@ public class Template extends SubCommand {
|
|||||||
MainUtil.sendMessage(plr, C.COMMAND_SYNTAX, "/plot template <import|export> <world>");
|
MainUtil.sendMessage(plr, C.COMMAND_SYNTAX, "/plot template <import|export> <world>");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
final World world = Bukkit.getWorld(args[1]);
|
String world = args[1];
|
||||||
final PlotWorld plotworld = PlotSquared.getPlotWorld(args[1]);
|
final PlotWorld plotworld = PlotSquared.getPlotWorld(world);
|
||||||
if ((world == null) || (plotworld == null)) {
|
if (!BlockManager.manager.isWorld(world) || (plotworld == null)) {
|
||||||
MainUtil.sendMessage(plr, C.NOT_VALID_PLOT_WORLD);
|
MainUtil.sendMessage(plr, C.NOT_VALID_PLOT_WORLD);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user