fixed messages from commands not disabling correctly
This commit is contained in:
+2
@@ -1,6 +1,7 @@
|
|||||||
package us.ajg0702.queue.platforms.bungeecord.commands;
|
package us.ajg0702.queue.platforms.bungeecord.commands;
|
||||||
|
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
|
import net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer;
|
||||||
import net.md_5.bungee.api.CommandSender;
|
import net.md_5.bungee.api.CommandSender;
|
||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
@@ -27,6 +28,7 @@ public class BungeeSender implements ICommandSender {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void sendMessage(@NotNull Component message) {
|
public void sendMessage(@NotNull Component message) {
|
||||||
|
if(PlainTextComponentSerializer.plainText().serialize(message).isEmpty()) return;
|
||||||
BungeeQueue.adventure().sender(handle).sendMessage(message);
|
BungeeQueue.adventure().sender(handle).sendMessage(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
@@ -3,6 +3,7 @@ package us.ajg0702.queue.platforms.velocity.commands;
|
|||||||
import com.velocitypowered.api.command.CommandSource;
|
import com.velocitypowered.api.command.CommandSource;
|
||||||
import com.velocitypowered.api.proxy.ConsoleCommandSource;
|
import com.velocitypowered.api.proxy.ConsoleCommandSource;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
|
import net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import us.ajg0702.queue.api.commands.ICommandSender;
|
import us.ajg0702.queue.api.commands.ICommandSender;
|
||||||
|
|
||||||
@@ -26,6 +27,7 @@ public class VelocitySender implements ICommandSender {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void sendMessage(@NotNull Component message) {
|
public void sendMessage(@NotNull Component message) {
|
||||||
|
if(PlainTextComponentSerializer.plainText().serialize(message).isEmpty()) return;
|
||||||
handle.sendMessage(message);
|
handle.sendMessage(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user