Skip to content

Commit 992c9e6

Browse files
IgorvLuckyyy
authored andcommitted
GH-573 Very importanto fix adding clear command (#573)
Added permission for /clear command.
1 parent bd9928a commit 992c9e6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

eternalcore-core/src/main/java/com/eternalcode/core/feature/essentials/container/InventoryClearCommand.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@
66
import com.eternalcode.core.viewer.Viewer;
77
import dev.rollczi.litecommands.argument.Arg;
88
import dev.rollczi.litecommands.command.execute.Execute;
9+
import dev.rollczi.litecommands.command.permission.Permission;
910
import dev.rollczi.litecommands.command.route.Route;
1011
import org.bukkit.entity.Player;
1112
import org.bukkit.inventory.ItemStack;
1213

1314
@Route(name = "clear")
15+
@Permission("eternalcore.clear")
1416
class InventoryClearCommand {
1517

1618
private final NoticeService noticeService;
@@ -34,6 +36,7 @@ void execute(Player player) {
3436

3537
@Execute(required = 1)
3638
@DescriptionDocs(description = "Clears inventory of player", arguments = "<player>")
39+
@Permission("eternalcore.clear.other")
3740
void execute(Viewer audience, @Arg Player target) {
3841
this.clear(target);
3942

0 commit comments

Comments
 (0)