mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-23 05:36:45 +01:00
safety
This commit is contained in:
parent
a3c8ba84ab
commit
7522184a34
@ -36,6 +36,10 @@ import org.bukkit.entity.Player;
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean execute(final Player plr, final String... args) {
|
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 != 2) {
|
||||||
if (args.length == 1) {
|
if (args.length == 1) {
|
||||||
try {
|
try {
|
||||||
@ -43,11 +47,6 @@ import org.bukkit.entity.Player;
|
|||||||
final String world = split[0];
|
final String world = split[0];
|
||||||
final PlotId id = new PlotId(Integer.parseInt(split[1]), Integer.parseInt(split[2]));
|
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)) {
|
if (!PlotMain.isPlotWorld(world)) {
|
||||||
PlayerFunctions.sendMessage(null, C.NOT_VALID_PLOT_WORLD);
|
PlayerFunctions.sendMessage(null, C.NOT_VALID_PLOT_WORLD);
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user