forked from SteamWar/SteamWar
Fix MsgCommand being able to /r to offline players
This commit is contained in:
@@ -20,6 +20,8 @@
|
||||
package de.steamwar.velocitycore.commands;
|
||||
|
||||
import com.velocitypowered.api.proxy.Player;
|
||||
import com.velocitypowered.proxy.Velocity;
|
||||
import de.steamwar.velocitycore.VelocityCore;
|
||||
import de.steamwar.velocitycore.listeners.ChatListener;
|
||||
import de.steamwar.command.SWCommand;
|
||||
import de.steamwar.messages.Chatter;
|
||||
@@ -41,7 +43,7 @@ public class MsgCommand extends SWCommand {
|
||||
}
|
||||
|
||||
public static void msg(PlayerChatter sender, Player target, String[] args) {
|
||||
if(target == null || target.getCurrentServer().isEmpty()) {
|
||||
if(target == null || VelocityCore.getProxy().getPlayer(target.getUniqueId()).orElse(null) == null) {
|
||||
sender.system("MSG_OFFLINE");
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user