Merge pull request 'Update PingCommand' (#390) from CommandPing into master
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Reviewed-on: #390 Reviewed-by: Lixfel <lixfel@steamwar.de>
Dieser Commit ist enthalten in:
Commit
7f5ef05235
@ -20,20 +20,17 @@
|
|||||||
package de.steamwar.bungeecore.commands;
|
package de.steamwar.bungeecore.commands;
|
||||||
|
|
||||||
import de.steamwar.bungeecore.Message;
|
import de.steamwar.bungeecore.Message;
|
||||||
import net.md_5.bungee.api.CommandSender;
|
import de.steamwar.command.SWCommand;
|
||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||||
|
|
||||||
public class PingCommand extends BasicCommand {
|
public class PingCommand extends SWCommand {
|
||||||
|
|
||||||
public PingCommand() {
|
public PingCommand() {
|
||||||
super("ping", "");
|
super("ping");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Register
|
||||||
public void execute(CommandSender sender, String[] args) {
|
public void genericCommand(ProxiedPlayer player) {
|
||||||
if(sender instanceof ProxiedPlayer){
|
Message.send("PING_RESPONSE", player, player.getPing());
|
||||||
ProxiedPlayer player = (ProxiedPlayer) sender;
|
|
||||||
Message.send("PING_RESPONSE", player, player.getPing());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren