SteamWar/BungeeCore
Archiviert
13
2

Fix empty MsgCommand and RCommand
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
yoyosource 2022-06-16 20:54:07 +02:00
Ursprung 789bb62a14
Commit 9b1a394cb2
2 geänderte Dateien mit 10 neuen und 0 gelöschten Zeilen

Datei anzeigen

@ -19,6 +19,7 @@
package de.steamwar.bungeecore.commands; package de.steamwar.bungeecore.commands;
import de.steamwar.bungeecore.Message;
import de.steamwar.bungeecore.listeners.ChatListener; import de.steamwar.bungeecore.listeners.ChatListener;
import de.steamwar.bungeecore.sql.IgnoreSystem; import de.steamwar.bungeecore.sql.IgnoreSystem;
import de.steamwar.command.SWCommand; import de.steamwar.command.SWCommand;
@ -37,6 +38,10 @@ public class MsgCommand extends SWCommand {
@Register(description = "MSG_USAGE") @Register(description = "MSG_USAGE")
public void genericCommand(ProxiedPlayer sender, ProxiedPlayer target, String... message) { public void genericCommand(ProxiedPlayer sender, ProxiedPlayer target, String... message) {
if (message.length == 0) {
Message.send("MSG_USAGE", sender);
return;
}
msg(sender, target, message); msg(sender, target, message);
} }

Datei anzeigen

@ -19,6 +19,7 @@
package de.steamwar.bungeecore.commands; package de.steamwar.bungeecore.commands;
import de.steamwar.bungeecore.Message;
import de.steamwar.command.SWCommand; import de.steamwar.command.SWCommand;
import net.md_5.bungee.api.connection.ProxiedPlayer; import net.md_5.bungee.api.connection.ProxiedPlayer;
@ -32,6 +33,10 @@ public class RCommand extends SWCommand {
@Register(description = "R_USAGE") @Register(description = "R_USAGE")
public void genericCommand(ProxiedPlayer player, String... message) { public void genericCommand(ProxiedPlayer player, String... message) {
if (message.length == 0) {
Message.send("R_USAGE", player);
return;
}
MsgCommand.msg(player, lastChats.get(player), message); MsgCommand.msg(player, lastChats.get(player), message);
} }
} }