From bcb8b31ba99ab5b3b16d03c9f6ea3bc395792188 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Sat, 16 Dec 2023 14:51:24 +0100 Subject: [PATCH] Add Permission.MEMBER --- BauSystem_Main/src/de/steamwar/bausystem/Permission.java | 3 +++ .../de/steamwar/bausystem/features/util/ClearCommand.java | 7 ------- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/Permission.java b/BauSystem_Main/src/de/steamwar/bausystem/Permission.java index 68900972..40978989 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/Permission.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/Permission.java @@ -40,6 +40,9 @@ public enum Permission { }), SPECTATOR(bauweltMember -> { return !BUILD.permissionPredicate.test(bauweltMember); + }), + MEMBER(bauweltMember -> { + return true; }); private final Predicate permissionPredicate; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/util/ClearCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/util/ClearCommand.java index 3e8899d6..1df08e5d 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/util/ClearCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/util/ClearCommand.java @@ -48,13 +48,6 @@ public class ClearCommand extends SWCommand { BauSystem.MESSAGE.send("OTHER_CLEAR_TO", p, target.getName()); } - @ClassValidator(value = Player.class, local = true) - public TypeValidator validator() { - return (commandSender, player, messageSender) -> { - return !messageSender.send(!Permission.hasPermission(player, Permission.WORLD), "OTHER_CLEAR_NO_PERMS"); - }; - } - private void clear(Player player) { player.getInventory().clear(); player.getInventory().setHelmet(new ItemStack(Material.AIR));