kick check

This commit is contained in:
boy0001 2015-03-31 16:43:17 +11:00
parent c2acdc5f5c
commit dabc551cc1
2 changed files with 6 additions and 1 deletions

View File

@ -55,7 +55,8 @@ public class Kick extends SubCommand {
MainUtil.sendMessage(plr, C.INVALID_PLAYER, args[0]);
return false;
}
if (!player.getLocation().getWorld().equals(loc.getWorld()) || !plot.equals(MainUtil.getPlot(loc))) {
Location otherLoc = player.getLocation();
if (!plr.getLocation().getWorld().equals(otherLoc.getWorld()) || !plot.equals(MainUtil.getPlot(otherLoc))) {
MainUtil.sendMessage(plr, C.INVALID_PLAYER.s().replaceAll("%player%", args[0]));
return false;
}

View File

@ -95,6 +95,7 @@ public class PlotMeConverter {
final Set<String> worlds = plotConfig.getConfigurationSection("worlds").getKeys(false);
stmt = connection.createStatement();
r = stmt.executeQuery("SELECT * FROM `plotmePlots`");
// TODO check if r contains UUID collumn -> assign var
while (r.next()) {
count++;
final PlotId id = new PlotId(r.getInt("idX"), r.getInt("idZ"));
@ -110,6 +111,7 @@ public class PlotMeConverter {
if (name.equals("*")) {
owner = DBFunc.everyone;
} else {
// TODO check PlotMe table for UUID
sendMessage("&cCould not identify owner for plot: " + id + " -> '" + name + "'");
continue;
}
@ -128,6 +130,7 @@ public class PlotMeConverter {
if (name.equals("*")) {
helper = DBFunc.everyone;
} else {
// TODO check PlotMe table for UUID
sendMessage("&6Could not identify helper for plot: " + id);
continue;
}
@ -147,6 +150,7 @@ public class PlotMeConverter {
if (name.equals("*")) {
denied = DBFunc.everyone;
} else {
// TODO check PlotMe table for UUID
sendMessage("&6Could not identify denied for plot: " + id);
continue;
}