From ec56816612e1dd636e1a1806510ba410e45233fe Mon Sep 17 00:00:00 2001 From: hhhzzzsss Date: Thu, 23 May 2024 13:13:39 -0500 Subject: [PATCH] Prevent prefix from starting with a slash --- .../com/github/hhhzzzsss/songplayer/CommandProcessor.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/github/hhhzzzsss/songplayer/CommandProcessor.java b/src/main/java/com/github/hhhzzzsss/songplayer/CommandProcessor.java index 6635032..8f4e4a4 100644 --- a/src/main/java/com/github/hhhzzzsss/songplayer/CommandProcessor.java +++ b/src/main/java/com/github/hhhzzzsss/songplayer/CommandProcessor.java @@ -185,6 +185,10 @@ public class CommandProcessor { SongPlayer.addChatMessage("§cPrefix cannot contain a space"); return true; } + else if (args.startsWith("/")) { + SongPlayer.addChatMessage("§cPrefix cannot start with a /"); + return true; + } else if (args.length() > 0) { Config.getConfig().prefix = args; SongPlayer.addChatMessage("§6Set prefix to " + args);