mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 07:06:44 +01:00
Import changes and variable renames
This commit is contained in:
parent
f3aa9c43ef
commit
289f01f7a2
@ -36,28 +36,28 @@ public class WESubscriber {
|
|||||||
Actor actor = event.getActor();
|
Actor actor = event.getActor();
|
||||||
if (actor != null && actor.isPlayer()) {
|
if (actor != null && actor.isPlayer()) {
|
||||||
String name = actor.getName();
|
String name = actor.getName();
|
||||||
PlotPlayer pp = PlotPlayer.wrap(name);
|
PlotPlayer plotPlayer = PlotPlayer.wrap(name);
|
||||||
HashSet<RegionWrapper> mask;
|
HashSet<RegionWrapper> mask;
|
||||||
if (pp == null) {
|
if (plotPlayer == null) {
|
||||||
Player player = (Player) actor;
|
Player player = (Player) actor;
|
||||||
Location loc = player.getLocation();
|
Location location = player.getLocation();
|
||||||
com.github.intellectualsites.plotsquared.plot.object.Location pLoc =
|
com.github.intellectualsites.plotsquared.plot.object.Location pLoc =
|
||||||
new com.github.intellectualsites.plotsquared.plot.object.Location(
|
new com.github.intellectualsites.plotsquared.plot.object.Location(
|
||||||
player.getWorld().getName(), loc.getBlockX(), loc.getBlockX(),
|
player.getWorld().getName(), location.getBlockX(), location.getBlockX(),
|
||||||
loc.getBlockZ());
|
location.getBlockZ());
|
||||||
Plot plot = pLoc.getPlot();
|
Plot plot = pLoc.getPlot();
|
||||||
if (plot == null) {
|
if (plot == null) {
|
||||||
event.setExtent(new NullExtent());
|
event.setExtent(new NullExtent());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
mask = plot.getRegions();
|
mask = plot.getRegions();
|
||||||
} else if (pp.getAttribute("worldedit")) {
|
} else if (plotPlayer.getAttribute("worldedit")) {
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
mask = WEManager.getMask(pp);
|
mask = WEManager.getMask(plotPlayer);
|
||||||
if (mask.isEmpty()) {
|
if (mask.isEmpty()) {
|
||||||
if (Permissions.hasPermission(pp, "plots.worldedit.bypass")) {
|
if (Permissions.hasPermission(plotPlayer, "plots.worldedit.bypass")) {
|
||||||
MainUtil.sendMessage(pp, Captions.WORLDEDIT_BYPASS);
|
MainUtil.sendMessage(plotPlayer, Captions.WORLDEDIT_BYPASS);
|
||||||
}
|
}
|
||||||
if (PlotSquared.get().hasPlotArea(world)) {
|
if (PlotSquared.get().hasPlotArea(world)) {
|
||||||
event.setExtent(new NullExtent());
|
event.setExtent(new NullExtent());
|
||||||
|
Loading…
Reference in New Issue
Block a user