mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 12:35:15 +01:00
Fixed helper issue
This commit is contained in:
parent
00b50a3b9c
commit
eeb2e90042
@ -6,7 +6,7 @@
|
||||
<groupId>com.intellectualcrafters</groupId>
|
||||
|
||||
<artifactId>PlotSquared</artifactId>
|
||||
<version>2.3.5</version>
|
||||
<version>2.3.6</version>
|
||||
<name>PlotSquared</name>
|
||||
<packaging>jar</packaging>
|
||||
<build>
|
||||
|
@ -21,12 +21,14 @@
|
||||
|
||||
package com.intellectualcrafters.plot.commands;
|
||||
|
||||
import com.intellectualcrafters.plot.PlotMain;
|
||||
import com.intellectualcrafters.plot.config.C;
|
||||
import com.intellectualcrafters.plot.database.DBFunc;
|
||||
import com.intellectualcrafters.plot.events.PlayerPlotDeniedEvent;
|
||||
import com.intellectualcrafters.plot.object.Plot;
|
||||
import com.intellectualcrafters.plot.util.PlayerFunctions;
|
||||
import com.intellectualcrafters.plot.util.UUIDHandler;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@ -51,7 +53,7 @@ public class Denied extends SubCommand {
|
||||
return true;
|
||||
}
|
||||
final Plot plot = PlayerFunctions.getCurrentPlot(plr);
|
||||
if ((plot.owner == null) || !plot.hasRights(plr)) {
|
||||
if (((plot.owner == null) || !plot.getOwner().equals(plr.getUniqueId())) && !PlotMain.hasPermission(plr, "plots.admin")) {
|
||||
PlayerFunctions.sendMessage(plr, C.NO_PLOT_PERMS);
|
||||
return true;
|
||||
}
|
||||
|
@ -21,12 +21,14 @@
|
||||
|
||||
package com.intellectualcrafters.plot.commands;
|
||||
|
||||
import com.intellectualcrafters.plot.PlotMain;
|
||||
import com.intellectualcrafters.plot.config.C;
|
||||
import com.intellectualcrafters.plot.database.DBFunc;
|
||||
import com.intellectualcrafters.plot.events.PlayerPlotHelperEvent;
|
||||
import com.intellectualcrafters.plot.object.Plot;
|
||||
import com.intellectualcrafters.plot.util.PlayerFunctions;
|
||||
import com.intellectualcrafters.plot.util.UUIDHandler;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@ -50,7 +52,7 @@ public class Helpers extends SubCommand {
|
||||
return true;
|
||||
}
|
||||
final Plot plot = PlayerFunctions.getCurrentPlot(plr);
|
||||
if ((plot.owner == null) || !plot.getOwner().equals(plr)) {
|
||||
if (((plot.owner == null) || !plot.getOwner().equals(plr.getUniqueId())) && !PlotMain.hasPermission(plr, "plots.admin")) {
|
||||
PlayerFunctions.sendMessage(plr, C.NO_PLOT_PERMS);
|
||||
return true;
|
||||
}
|
||||
|
@ -21,12 +21,14 @@
|
||||
|
||||
package com.intellectualcrafters.plot.commands;
|
||||
|
||||
import com.intellectualcrafters.plot.PlotMain;
|
||||
import com.intellectualcrafters.plot.config.C;
|
||||
import com.intellectualcrafters.plot.database.DBFunc;
|
||||
import com.intellectualcrafters.plot.events.PlayerPlotTrustedEvent;
|
||||
import com.intellectualcrafters.plot.object.Plot;
|
||||
import com.intellectualcrafters.plot.util.PlayerFunctions;
|
||||
import com.intellectualcrafters.plot.util.UUIDHandler;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@ -50,7 +52,7 @@ public class Trusted extends SubCommand {
|
||||
return true;
|
||||
}
|
||||
final Plot plot = PlayerFunctions.getCurrentPlot(plr);
|
||||
if ((plot.owner == null) || !plot.getOwner().equals(plr)) {
|
||||
if (((plot.owner == null) || !plot.getOwner().equals(plr.getUniqueId())) && !PlotMain.hasPermission(plr, "plots.admin")) {
|
||||
PlayerFunctions.sendMessage(plr, C.NO_PLOT_PERMS);
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user