From 61569d52122c9c16f605248ed1781a48c46d64ad Mon Sep 17 00:00:00 2001 From: boy0001 Date: Fri, 27 Mar 2015 21:14:29 +1100 Subject: [PATCH] Fixes #224 --- .../java/com/intellectualcrafters/plot/commands/Kick.java | 2 +- .../intellectualcrafters/plot/listeners/PlayerEvents.java | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Kick.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Kick.java index 3de39de9f..d539629ee 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Kick.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Kick.java @@ -42,7 +42,7 @@ public class Kick extends SubCommand { if (plot == null) { return !sendMessage(plr, C.NOT_IN_PLOT); } - if (((plot == null) || !plot.hasOwner() || !plot.isOwner(UUIDHandler.getUUID(plr))) && !Permissions.hasPermission(plr, "plots.admin.command.kick")) { + if (plot == null || ((!plot.hasOwner() || !plot.isOwner(plr.getUUID())) && !Permissions.hasPermission(plr, "plots.admin.command.kick"))) { MainUtil.sendMessage(plr, C.NO_PLOT_PERMS); return false; } diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java index e728cc71a..fcd40db40 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java @@ -837,8 +837,8 @@ public class PlayerEvents extends com.intellectualcrafters.plot.listeners.PlotLi final Location q = new Location(t.getWorld(), t.getX(), 64, t.getZ()); final Player player = event.getPlayer(); if (isPlotWorld(q)) { - if (isInPlot(q)) { - final Plot plot = getCurrentPlot(q); + final Plot plot = getCurrentPlot(q); + if (plot != null) { final PlotPlayer pp = BukkitUtil.getPlayer(player); if (plot.isDenied(pp.getUUID())) { if (Permissions.hasPermission(pp, "plots.admin.enter.denied")) { @@ -854,8 +854,8 @@ public class PlayerEvents extends com.intellectualcrafters.plot.listeners.PlotLi } } else { if (leftPlot(f, t)) { - final Plot plot = getCurrentPlot(f); - plotExit(player, plot); + final Plot plot2 = getCurrentPlot(f); + plotExit(player, plot2); } } if ((q.getX() >= 29999999) || (q.getX() <= -29999999) || (q.getZ() >= 29999999) || (q.getZ() <= -29999999)) {