mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-12-24 16:58:50 +01:00
Add merge permission changes from master
This commit is contained in:
parent
330ab83ece
commit
ca883c211a
@ -96,6 +96,10 @@ public class Merge extends SubCommand {
|
|||||||
if (args.length == 2) {
|
if (args.length == 2) {
|
||||||
terrain = "true".equalsIgnoreCase(args[1]);
|
terrain = "true".equalsIgnoreCase(args[1]);
|
||||||
}
|
}
|
||||||
|
if(!terrain && !Permissions.hasPermission(player, C.PERMISSION_MERGE_KEEPROAD)) {
|
||||||
|
MainUtil.sendMessage(player, C.NO_PERMISSION, C.PERMISSION_MERGE_KEEPROAD.s());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if (plot.autoMerge(-1, maxSize, uuid, terrain)) {
|
if (plot.autoMerge(-1, maxSize, uuid, terrain)) {
|
||||||
if (EconHandler.manager != null && plotArea.USE_ECONOMY && price > 0d) {
|
if (EconHandler.manager != null && plotArea.USE_ECONOMY && price > 0d) {
|
||||||
EconHandler.manager.withdrawMoney(player, price);
|
EconHandler.manager.withdrawMoney(player, price);
|
||||||
@ -128,6 +132,10 @@ public class Merge extends SubCommand {
|
|||||||
} else {
|
} else {
|
||||||
terrain = true;
|
terrain = true;
|
||||||
}
|
}
|
||||||
|
if(!terrain && !Permissions.hasPermission(player, C.PERMISSION_MERGE_KEEPROAD)) {
|
||||||
|
MainUtil.sendMessage(player, C.NO_PERMISSION, C.PERMISSION_MERGE_KEEPROAD.s());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if (plot.autoMerge(direction, maxSize - size, uuid, terrain)) {
|
if (plot.autoMerge(direction, maxSize - size, uuid, terrain)) {
|
||||||
if (EconHandler.manager != null && plotArea.USE_ECONOMY && price > 0d) {
|
if (EconHandler.manager != null && plotArea.USE_ECONOMY && price > 0d) {
|
||||||
EconHandler.manager.withdrawMoney(player, price);
|
EconHandler.manager.withdrawMoney(player, price);
|
||||||
|
@ -46,7 +46,8 @@ public enum C {
|
|||||||
"plots.admin.entry.denied", "static.permissions"), PERMISSION_ADMIN_ENTRY_FORCEFIELD(
|
"plots.admin.entry.denied", "static.permissions"), PERMISSION_ADMIN_ENTRY_FORCEFIELD(
|
||||||
"plots.admin.entry.forcefield", "static.permissions"), PERMISSION_COMMANDS_CHAT(
|
"plots.admin.entry.forcefield", "static.permissions"), PERMISSION_COMMANDS_CHAT(
|
||||||
"plots.admin.command.chat", "static.permissions"), PERMISSION_MERGE_OTHER(
|
"plots.admin.command.chat", "static.permissions"), PERMISSION_MERGE_OTHER(
|
||||||
"plots.merge.other", "static.permissions"), PERMISSION_ADMIN_DESTROY_UNOWNED(
|
"plots.merge.other", "static.permissions"), PERMISSION_MERGE_KEEPROAD(
|
||||||
|
"plots.merge.keeproad", "static.permissions"), PERMISSION_ADMIN_DESTROY_UNOWNED(
|
||||||
"plots.admin.destroy.unowned", "static.permissions"), PERMISSION_ADMIN_DESTROY_GROUNDLEVEL(
|
"plots.admin.destroy.unowned", "static.permissions"), PERMISSION_ADMIN_DESTROY_GROUNDLEVEL(
|
||||||
"plots.admin.destroy.groundlevel", "static.permissions"), PERMISSION_ADMIN_DESTROY_OTHER(
|
"plots.admin.destroy.groundlevel", "static.permissions"), PERMISSION_ADMIN_DESTROY_OTHER(
|
||||||
"plots.admin.destroy.other", "static.permissions"), PERMISSION_ADMIN_DESTROY_ROAD(
|
"plots.admin.destroy.other", "static.permissions"), PERMISSION_ADMIN_DESTROY_ROAD(
|
||||||
@ -141,8 +142,9 @@ public enum C {
|
|||||||
PERMISSION_SET_COMPONENT("plots.set.%s0", "static.permissions"), PERMISSION_ADMIN_COMMAND(
|
PERMISSION_SET_COMPONENT("plots.set.%s0", "static.permissions"), PERMISSION_ADMIN_COMMAND(
|
||||||
"plots.admin.command.%s0", "static.permissions"),
|
"plots.admin.command.%s0", "static.permissions"),
|
||||||
|
|
||||||
PERMISSION_ADMIN_COMMAND_UNLINK("plots.admin.command.unlink", "static.permissions"), PERMISSION_VISIT_UNOWNED(
|
PERMISSION_ADMIN_COMMAND_UNLINK("plots.admin.command.unlink",
|
||||||
"plots.visit.unowned", "static.permissions"),
|
"static.permissions"), PERMISSION_VISIT_UNOWNED("plots.visit.unowned",
|
||||||
|
"static.permissions"),
|
||||||
|
|
||||||
PERMISSION_VISIT_OWNED("plots.visit.owned", "static.permissions"), PERMISSION_SHARED(
|
PERMISSION_VISIT_OWNED("plots.visit.owned", "static.permissions"), PERMISSION_SHARED(
|
||||||
"plots.visit.shared", "static.permissions"),
|
"plots.visit.shared", "static.permissions"),
|
||||||
|
Loading…
Reference in New Issue
Block a user