From d2473ee72f91608653e8701f57532de52554ff83 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Wed, 10 May 2023 20:59:42 +0200 Subject: [PATCH] Add global ItemsCommand Signed-off-by: yoyosource --- .../bausystem/features/region/ItemsCommand.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/region/ItemsCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/region/ItemsCommand.java index 3b99382d..157f16ae 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/region/ItemsCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/region/ItemsCommand.java @@ -54,6 +54,16 @@ public class ItemsCommand extends SWCommand { } } + @Register(value = "global", description = "REGION_ITEMS_HELP") + public void globalToggleCommand(@Validator Player p) { + Region region = GlobalRegion.getInstance(); + if (toggle(region)) { + RegionUtils.actionBar(region, getEnableMessage()); + } else { + RegionUtils.actionBar(region, getDisableMessage()); + } + } + private String getNoPermMessage() { return "REGION_ITEMS_NO_PERMS"; }