Fixes some minor issues

Fixes the tab-completion for the randomly inverted game-mode not being properly matched.
Prevents the usage text from displaying for some join errors
This commit is contained in:
2024-04-04 04:28:44 +02:00
parent 09f29e5f67
commit c8fbdec64f
4 changed files with 18 additions and 22 deletions

View File

@@ -34,11 +34,11 @@ public enum DropperArenaGameMode implements ConfigurationSerializable, ArenaGame
* @param gameMode <p>The game-mode string to match</p>
* @return <p>The specified arena game-mode</p>
*/
public static @NotNull DropperArenaGameMode matchGamemode(@NotNull String gameMode) {
public static @NotNull DropperArenaGameMode matchGameMode(@NotNull String gameMode) {
String sanitized = gameMode.trim().toLowerCase();
if (sanitized.matches("(invert(ed)?|inverse)")) {
return DropperArenaGameMode.INVERTED;
} else if (sanitized.matches("rand(om)?")) {
} else if (sanitized.matches("rand(om)?_?(inverted)?")) {
return DropperArenaGameMode.RANDOM_INVERTED;
} else {
return DropperArenaGameMode.DEFAULT;