mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2025-02-12 03:59:22 +00:00
safety
This commit is contained in:
parent
a3c8ba84ab
commit
7522184a34
1 changed files with 4 additions and 5 deletions
|
@ -36,6 +36,10 @@ import org.bukkit.entity.Player;
|
|||
|
||||
@Override
|
||||
public boolean execute(final Player plr, final String... args) {
|
||||
if (plr != null) {
|
||||
PlayerFunctions.sendMessage(plr, (C.NOT_CONSOLE));
|
||||
return false;
|
||||
}
|
||||
if (args.length != 2) {
|
||||
if (args.length == 1) {
|
||||
try {
|
||||
|
@ -43,11 +47,6 @@ import org.bukkit.entity.Player;
|
|||
final String world = split[0];
|
||||
final PlotId id = new PlotId(Integer.parseInt(split[1]), Integer.parseInt(split[2]));
|
||||
|
||||
if (plr != null) {
|
||||
PlayerFunctions.sendMessage(plr, (C.NOT_CONSOLE));
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!PlotMain.isPlotWorld(world)) {
|
||||
PlayerFunctions.sendMessage(null, C.NOT_VALID_PLOT_WORLD);
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue