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]); MainUtil.sendMessage(plr, C.INVALID_PLAYER, args[0]);
return false; 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])); MainUtil.sendMessage(plr, C.INVALID_PLAYER.s().replaceAll("%player%", args[0]));
return false; return false;
} }

View File

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