mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 07:06:44 +01:00
Fixes #467
This commit is contained in:
parent
222e4faf8b
commit
9b5958da31
@ -259,6 +259,7 @@ public enum C {
|
|||||||
*/
|
*/
|
||||||
NO_SCHEMATIC_PERMISSION("$2You don't have the permission required to use schematic $1%s", "Permission"),
|
NO_SCHEMATIC_PERMISSION("$2You don't have the permission required to use schematic $1%s", "Permission"),
|
||||||
NO_PERMISSION("$2You are lacking the permission node: $1%s", "Permission"),
|
NO_PERMISSION("$2You are lacking the permission node: $1%s", "Permission"),
|
||||||
|
NO_PERMISSION_EVENT("$2You are lacking the permission node: $1%s", "Permission"),
|
||||||
NO_PLOT_PERMS("$2You must be the plot owner to perform this action", "Permission"),
|
NO_PLOT_PERMS("$2You must be the plot owner to perform this action", "Permission"),
|
||||||
CANT_CLAIM_MORE_PLOTS("$2You can't claim more plots.", "Permission"),
|
CANT_CLAIM_MORE_PLOTS("$2You can't claim more plots.", "Permission"),
|
||||||
CANT_TRANSFER_MORE_PLOTS("$2You can't send more plots to that user", "Permission"),
|
CANT_TRANSFER_MORE_PLOTS("$2You can't send more plots to that user", "Permission"),
|
||||||
|
@ -68,7 +68,7 @@ public enum Permissions {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (notify) {
|
if (notify) {
|
||||||
MainUtil.sendMessage(player, C.NO_PERMISSION, perm);
|
MainUtil.sendMessage(player, C.NO_PERMISSION_EVENT, perm);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -508,7 +508,7 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!plotExit(pp, lastPlot)) {
|
if (!plotExit(pp, lastPlot)) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_EXIT_DENIED);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_EXIT_DENIED);
|
||||||
if (lastPlot.equals(MainUtil.getPlot(BukkitUtil.getLocation(from)))) {
|
if (lastPlot.equals(MainUtil.getPlot(BukkitUtil.getLocation(from)))) {
|
||||||
player.teleport(from);
|
player.teleport(from);
|
||||||
}
|
}
|
||||||
@ -525,7 +525,7 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
|||||||
else {
|
else {
|
||||||
Plot plot = MainUtil.getPlot(worldname, id);
|
Plot plot = MainUtil.getPlot(worldname, id);
|
||||||
if (!plotEntry(pp, plot)) {
|
if (!plotEntry(pp, plot)) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_ENTRY_DENIED);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_ENTRY_DENIED);
|
||||||
if (!plot.equals(MainUtil.getPlot(BukkitUtil.getLocation(from)))) {
|
if (!plot.equals(MainUtil.getPlot(BukkitUtil.getLocation(from)))) {
|
||||||
player.teleport(from);
|
player.teleport(from);
|
||||||
}
|
}
|
||||||
@ -574,7 +574,7 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!plotExit(pp, lastPlot)) {
|
if (!plotExit(pp, lastPlot)) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_EXIT_DENIED);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_EXIT_DENIED);
|
||||||
if (lastPlot.equals(MainUtil.getPlot(BukkitUtil.getLocation(from)))) {
|
if (lastPlot.equals(MainUtil.getPlot(BukkitUtil.getLocation(from)))) {
|
||||||
player.teleport(from);
|
player.teleport(from);
|
||||||
}
|
}
|
||||||
@ -591,7 +591,7 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
|||||||
else {
|
else {
|
||||||
Plot plot = MainUtil.getPlot(worldname, id);
|
Plot plot = MainUtil.getPlot(worldname, id);
|
||||||
if (!plotEntry(pp, plot)) {
|
if (!plotEntry(pp, plot)) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_ENTRY_DENIED);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_ENTRY_DENIED);
|
||||||
if (!plot.equals(MainUtil.getPlot(BukkitUtil.getLocation(from)))) {
|
if (!plot.equals(MainUtil.getPlot(BukkitUtil.getLocation(from)))) {
|
||||||
player.teleport(from);
|
player.teleport(from);
|
||||||
}
|
}
|
||||||
@ -670,7 +670,7 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
|||||||
if (Permissions.hasPermission(pp, PERMISSION_ADMIN_DESTROY_UNOWNED)) {
|
if (Permissions.hasPermission(pp, PERMISSION_ADMIN_DESTROY_UNOWNED)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_DESTROY_UNOWNED);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_DESTROY_UNOWNED);
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -684,7 +684,7 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
|||||||
if (Permissions.hasPermission(pp, PERMISSION_ADMIN_DESTROY_OTHER)) {
|
if (Permissions.hasPermission(pp, PERMISSION_ADMIN_DESTROY_OTHER)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_DESTROY_OTHER);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_DESTROY_OTHER);
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
@ -694,7 +694,7 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (MainUtil.isPlotArea(loc)) {
|
if (MainUtil.isPlotArea(loc)) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_DESTROY_ROAD);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_DESTROY_ROAD);
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -775,7 +775,7 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
|||||||
if (MainUtil.isPlotAreaAbs(loc)) {
|
if (MainUtil.isPlotAreaAbs(loc)) {
|
||||||
final PlotPlayer pp = BukkitUtil.getPlayer(p);
|
final PlotPlayer pp = BukkitUtil.getPlayer(p);
|
||||||
if (!Permissions.hasPermission(pp, PERMISSION_ADMIN_BUILD_ROAD)) {
|
if (!Permissions.hasPermission(pp, PERMISSION_ADMIN_BUILD_ROAD)) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_BUILD_ROAD);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_BUILD_ROAD);
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -783,7 +783,7 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
|||||||
if (!plot.hasOwner()) {
|
if (!plot.hasOwner()) {
|
||||||
final PlotPlayer pp = BukkitUtil.getPlayer(p);
|
final PlotPlayer pp = BukkitUtil.getPlayer(p);
|
||||||
if (!Permissions.hasPermission(pp, PERMISSION_ADMIN_BUILD_UNOWNED)) {
|
if (!Permissions.hasPermission(pp, PERMISSION_ADMIN_BUILD_UNOWNED)) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_BUILD_UNOWNED);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_BUILD_UNOWNED);
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -791,7 +791,7 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
|||||||
if (!plot.isAdded(pp.getUUID())) {
|
if (!plot.isAdded(pp.getUUID())) {
|
||||||
if (!Permissions.hasPermission(pp, PERMISSION_ADMIN_BUILD_OTHER)) {
|
if (!Permissions.hasPermission(pp, PERMISSION_ADMIN_BUILD_OTHER)) {
|
||||||
if (MainUtil.isPlotArea(loc)) {
|
if (MainUtil.isPlotArea(loc)) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_BUILD_OTHER);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_BUILD_OTHER);
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -869,7 +869,7 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
|||||||
if (Permissions.hasPermission(pp, PERMISSION_ADMIN_DESTROY_UNOWNED)) {
|
if (Permissions.hasPermission(pp, PERMISSION_ADMIN_DESTROY_UNOWNED)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_DESTROY_UNOWNED);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_DESTROY_UNOWNED);
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -883,7 +883,7 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
|||||||
if (Permissions.hasPermission(pp, PERMISSION_ADMIN_DESTROY_OTHER)) {
|
if (Permissions.hasPermission(pp, PERMISSION_ADMIN_DESTROY_OTHER)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_DESTROY_OTHER);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_DESTROY_OTHER);
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -894,7 +894,7 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (MainUtil.isPlotArea(loc)) {
|
if (MainUtil.isPlotArea(loc)) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_DESTROY_ROAD);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_DESTROY_ROAD);
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1374,7 +1374,7 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
|||||||
if (MainUtil.isPlotAreaAbs(loc)) {
|
if (MainUtil.isPlotAreaAbs(loc)) {
|
||||||
final PlotPlayer pp = BukkitUtil.getPlayer(p);
|
final PlotPlayer pp = BukkitUtil.getPlayer(p);
|
||||||
if (!Permissions.hasPermission(pp, PERMISSION_ADMIN_BUILD_ROAD)) {
|
if (!Permissions.hasPermission(pp, PERMISSION_ADMIN_BUILD_ROAD)) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_BUILD_ROAD);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_BUILD_ROAD);
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1382,7 +1382,7 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
|||||||
if (!plot.hasOwner()) {
|
if (!plot.hasOwner()) {
|
||||||
final PlotPlayer pp = BukkitUtil.getPlayer(p);
|
final PlotPlayer pp = BukkitUtil.getPlayer(p);
|
||||||
if (!Permissions.hasPermission(pp, PERMISSION_ADMIN_BUILD_UNOWNED)) {
|
if (!Permissions.hasPermission(pp, PERMISSION_ADMIN_BUILD_UNOWNED)) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_BUILD_UNOWNED);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_BUILD_UNOWNED);
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -1390,7 +1390,7 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
|||||||
if (!plot.isAdded(pp.getUUID())) {
|
if (!plot.isAdded(pp.getUUID())) {
|
||||||
if (!Permissions.hasPermission(pp, PERMISSION_ADMIN_BUILD_OTHER)) {
|
if (!Permissions.hasPermission(pp, PERMISSION_ADMIN_BUILD_OTHER)) {
|
||||||
if (MainUtil.isPlotArea(loc)) {
|
if (MainUtil.isPlotArea(loc)) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_BUILD_OTHER);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_BUILD_OTHER);
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1430,7 +1430,7 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!plotExit(pp, lastPlot)) {
|
if (!plotExit(pp, lastPlot)) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_EXIT_DENIED);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_EXIT_DENIED);
|
||||||
if (lastPlot.equals(MainUtil.getPlot(BukkitUtil.getLocation(from)))) {
|
if (lastPlot.equals(MainUtil.getPlot(BukkitUtil.getLocation(from)))) {
|
||||||
player.teleport(from);
|
player.teleport(from);
|
||||||
}
|
}
|
||||||
@ -1447,7 +1447,7 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
|||||||
else {
|
else {
|
||||||
Plot plot = MainUtil.getPlot(worldname, id);
|
Plot plot = MainUtil.getPlot(worldname, id);
|
||||||
if (!plotEntry(pp, plot)) {
|
if (!plotEntry(pp, plot)) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_ENTRY_DENIED);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_ENTRY_DENIED);
|
||||||
if (!plot.equals(MainUtil.getPlot(BukkitUtil.getLocation(from)))) {
|
if (!plot.equals(MainUtil.getPlot(BukkitUtil.getLocation(from)))) {
|
||||||
player.teleport(from);
|
player.teleport(from);
|
||||||
}
|
}
|
||||||
@ -1496,7 +1496,7 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!plotExit(pp, lastPlot)) {
|
if (!plotExit(pp, lastPlot)) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_EXIT_DENIED);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_EXIT_DENIED);
|
||||||
if (lastPlot.equals(MainUtil.getPlot(BukkitUtil.getLocation(from)))) {
|
if (lastPlot.equals(MainUtil.getPlot(BukkitUtil.getLocation(from)))) {
|
||||||
player.teleport(from);
|
player.teleport(from);
|
||||||
}
|
}
|
||||||
@ -1513,7 +1513,7 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
|||||||
else {
|
else {
|
||||||
Plot plot = MainUtil.getPlot(worldname, id);
|
Plot plot = MainUtil.getPlot(worldname, id);
|
||||||
if (!plotEntry(pp, plot)) {
|
if (!plotEntry(pp, plot)) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_ENTRY_DENIED);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_ENTRY_DENIED);
|
||||||
if (!plot.equals(MainUtil.getPlot(BukkitUtil.getLocation(from)))) {
|
if (!plot.equals(MainUtil.getPlot(BukkitUtil.getLocation(from)))) {
|
||||||
player.teleport(from);
|
player.teleport(from);
|
||||||
}
|
}
|
||||||
@ -1553,7 +1553,7 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
|||||||
if (Permissions.hasPermission(pp, PERMISSION_ADMIN_BUILD_ROAD)) {
|
if (Permissions.hasPermission(pp, PERMISSION_ADMIN_BUILD_ROAD)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_BUILD_ROAD);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_BUILD_ROAD);
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -1561,7 +1561,7 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
|||||||
if (Permissions.hasPermission(pp, PERMISSION_ADMIN_BUILD_UNOWNED)) {
|
if (Permissions.hasPermission(pp, PERMISSION_ADMIN_BUILD_UNOWNED)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_BUILD_UNOWNED);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_BUILD_UNOWNED);
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
} else if (!plot.isAdded(pp.getUUID())) {
|
} else if (!plot.isAdded(pp.getUUID())) {
|
||||||
final Flag use = FlagManager.getPlotFlag(plot, FLAG_USE);
|
final Flag use = FlagManager.getPlotFlag(plot, FLAG_USE);
|
||||||
@ -1572,7 +1572,7 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (MainUtil.isPlotArea(loc)) {
|
if (MainUtil.isPlotArea(loc)) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_BUILD_OTHER);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_BUILD_OTHER);
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1639,7 +1639,7 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
|||||||
if (Permissions.hasPermission(pp, PERMISSION_ADMIN_BUILD_ROAD)) {
|
if (Permissions.hasPermission(pp, PERMISSION_ADMIN_BUILD_ROAD)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_BUILD_ROAD);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_BUILD_ROAD);
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -1647,7 +1647,7 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
|||||||
if (Permissions.hasPermission(pp, PERMISSION_ADMIN_BUILD_UNOWNED)) {
|
if (Permissions.hasPermission(pp, PERMISSION_ADMIN_BUILD_UNOWNED)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_BUILD_UNOWNED);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_BUILD_UNOWNED);
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
} else if (!plot.isAdded(pp.getUUID())) {
|
} else if (!plot.isAdded(pp.getUUID())) {
|
||||||
final Flag use = FlagManager.getPlotFlag(plot, FLAG_USE);
|
final Flag use = FlagManager.getPlotFlag(plot, FLAG_USE);
|
||||||
@ -1659,7 +1659,7 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (MainUtil.isPlotArea(loc)) {
|
if (MainUtil.isPlotArea(loc)) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_BUILD_OTHER);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_BUILD_OTHER);
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1688,14 +1688,14 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
|||||||
if (plot == null) {
|
if (plot == null) {
|
||||||
if (MainUtil.isPlotAreaAbs(loc)) {
|
if (MainUtil.isPlotAreaAbs(loc)) {
|
||||||
if (!Permissions.hasPermission(pp, PERMISSION_ADMIN_BUILD_ROAD)) {
|
if (!Permissions.hasPermission(pp, PERMISSION_ADMIN_BUILD_ROAD)) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_BUILD_ROAD);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_BUILD_ROAD);
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!plot.hasOwner()) {
|
if (!plot.hasOwner()) {
|
||||||
if (!Permissions.hasPermission(pp, PERMISSION_ADMIN_BUILD_UNOWNED)) {
|
if (!Permissions.hasPermission(pp, PERMISSION_ADMIN_BUILD_UNOWNED)) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_BUILD_UNOWNED);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_BUILD_UNOWNED);
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
}
|
}
|
||||||
} else if (!plot.isAdded(pp.getUUID())) {
|
} else if (!plot.isAdded(pp.getUUID())) {
|
||||||
@ -1704,7 +1704,7 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
|||||||
}
|
}
|
||||||
if (!Permissions.hasPermission(pp, PERMISSION_ADMIN_BUILD_OTHER)) {
|
if (!Permissions.hasPermission(pp, PERMISSION_ADMIN_BUILD_OTHER)) {
|
||||||
if (MainUtil.isPlotArea(loc)) {
|
if (MainUtil.isPlotArea(loc)) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_BUILD_OTHER);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_BUILD_OTHER);
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1725,14 +1725,14 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
|||||||
if (plot == null) {
|
if (plot == null) {
|
||||||
if (MainUtil.isPlotAreaAbs(l)) {
|
if (MainUtil.isPlotAreaAbs(l)) {
|
||||||
if (!Permissions.hasPermission(pp, PERMISSION_ADMIN_DESTROY_ROAD)) {
|
if (!Permissions.hasPermission(pp, PERMISSION_ADMIN_DESTROY_ROAD)) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_DESTROY_ROAD);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_DESTROY_ROAD);
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!plot.hasOwner()) {
|
if (!plot.hasOwner()) {
|
||||||
if (!Permissions.hasPermission(pp, PERMISSION_ADMIN_DESTROY_UNOWNED)) {
|
if (!Permissions.hasPermission(pp, PERMISSION_ADMIN_DESTROY_UNOWNED)) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_DESTROY_UNOWNED);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_DESTROY_UNOWNED);
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
}
|
}
|
||||||
} else if (!plot.isAdded(pp.getUUID())) {
|
} else if (!plot.isAdded(pp.getUUID())) {
|
||||||
@ -1741,7 +1741,7 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
|||||||
}
|
}
|
||||||
if (!Permissions.hasPermission(pp, PERMISSION_ADMIN_DESTROY_OTHER)) {
|
if (!Permissions.hasPermission(pp, PERMISSION_ADMIN_DESTROY_OTHER)) {
|
||||||
if (MainUtil.isPlotArea(l)) {
|
if (MainUtil.isPlotArea(l)) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_DESTROY_OTHER);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_DESTROY_OTHER);
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1758,14 +1758,14 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
|||||||
if (plot != null) {
|
if (plot != null) {
|
||||||
if (!plot.hasOwner()) {
|
if (!plot.hasOwner()) {
|
||||||
if (!Permissions.hasPermission(player, PERMISSION_ADMIN_DESTROY_UNOWNED)) {
|
if (!Permissions.hasPermission(player, PERMISSION_ADMIN_DESTROY_UNOWNED)) {
|
||||||
MainUtil.sendMessage(player, C.NO_PERMISSION, PERMISSION_ADMIN_DESTROY_UNOWNED);
|
MainUtil.sendMessage(player, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_DESTROY_UNOWNED);
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
}
|
}
|
||||||
} else if (!plot.isAdded(player.getUUID())) {
|
} else if (!plot.isAdded(player.getUUID())) {
|
||||||
if (!FlagManager.isPlotFlagTrue(plot, FLAG_HANGING_BREAK)){
|
if (!FlagManager.isPlotFlagTrue(plot, FLAG_HANGING_BREAK)){
|
||||||
if (!Permissions.hasPermission(player, PERMISSION_ADMIN_DESTROY_OTHER)) {
|
if (!Permissions.hasPermission(player, PERMISSION_ADMIN_DESTROY_OTHER)) {
|
||||||
if (MainUtil.isPlotArea(BukkitUtil.getLocation(e.getEntity()))) {
|
if (MainUtil.isPlotArea(BukkitUtil.getLocation(e.getEntity()))) {
|
||||||
MainUtil.sendMessage(player, C.NO_PERMISSION, PERMISSION_ADMIN_DESTROY_OTHER);
|
MainUtil.sendMessage(player, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_DESTROY_OTHER);
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1791,13 +1791,13 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!Permissions.hasPermission(pp, PERMISSION_ADMIN_INTERACT_ROAD)) {
|
if (!Permissions.hasPermission(pp, PERMISSION_ADMIN_INTERACT_ROAD)) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_INTERACT_ROAD);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_INTERACT_ROAD);
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!plot.hasOwner()) {
|
if (!plot.hasOwner()) {
|
||||||
if (!Permissions.hasPermission(pp, PERMISSION_ADMIN_INTERACT_UNOWNED)) {
|
if (!Permissions.hasPermission(pp, PERMISSION_ADMIN_INTERACT_UNOWNED)) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_INTERACT_UNOWNED);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_INTERACT_UNOWNED);
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
}
|
}
|
||||||
} else if (!plot.isAdded(pp.getUUID())) {
|
} else if (!plot.isAdded(pp.getUUID())) {
|
||||||
@ -1816,7 +1816,7 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
|||||||
}
|
}
|
||||||
if (!Permissions.hasPermission(pp, PERMISSION_ADMIN_INTERACT_OTHER)) {
|
if (!Permissions.hasPermission(pp, PERMISSION_ADMIN_INTERACT_OTHER)) {
|
||||||
if (MainUtil.isPlotArea(l)) {
|
if (MainUtil.isPlotArea(l)) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_INTERACT_OTHER);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_INTERACT_OTHER);
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1840,13 +1840,13 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!Permissions.hasPermission(pp, "plots.admin.vehicle.break.road")) {
|
if (!Permissions.hasPermission(pp, "plots.admin.vehicle.break.road")) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, "plots.admin.vehicle.break.road");
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, "plots.admin.vehicle.break.road");
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!plot.hasOwner()) {
|
if (!plot.hasOwner()) {
|
||||||
if (!Permissions.hasPermission(pp, "plots.admin.vehicle.break.unowned")) {
|
if (!Permissions.hasPermission(pp, "plots.admin.vehicle.break.unowned")) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, "plots.admin.vehicle.break.unowned");
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, "plots.admin.vehicle.break.unowned");
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1858,7 +1858,7 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
|||||||
}
|
}
|
||||||
if (!Permissions.hasPermission(pp, "plots.admin.vehicle.break.other")) {
|
if (!Permissions.hasPermission(pp, "plots.admin.vehicle.break.other")) {
|
||||||
if (MainUtil.isPlotArea(l)) {
|
if (MainUtil.isPlotArea(l)) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, "plots.admin.vehicle.break.other");
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, "plots.admin.vehicle.break.other");
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1923,7 +1923,7 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
|||||||
}
|
}
|
||||||
if (!Permissions.hasPermission(pp, "plots.admin.break." + stub)) {
|
if (!Permissions.hasPermission(pp, "plots.admin.break." + stub)) {
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, "plots.admin.break." + stub);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, "plots.admin.break." + stub);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1933,7 +1933,7 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
|||||||
}
|
}
|
||||||
if (!Permissions.hasPermission(pp, "plots.admin.break." + stub)) {
|
if (!Permissions.hasPermission(pp, "plots.admin.break." + stub)) {
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, "plots.admin.break." + stub);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, "plots.admin.break." + stub);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1943,7 +1943,7 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
|||||||
}
|
}
|
||||||
if (!Permissions.hasPermission(pp, "plots.admin.pve." + stub)) {
|
if (!Permissions.hasPermission(pp, "plots.admin.pve." + stub)) {
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, "plots.admin.pve." + stub);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, "plots.admin.pve." + stub);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1953,7 +1953,7 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
|||||||
}
|
}
|
||||||
if (!Permissions.hasPermission(pp, "plots.admin.pve." + stub)) {
|
if (!Permissions.hasPermission(pp, "plots.admin.pve." + stub)) {
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, "plots.admin.pve." + stub);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, "plots.admin.pve." + stub);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1970,7 +1970,7 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
|||||||
}
|
}
|
||||||
if (!Permissions.hasPermission(pp, "plots.admin.pvp." + stub)) {
|
if (!Permissions.hasPermission(pp, "plots.admin.pvp." + stub)) {
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, "plots.admin.pvp." + stub);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, "plots.admin.pvp." + stub);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1980,7 +1980,7 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
|||||||
}
|
}
|
||||||
if (!Permissions.hasPermission(pp, "plots.admin.pve." + stub)) {
|
if (!Permissions.hasPermission(pp, "plots.admin.pve." + stub)) {
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, "plots.admin.pve." + stub);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, "plots.admin.pve." + stub);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1993,7 +1993,7 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
|||||||
}
|
}
|
||||||
if (!Permissions.hasPermission(pp, "plots.admin.pve." + stub)) {
|
if (!Permissions.hasPermission(pp, "plots.admin.pve." + stub)) {
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, "plots.admin.pve." + stub);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, "plots.admin.pve." + stub);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2017,19 +2017,19 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!Permissions.hasPermission(pp, "plots.admin.projectile.road")) {
|
if (!Permissions.hasPermission(pp, "plots.admin.projectile.road")) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, "plots.admin.projectile.road");
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, "plots.admin.projectile.road");
|
||||||
e.setHatching(false);
|
e.setHatching(false);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!plot.hasOwner()) {
|
if (!plot.hasOwner()) {
|
||||||
if (!Permissions.hasPermission(pp, "plots.admin.projectile.unowned")) {
|
if (!Permissions.hasPermission(pp, "plots.admin.projectile.unowned")) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, "plots.admin.projectile.unowned");
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, "plots.admin.projectile.unowned");
|
||||||
e.setHatching(false);
|
e.setHatching(false);
|
||||||
}
|
}
|
||||||
} else if (!plot.isAdded(pp.getUUID())) {
|
} else if (!plot.isAdded(pp.getUUID())) {
|
||||||
if (!Permissions.hasPermission(pp, "plots.admin.projectile.other")) {
|
if (!Permissions.hasPermission(pp, "plots.admin.projectile.other")) {
|
||||||
if (MainUtil.isPlotArea(l)) {
|
if (MainUtil.isPlotArea(l)) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, "plots.admin.projectile.other");
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, "plots.admin.projectile.other");
|
||||||
e.setHatching(false);
|
e.setHatching(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2051,7 +2051,7 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
|||||||
if (plot != null) {
|
if (plot != null) {
|
||||||
if (!plot.hasOwner()) {
|
if (!plot.hasOwner()) {
|
||||||
if (!Permissions.hasPermission(pp, PERMISSION_ADMIN_BUILD_UNOWNED)) {
|
if (!Permissions.hasPermission(pp, PERMISSION_ADMIN_BUILD_UNOWNED)) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_BUILD_UNOWNED);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_BUILD_UNOWNED);
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -2060,7 +2060,7 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
|||||||
final Flag place = FlagManager.getPlotFlag(plot, FLAG_PLACE);
|
final Flag place = FlagManager.getPlotFlag(plot, FLAG_PLACE);
|
||||||
final Block block = event.getBlock();
|
final Block block = event.getBlock();
|
||||||
if (((place == null) || !((HashSet<PlotBlock>) place.getValue()).contains(new PlotBlock((short) block.getTypeId(), block.getData()))) && !Permissions.hasPermission(pp, PERMISSION_ADMIN_BUILD_OTHER)) {
|
if (((place == null) || !((HashSet<PlotBlock>) place.getValue()).contains(new PlotBlock((short) block.getTypeId(), block.getData()))) && !Permissions.hasPermission(pp, PERMISSION_ADMIN_BUILD_OTHER)) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_BUILD_OTHER);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_BUILD_OTHER);
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -2077,7 +2077,7 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
|||||||
}
|
}
|
||||||
else if (!Permissions.hasPermission(pp, PERMISSION_ADMIN_BUILD_OTHER)) {
|
else if (!Permissions.hasPermission(pp, PERMISSION_ADMIN_BUILD_OTHER)) {
|
||||||
if (MainUtil.isPlotAreaAbs(loc)) {
|
if (MainUtil.isPlotAreaAbs(loc)) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_BUILD_ROAD);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_BUILD_ROAD);
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -86,14 +86,14 @@ public class PlayerEvents_1_8 extends PlotListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!Permissions.hasPermission(pp, "plots.admin.interact.road")) {
|
if (!Permissions.hasPermission(pp, "plots.admin.interact.road")) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, "plots.admin.interact.road");
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, "plots.admin.interact.road");
|
||||||
cancelled = true;
|
cancelled = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (!plot.hasOwner()) {
|
if (!plot.hasOwner()) {
|
||||||
if (!Permissions.hasPermission(pp, "plots.admin.interact.unowned")) {
|
if (!Permissions.hasPermission(pp, "plots.admin.interact.unowned")) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, "plots.admin.interact.unowned");
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, "plots.admin.interact.unowned");
|
||||||
cancelled = true;
|
cancelled = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -101,7 +101,7 @@ public class PlayerEvents_1_8 extends PlotListener implements Listener {
|
|||||||
final UUID uuid = pp.getUUID();
|
final UUID uuid = pp.getUUID();
|
||||||
if (!plot.isAdded(uuid)) {
|
if (!plot.isAdded(uuid)) {
|
||||||
if (!Permissions.hasPermission(pp, "plots.admin.interact.other")) {
|
if (!Permissions.hasPermission(pp, "plots.admin.interact.other")) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, "plots.admin.interact.other");
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, "plots.admin.interact.other");
|
||||||
cancelled = true;
|
cancelled = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -135,14 +135,14 @@ public class PlayerEvents_1_8 extends PlotListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!Permissions.hasPermission(pp, "plots.admin.interact.road")) {
|
if (!Permissions.hasPermission(pp, "plots.admin.interact.road")) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, "plots.admin.interact.road");
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, "plots.admin.interact.road");
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (!plot.hasOwner()) {
|
if (!plot.hasOwner()) {
|
||||||
if (!Permissions.hasPermission(pp, "plots.admin.interact.unowned")) {
|
if (!Permissions.hasPermission(pp, "plots.admin.interact.unowned")) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, "plots.admin.interact.unowned");
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, "plots.admin.interact.unowned");
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -150,7 +150,7 @@ public class PlayerEvents_1_8 extends PlotListener implements Listener {
|
|||||||
final UUID uuid = pp.getUUID();
|
final UUID uuid = pp.getUUID();
|
||||||
if (!plot.isAdded(uuid)) {
|
if (!plot.isAdded(uuid)) {
|
||||||
if (!Permissions.hasPermission(pp, "plots.admin.interact.other")) {
|
if (!Permissions.hasPermission(pp, "plots.admin.interact.other")) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, "plots.admin.interact.other");
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, "plots.admin.interact.other");
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -362,7 +362,7 @@ public class MainListener {
|
|||||||
if (Permissions.hasPermission(pp, PERMISSION_ADMIN_DESTROY_UNOWNED)) {
|
if (Permissions.hasPermission(pp, PERMISSION_ADMIN_DESTROY_UNOWNED)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_DESTROY_UNOWNED);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_DESTROY_UNOWNED);
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -376,7 +376,7 @@ public class MainListener {
|
|||||||
if (Permissions.hasPermission(pp, PERMISSION_ADMIN_DESTROY_OTHER)) {
|
if (Permissions.hasPermission(pp, PERMISSION_ADMIN_DESTROY_OTHER)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_DESTROY_OTHER);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_DESTROY_OTHER);
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
@ -386,7 +386,7 @@ public class MainListener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (MainUtil.isPlotArea(loc)) {
|
if (MainUtil.isPlotArea(loc)) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_DESTROY_ROAD);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_DESTROY_ROAD);
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -409,7 +409,7 @@ public class MainListener {
|
|||||||
if (Permissions.hasPermission(pp, PERMISSION_ADMIN_BUILD_UNOWNED)) {
|
if (Permissions.hasPermission(pp, PERMISSION_ADMIN_BUILD_UNOWNED)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_BUILD_UNOWNED);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_BUILD_UNOWNED);
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -423,7 +423,7 @@ public class MainListener {
|
|||||||
if (Permissions.hasPermission(pp, PERMISSION_ADMIN_BUILD_OTHER)) {
|
if (Permissions.hasPermission(pp, PERMISSION_ADMIN_BUILD_OTHER)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_DESTROY_OTHER);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_DESTROY_OTHER);
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
@ -433,7 +433,7 @@ public class MainListener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (MainUtil.isPlotArea(loc)) {
|
if (MainUtil.isPlotArea(loc)) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_BUILD_ROAD);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_BUILD_ROAD);
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -456,7 +456,7 @@ public class MainListener {
|
|||||||
if (Permissions.hasPermission(pp, PERMISSION_ADMIN_INTERACT_UNOWNED)) {
|
if (Permissions.hasPermission(pp, PERMISSION_ADMIN_INTERACT_UNOWNED)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_INTERACT_UNOWNED);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_INTERACT_UNOWNED);
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -470,7 +470,7 @@ public class MainListener {
|
|||||||
if (Permissions.hasPermission(pp, PERMISSION_ADMIN_INTERACT_OTHER)) {
|
if (Permissions.hasPermission(pp, PERMISSION_ADMIN_INTERACT_OTHER)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_INTERACT_OTHER);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_INTERACT_OTHER);
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
@ -480,7 +480,7 @@ public class MainListener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (MainUtil.isPlotArea(loc)) {
|
if (MainUtil.isPlotArea(loc)) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_INTERACT_ROAD);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_INTERACT_ROAD);
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -575,7 +575,7 @@ public class MainListener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!PlotListener.plotExit(pp, lastPlot)) {
|
if (!PlotListener.plotExit(pp, lastPlot)) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_EXIT_DENIED);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_EXIT_DENIED);
|
||||||
if (lastPlot.equals(MainUtil.getPlot(SpongeUtil.getLocation(worldname, from)))) {
|
if (lastPlot.equals(MainUtil.getPlot(SpongeUtil.getLocation(worldname, from)))) {
|
||||||
event.setNewLocation(from);
|
event.setNewLocation(from);
|
||||||
}
|
}
|
||||||
@ -591,7 +591,7 @@ public class MainListener {
|
|||||||
else {
|
else {
|
||||||
Plot plot = MainUtil.getPlot(worldname, id);
|
Plot plot = MainUtil.getPlot(worldname, id);
|
||||||
if (!PlotListener.plotEntry(pp, plot)) {
|
if (!PlotListener.plotEntry(pp, plot)) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_ENTRY_DENIED);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_ENTRY_DENIED);
|
||||||
if (!plot.equals(MainUtil.getPlot(SpongeUtil.getLocation(worldname, from)))) {
|
if (!plot.equals(MainUtil.getPlot(SpongeUtil.getLocation(worldname, from)))) {
|
||||||
event.setNewLocation(from);
|
event.setNewLocation(from);
|
||||||
}
|
}
|
||||||
@ -642,7 +642,7 @@ public class MainListener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!PlotListener.plotExit(pp, lastPlot)) {
|
if (!PlotListener.plotExit(pp, lastPlot)) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_EXIT_DENIED);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_EXIT_DENIED);
|
||||||
if (lastPlot.equals(MainUtil.getPlot(SpongeUtil.getLocation(worldname, from)))) {
|
if (lastPlot.equals(MainUtil.getPlot(SpongeUtil.getLocation(worldname, from)))) {
|
||||||
event.setNewLocation(from);
|
event.setNewLocation(from);
|
||||||
}
|
}
|
||||||
@ -658,7 +658,7 @@ public class MainListener {
|
|||||||
else {
|
else {
|
||||||
Plot plot = MainUtil.getPlot(worldname, id);
|
Plot plot = MainUtil.getPlot(worldname, id);
|
||||||
if (!PlotListener.plotEntry(pp, plot)) {
|
if (!PlotListener.plotEntry(pp, plot)) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_ENTRY_DENIED);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_ENTRY_DENIED);
|
||||||
if (!plot.equals(MainUtil.getPlot(SpongeUtil.getLocation(worldname, from)))) {
|
if (!plot.equals(MainUtil.getPlot(SpongeUtil.getLocation(worldname, from)))) {
|
||||||
event.setNewLocation(from);
|
event.setNewLocation(from);
|
||||||
}
|
}
|
||||||
@ -716,7 +716,7 @@ public class MainListener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!PlotListener.plotExit(pp, lastPlot)) {
|
if (!PlotListener.plotExit(pp, lastPlot)) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_EXIT_DENIED);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_EXIT_DENIED);
|
||||||
if (lastPlot.equals(MainUtil.getPlot(SpongeUtil.getLocation(worldname, from)))) {
|
if (lastPlot.equals(MainUtil.getPlot(SpongeUtil.getLocation(worldname, from)))) {
|
||||||
event.setNewLocation(from);
|
event.setNewLocation(from);
|
||||||
}
|
}
|
||||||
@ -732,7 +732,7 @@ public class MainListener {
|
|||||||
else {
|
else {
|
||||||
Plot plot = MainUtil.getPlot(worldname, id);
|
Plot plot = MainUtil.getPlot(worldname, id);
|
||||||
if (!PlotListener.plotEntry(pp, plot)) {
|
if (!PlotListener.plotEntry(pp, plot)) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_ENTRY_DENIED);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_ENTRY_DENIED);
|
||||||
if (!plot.equals(MainUtil.getPlot(SpongeUtil.getLocation(worldname, from)))) {
|
if (!plot.equals(MainUtil.getPlot(SpongeUtil.getLocation(worldname, from)))) {
|
||||||
event.setNewLocation(from);
|
event.setNewLocation(from);
|
||||||
}
|
}
|
||||||
@ -783,7 +783,7 @@ public class MainListener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!PlotListener.plotExit(pp, lastPlot)) {
|
if (!PlotListener.plotExit(pp, lastPlot)) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_EXIT_DENIED);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_EXIT_DENIED);
|
||||||
if (lastPlot.equals(MainUtil.getPlot(SpongeUtil.getLocation(worldname, from)))) {
|
if (lastPlot.equals(MainUtil.getPlot(SpongeUtil.getLocation(worldname, from)))) {
|
||||||
event.setNewLocation(from);
|
event.setNewLocation(from);
|
||||||
}
|
}
|
||||||
@ -799,7 +799,7 @@ public class MainListener {
|
|||||||
else {
|
else {
|
||||||
Plot plot = MainUtil.getPlot(worldname, id);
|
Plot plot = MainUtil.getPlot(worldname, id);
|
||||||
if (!PlotListener.plotEntry(pp, plot)) {
|
if (!PlotListener.plotEntry(pp, plot)) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, PERMISSION_ADMIN_ENTRY_DENIED);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, PERMISSION_ADMIN_ENTRY_DENIED);
|
||||||
if (!plot.equals(MainUtil.getPlot(SpongeUtil.getLocation(worldname, from)))) {
|
if (!plot.equals(MainUtil.getPlot(SpongeUtil.getLocation(worldname, from)))) {
|
||||||
event.setNewLocation(from);
|
event.setNewLocation(from);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user