From 2bc15adfdabb7b2539c9bb2dd32881d48a6ff46a Mon Sep 17 00:00:00 2001 From: yoyosource Date: Thu, 9 Dec 2021 14:53:48 +0100 Subject: [PATCH] Fix CommandPart.init --- SpigotCore_Main/src/de/steamwar/command/CommandPart.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/SpigotCore_Main/src/de/steamwar/command/CommandPart.java b/SpigotCore_Main/src/de/steamwar/command/CommandPart.java index 2c3d394..b396f71 100644 --- a/SpigotCore_Main/src/de/steamwar/command/CommandPart.java +++ b/SpigotCore_Main/src/de/steamwar/command/CommandPart.java @@ -44,6 +44,9 @@ public class CommandPart { private CommandPart next = null; public CommandPart(TypeMapper typeMapper, GuardChecker guard, Class varArgType, String optional, GuardCheckType guardCheckType) { + if (guardCheckType == GuardCheckType.TAB_COMPLETE) { + throw new IllegalArgumentException("Tab complete is not allowed as a guard check type!"); + } this.typeMapper = typeMapper; this.guard = guard; if (optional != null && varArgType != null) {