mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 13:16:45 +01:00
Fix some merged plot events
This commit is contained in:
parent
b6df07f723
commit
e4d7270c28
@ -315,7 +315,7 @@ public class PlayerEvents extends PlotListener implements Listener {
|
|||||||
if (area == null) {
|
if (area == null) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
Plot plot = area.getPlotAbs(loc);
|
Plot plot = area.getPlot(loc);
|
||||||
ProjectileSource shooter = entity.getShooter();
|
ProjectileSource shooter = entity.getShooter();
|
||||||
if (shooter instanceof Player) {
|
if (shooter instanceof Player) {
|
||||||
PlotPlayer pp = BukkitUtil.getPlayer((Player) shooter);
|
PlotPlayer pp = BukkitUtil.getPlayer((Player) shooter);
|
||||||
@ -647,7 +647,7 @@ public class PlayerEvents extends PlotListener implements Listener {
|
|||||||
if (area == null) {
|
if (area == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Plot plot = area.getPlotAbs(location);
|
Plot plot = area.getPlot(location);
|
||||||
if (plot != null) {
|
if (plot != null) {
|
||||||
PlotPlayer plotPlayer = BukkitUtil.getPlayer(player);
|
PlotPlayer plotPlayer = BukkitUtil.getPlayer(player);
|
||||||
if (event.getBlock().getY() == 0) {
|
if (event.getBlock().getY() == 0) {
|
||||||
@ -869,7 +869,7 @@ public class PlayerEvents extends PlotListener implements Listener {
|
|||||||
if (area == null) {
|
if (area == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Plot plot = area.getPlotAbs(location);
|
Plot plot = area.getPlot(location);
|
||||||
if (plot != null) {
|
if (plot != null) {
|
||||||
if (location.getY() == 0) {
|
if (location.getY() == 0) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
@ -1129,7 +1129,7 @@ public class PlayerEvents extends PlotListener implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Plot origin = area.getPlotAbs(location);
|
Plot origin = area.getPlot(location);
|
||||||
if (origin == null) {
|
if (origin == null) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
return;
|
return;
|
||||||
@ -1728,7 +1728,7 @@ public class PlayerEvents extends PlotListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
PlotPlayer pp = BukkitUtil.getPlayer(event.getPlayer());
|
PlotPlayer pp = BukkitUtil.getPlayer(event.getPlayer());
|
||||||
Plot plot = area.getPlotAbs(location);
|
Plot plot = area.getPlot(location);
|
||||||
if (plot == null) {
|
if (plot == null) {
|
||||||
if (Permissions.hasPermission(pp, C.PERMISSION_ADMIN_BUILD_ROAD)) {
|
if (Permissions.hasPermission(pp, C.PERMISSION_ADMIN_BUILD_ROAD)) {
|
||||||
return;
|
return;
|
||||||
@ -1799,7 +1799,7 @@ public class PlayerEvents extends PlotListener implements Listener {
|
|||||||
}
|
}
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
PlotPlayer plotPlayer = BukkitUtil.getPlayer(player);
|
PlotPlayer plotPlayer = BukkitUtil.getPlayer(player);
|
||||||
Plot plot = area.getPlotAbs(location);
|
Plot plot = area.getPlot(location);
|
||||||
if (plot == null) {
|
if (plot == null) {
|
||||||
if (Permissions.hasPermission(plotPlayer, C.PERMISSION_ADMIN_BUILD_ROAD)) {
|
if (Permissions.hasPermission(plotPlayer, C.PERMISSION_ADMIN_BUILD_ROAD)) {
|
||||||
return;
|
return;
|
||||||
@ -1854,7 +1854,7 @@ public class PlayerEvents extends PlotListener implements Listener {
|
|||||||
}
|
}
|
||||||
Player p = event.getPlayer();
|
Player p = event.getPlayer();
|
||||||
PlotPlayer pp = BukkitUtil.getPlayer(p);
|
PlotPlayer pp = BukkitUtil.getPlayer(p);
|
||||||
Plot plot = area.getPlotAbs(location);
|
Plot plot = area.getPlot(location);
|
||||||
if (plot == null) {
|
if (plot == null) {
|
||||||
if (!Permissions.hasPermission(pp, C.PERMISSION_ADMIN_BUILD_ROAD)) {
|
if (!Permissions.hasPermission(pp, C.PERMISSION_ADMIN_BUILD_ROAD)) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, C.PERMISSION_ADMIN_BUILD_ROAD);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, C.PERMISSION_ADMIN_BUILD_ROAD);
|
||||||
@ -1895,7 +1895,7 @@ public class PlayerEvents extends PlotListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
PlotPlayer pp = BukkitUtil.getPlayer(p);
|
PlotPlayer pp = BukkitUtil.getPlayer(p);
|
||||||
Plot plot = area.getPlotAbs(location);
|
Plot plot = area.getPlot(location);
|
||||||
if (plot == null) {
|
if (plot == null) {
|
||||||
if (!Permissions.hasPermission(pp, C.PERMISSION_ADMIN_DESTROY_ROAD)) {
|
if (!Permissions.hasPermission(pp, C.PERMISSION_ADMIN_DESTROY_ROAD)) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, C.PERMISSION_ADMIN_DESTROY_ROAD);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, C.PERMISSION_ADMIN_DESTROY_ROAD);
|
||||||
@ -1925,7 +1925,7 @@ public class PlayerEvents extends PlotListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
PlotPlayer player = BukkitUtil.getPlayer(shooter);
|
PlotPlayer player = BukkitUtil.getPlayer(shooter);
|
||||||
Plot plot = area.getPlotAbs(BukkitUtil.getLocation(event.getEntity()));
|
Plot plot = area.getPlot(BukkitUtil.getLocation(event.getEntity()));
|
||||||
if (plot != null) {
|
if (plot != null) {
|
||||||
if (!plot.hasOwner()) {
|
if (!plot.hasOwner()) {
|
||||||
if (!Permissions.hasPermission(player, C.PERMISSION_ADMIN_DESTROY_UNOWNED)) {
|
if (!Permissions.hasPermission(player, C.PERMISSION_ADMIN_DESTROY_UNOWNED)) {
|
||||||
@ -1956,7 +1956,7 @@ public class PlayerEvents extends PlotListener implements Listener {
|
|||||||
}
|
}
|
||||||
Player p = event.getPlayer();
|
Player p = event.getPlayer();
|
||||||
PlotPlayer pp = BukkitUtil.getPlayer(p);
|
PlotPlayer pp = BukkitUtil.getPlayer(p);
|
||||||
Plot plot = area.getPlotAbs(location);
|
Plot plot = area.getPlot(location);
|
||||||
if (plot == null) {
|
if (plot == null) {
|
||||||
if (!Permissions.hasPermission(pp, C.PERMISSION_ADMIN_INTERACT_ROAD)) {
|
if (!Permissions.hasPermission(pp, C.PERMISSION_ADMIN_INTERACT_ROAD)) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, C.PERMISSION_ADMIN_INTERACT_ROAD);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, C.PERMISSION_ADMIN_INTERACT_ROAD);
|
||||||
@ -2005,7 +2005,7 @@ public class PlayerEvents extends PlotListener implements Listener {
|
|||||||
if (d instanceof Player) {
|
if (d instanceof Player) {
|
||||||
Player p = (Player) d;
|
Player p = (Player) d;
|
||||||
PlotPlayer pp = BukkitUtil.getPlayer(p);
|
PlotPlayer pp = BukkitUtil.getPlayer(p);
|
||||||
Plot plot = area.getPlotAbs(l);
|
Plot plot = area.getPlot(l);
|
||||||
if (plot == null) {
|
if (plot == null) {
|
||||||
if (!Permissions.hasPermission(pp, "plots.admin.vehicle.break.road")) {
|
if (!Permissions.hasPermission(pp, "plots.admin.vehicle.break.road")) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, "plots.admin.vehicle.break.road");
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, "plots.admin.vehicle.break.road");
|
||||||
@ -2256,7 +2256,7 @@ public class PlayerEvents extends PlotListener implements Listener {
|
|||||||
}
|
}
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
PlotPlayer pp = BukkitUtil.getPlayer(player);
|
PlotPlayer pp = BukkitUtil.getPlayer(player);
|
||||||
Plot plot = area.getPlotAbs(location);
|
Plot plot = area.getPlot(location);
|
||||||
if (plot != null) {
|
if (plot != null) {
|
||||||
if (!plot.hasOwner()) {
|
if (!plot.hasOwner()) {
|
||||||
if (!Permissions.hasPermission(pp, C.PERMISSION_ADMIN_BUILD_UNOWNED)) {
|
if (!Permissions.hasPermission(pp, C.PERMISSION_ADMIN_BUILD_UNOWNED)) {
|
||||||
|
@ -344,7 +344,7 @@ public enum C {
|
|||||||
"$4You should have been teleported to the created world. Otherwise you will need to set the generator manually using the bukkit.yml or "
|
"$4You should have been teleported to the created world. Otherwise you will need to set the generator manually using the bukkit.yml or "
|
||||||
+ "your chosen world management plugin.",
|
+ "your chosen world management plugin.",
|
||||||
"Setup"),
|
"Setup"),
|
||||||
SETUP_WORLD_TAKEN("$2%s is already a registered plotworld", "Setup"),
|
SETUP_WORLD_TAKEN("$2%s is already a world", "Setup"),
|
||||||
SETUP_MISSING_WORLD(
|
SETUP_MISSING_WORLD(
|
||||||
"$2You need to specify a world name ($1/plot setup &l<world>$1 <generator>$2)&-$1Additional commands:&-$2 - $1/plot setup <value>&-$2 -"
|
"$2You need to specify a world name ($1/plot setup &l<world>$1 <generator>$2)&-$1Additional commands:&-$2 - $1/plot setup <value>&-$2 -"
|
||||||
+ " $1/plot setup back&-$2 - $1/plot setup cancel", "Setup"),
|
+ " $1/plot setup back&-$2 - $1/plot setup cancel", "Setup"),
|
||||||
|
Loading…
Reference in New Issue
Block a user