This commit is contained in:
boy0001 2015-02-21 15:32:01 +11:00
parent 4cf92c4a0a
commit 6c2bce824c
14 changed files with 84 additions and 75 deletions

View file

@ -58,11 +58,11 @@ public class Info extends SubCommand {
if (player != null) {
world = player.getWorld();
if (!PlotSquared.isPlotWorld(world)) {
BukkitPlayerFunctions.sendMessage(player, C.NOT_IN_PLOT_WORLD);
MainUtil.sendMessage(BukkitUtil.getPlayer(player), C.NOT_IN_PLOT_WORLD);
return false;
}
if (!BukkitPlayerFunctions.isInPlot(player)) {
BukkitPlayerFunctions.sendMessage(player, C.NOT_IN_PLOT);
MainUtil.sendMessage(BukkitUtil.getPlayer(player), C.NOT_IN_PLOT);
return false;
}
plot = BukkitPlayerFunctions.getCurrentPlot(player);
@ -73,7 +73,7 @@ public class Info extends SubCommand {
}
final PlotWorld plotworld = PlotSquared.getPlotWorld(args[0]);
if (plotworld == null) {
BukkitPlayerFunctions.sendMessage(player, C.NOT_VALID_WORLD);
MainUtil.sendMessage(BukkitUtil.getPlayer(player), C.NOT_VALID_WORLD);
return false;
}
try {
@ -81,7 +81,7 @@ public class Info extends SubCommand {
final PlotId id = new PlotId(Integer.parseInt(split[0]), Integer.parseInt(split[1]));
plot = MainUtil.getPlot(Bukkit.getWorld(plotworld.worldname), id);
if (plot == null) {
BukkitPlayerFunctions.sendMessage(player, C.NOT_VALID_PLOT_ID);
MainUtil.sendMessage(BukkitUtil.getPlayer(player), C.NOT_VALID_PLOT_ID);
return false;
}
world = Bukkit.getWorld(args[0]);
@ -91,7 +91,7 @@ public class Info extends SubCommand {
args = new String[0];
}
} catch (final Exception e) {
BukkitPlayerFunctions.sendMessage(player, C.INFO_SYNTAX_CONSOLE);
MainUtil.sendMessage(BukkitUtil.getPlayer(player), C.INFO_SYNTAX_CONSOLE);
return false;
}
}
@ -109,7 +109,7 @@ public class Info extends SubCommand {
}
// Unclaimed?
if (!hasOwner && !containsEveryone && !trustedEveryone) {
BukkitPlayerFunctions.sendMessage(player, C.PLOT_INFO_UNCLAIMED, (plot.id.x + ";" + plot.id.y));
MainUtil.sendMessage(BukkitUtil.getPlayer(player), C.PLOT_INFO_UNCLAIMED, (plot.id.x + ";" + plot.id.y));
return true;
}
String owner = "none";
@ -123,13 +123,13 @@ public class Info extends SubCommand {
if (args.length == 1) {
info = getCaption(args[0].toLowerCase());
if (info == null) {
BukkitPlayerFunctions.sendMessage(player, "&6Categories&7: &ahelpers&7, &aalias&7, &abiome&7, &adenied&7, &aflags&7, &aid&7, &asize&7, &atrusted&7, &aowner&7, &arating");
MainUtil.sendMessage(BukkitUtil.getPlayer(player), "&6Categories&7: &ahelpers&7, &aalias&7, &abiome&7, &adenied&7, &aflags&7, &aid&7, &asize&7, &atrusted&7, &aowner&7, &arating");
return false;
}
}
info = format(info, world, plot, player);
BukkitPlayerFunctions.sendMessage(player, C.PLOT_INFO_HEADER);
BukkitPlayerFunctions.sendMessage(player, info, false);
MainUtil.sendMessage(BukkitUtil.getPlayer(player), C.PLOT_INFO_HEADER);
MainUtil.sendMessage(BukkitUtil.getPlayer(player), info, false);
return true;
}