mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 13:16:45 +01:00
Allow players to interact on their own plot
This commit is contained in:
parent
d267d1bb98
commit
2936b806f3
@ -1864,8 +1864,8 @@ public class PlayerEvents extends PlotListener implements Listener {
|
|||||||
Plot plot = location.getPlotAbs();
|
Plot plot = location.getPlotAbs();
|
||||||
BukkitPlayer pp = BukkitUtil.getPlayer(e.getPlayer());
|
BukkitPlayer pp = BukkitUtil.getPlayer(e.getPlayer());
|
||||||
if (plot == null) {
|
if (plot == null) {
|
||||||
if (!area.isRoadFlags() && !area.getRoadFlag(MiscInteractFlag.class)
|
if (!area.isRoadFlags() && !area.getRoadFlag(MiscInteractFlag.class) && !Permissions
|
||||||
&& !Permissions.hasPermission(pp, "plots.admin.interact.road")) {
|
.hasPermission(pp, "plots.admin.interact.road")) {
|
||||||
MainUtil.sendMessage(pp, Captions.NO_PERMISSION_EVENT, "plots.admin.interact.road");
|
MainUtil.sendMessage(pp, Captions.NO_PERMISSION_EVENT, "plots.admin.interact.road");
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
}
|
}
|
||||||
@ -2601,8 +2601,8 @@ public class PlayerEvents extends PlotListener implements Listener {
|
|||||||
Captions.PERMISSION_ADMIN_INTERACT_UNOWNED);
|
Captions.PERMISSION_ADMIN_INTERACT_UNOWNED);
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
} else if ((plot != null && !plot.isAdded(pp.getUUID())) || area
|
} else if ((plot != null && !plot.isAdded(pp.getUUID())) || (plot == null && area
|
||||||
.isRoadFlags()) {
|
.isRoadFlags())) {
|
||||||
final Entity entity = event.getRightClicked();
|
final Entity entity = event.getRightClicked();
|
||||||
final com.sk89q.worldedit.world.entity.EntityType entityType =
|
final com.sk89q.worldedit.world.entity.EntityType entityType =
|
||||||
BukkitAdapter.adapt(entity.getType());
|
BukkitAdapter.adapt(entity.getType());
|
||||||
|
Loading…
Reference in New Issue
Block a user