From a5b6eb6afabef4cdffa41b7321e1501d31246833 Mon Sep 17 00:00:00 2001 From: Outfluencer <48880402+Outfluencer@users.noreply.github.com> Date: Fri, 23 Dec 2022 00:54:57 +0100 Subject: [PATCH] #3417: Support uppercase &h in Alert command --- .../java/net/md_5/bungee/module/cmd/alert/CommandAlert.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/module/cmd-alert/src/main/java/net/md_5/bungee/module/cmd/alert/CommandAlert.java b/module/cmd-alert/src/main/java/net/md_5/bungee/module/cmd/alert/CommandAlert.java index 55d2f7b8..7e75d429 100644 --- a/module/cmd-alert/src/main/java/net/md_5/bungee/module/cmd/alert/CommandAlert.java +++ b/module/cmd-alert/src/main/java/net/md_5/bungee/module/cmd/alert/CommandAlert.java @@ -1,5 +1,6 @@ package net.md_5.bungee.module.cmd.alert; +import java.util.Locale; import net.md_5.bungee.api.ChatColor; import net.md_5.bungee.api.CommandSender; import net.md_5.bungee.api.ProxyServer; @@ -23,10 +24,10 @@ public class CommandAlert extends Command } else { StringBuilder builder = new StringBuilder(); - if ( args[0].startsWith( "&h" ) ) + if ( args[0].toLowerCase( Locale.ROOT ).startsWith( "&h" ) ) { // Remove &h - args[0] = args[0].substring( 2, args[0].length() ); + args[0] = args[0].substring( 2 ); } else { builder.append( ProxyServer.getInstance().getTranslation( "alert" ) );