Skip to content

Commit 6f32980

Browse files
committed
/qs taxaccount should only used by admin
1 parent 52b33a9 commit 6f32980

File tree

2 files changed

+9
-14
lines changed

2 files changed

+9
-14
lines changed

src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_TaxAccount.java

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -46,22 +46,17 @@ public void onCommand(@NotNull Player sender, @NotNull String commandLabel, @Not
4646
final Block b = bIt.next();
4747
final Shop shop = plugin.getShopManager().getShop(b.getLocation());
4848
if (shop != null) {
49-
if (shop.getModerator().isModerator(sender.getUniqueId()) || QuickShop.getPermissionManager().hasPermission(sender, "quickshop.other.taxaccount")) {
50-
if (cmdArg.length < 1) {
51-
shop.setTaxAccount(null);
52-
plugin.text().of(sender, "taxaccount-unset").send();
53-
return;
54-
}
55-
if (Util.isUUID(cmdArg[0])) {
56-
shop.setTaxAccount(UUID.fromString(cmdArg[0]));
57-
} else {
58-
shop.setTaxAccount(Bukkit.getOfflinePlayer(cmdArg[0]).getUniqueId());
59-
}
60-
plugin.text().of(sender, "taxaccount-unset", cmdArg[0]).send();
49+
if (cmdArg.length < 1) {
50+
shop.setTaxAccount(null);
51+
plugin.text().of(sender, "taxaccount-unset").send();
6152
return;
53+
}
54+
if (Util.isUUID(cmdArg[0])) {
55+
shop.setTaxAccount(UUID.fromString(cmdArg[0]));
6256
} else {
63-
plugin.text().of(sender, "not-managed-shop").send();
57+
shop.setTaxAccount(Bukkit.getOfflinePlayer(cmdArg[0]).getUniqueId());
6458
}
59+
plugin.text().of(sender, "taxaccount-unset", cmdArg[0]).send();
6560
return;
6661
}
6762
}

src/main/resources/plugin.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ permissions:
6363
quickshop.staff: true
6464
quickshop.preview: true
6565
quickshop.currency: true
66-
quickshop.taxaccount: true
6766
quickshop.toggledisplay: true
6867
quickshop.moderator:
6968
description: The permission that provide all moderator need have permissions
@@ -83,6 +82,7 @@ permissions:
8382
quickshop.other.toggledisplay: true
8483
quickshop.purge: true
8584
quickshop.other.setowner: true
85+
quickshop.taxaccount: true
8686

8787

8888
quickshop.create.sell:

0 commit comments

Comments
 (0)