Skip to content

Commit 149c178

Browse files
committed
FIX
1 parent f364302 commit 149c178

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

src/main/java/org/referix/birthDayReload/command/MainCommand.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ public List<String> complete(CommandSender sender, String[] args) {
217217
if (sender.hasPermission("birthday.delete")) completions.add("delete");
218218
if (sender.hasPermission("birthday.list")) completions.add("list");
219219
if (sender.hasPermission("birthday.reload")) completions.add("reload");
220-
if (sender.hasPermission("birthday.inventory")) completions.add("present");
220+
if (sender.hasPermission("birthday.present")) completions.add("present");
221221

222222
return filterSuggestions(completions, args[0]);
223223
}
@@ -242,12 +242,10 @@ public List<String> complete(CommandSender sender, String[] args) {
242242
break;
243243

244244
case "present":
245-
if (sender.hasPermission("birthday.inventory")) {
245+
if (sender.hasPermission("birthday.present")) {
246246
// Подкоманды для управления инвентарем
247-
completions.add("open");
248-
completions.add("save");
249-
completions.add("remove");
250-
completions.add("give");
247+
if(sender.hasPermission("birthday.present.open")) completions.add("open");
248+
if(sender.hasPermission("birthday.present.give")) completions.add("give");
251249
}
252250
break;
253251

src/main/resources/plugin.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,12 @@ permissions:
2424
birthday.list:
2525
description: Allow listing all birthday data
2626
default: op
27+
birthday.present:
28+
description: Allow present command
29+
default: op
2730
birthday.present.open:
2831
description: Allow adding items to the birthday present
2932
default: op
30-
birthday.present.save:
31-
description: Allow saving the birthday present
32-
default: op
33-
birthday.present.remove:
34-
description: Allow removing items from the birthday present
35-
default: op
3633
birthday.present.give:
3734
description: Allow giving the birthday present to a player
3835
default: op

0 commit comments

Comments
 (0)