From 7b1eefb1152e11e9a87c59a2ef27cb5b95e60553 Mon Sep 17 00:00:00 2001 From: Myles Date: Tue, 23 Apr 2019 17:22:57 +0100 Subject: [PATCH] Avoid relocation issues on BungeeCord --- bungee/src/main/java/us/myles/ViaVersion/BungeePlugin.java | 5 ++--- .../ViaVersion/bungee/commands/BungeeCommandSender.java | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/bungee/src/main/java/us/myles/ViaVersion/BungeePlugin.java b/bungee/src/main/java/us/myles/ViaVersion/BungeePlugin.java index 72142e311..6f3cc1b81 100644 --- a/bungee/src/main/java/us/myles/ViaVersion/BungeePlugin.java +++ b/bungee/src/main/java/us/myles/ViaVersion/BungeePlugin.java @@ -2,7 +2,6 @@ package us.myles.ViaVersion; import com.google.gson.JsonObject; import net.md_5.bungee.api.ProxyServer; -import net.md_5.bungee.api.chat.TextComponent; import net.md_5.bungee.api.connection.ProxiedPlayer; import net.md_5.bungee.api.event.PlayerDisconnectEvent; import net.md_5.bungee.api.plugin.Listener; @@ -111,13 +110,13 @@ public class BungeePlugin extends Plugin implements ViaPlatform, Listener { @Override public void sendMessage(UUID uuid, String message) { - getProxy().getPlayer(uuid).sendMessage(TextComponent.fromLegacyText(message)); + getProxy().getPlayer(uuid).sendMessage(message); } @Override public boolean kickPlayer(UUID uuid, String message) { if (getProxy().getPlayer(uuid) != null) { - getProxy().getPlayer(uuid).disconnect(TextComponent.fromLegacyText(message)); + getProxy().getPlayer(uuid).disconnect(message); return true; } return false; diff --git a/bungee/src/main/java/us/myles/ViaVersion/bungee/commands/BungeeCommandSender.java b/bungee/src/main/java/us/myles/ViaVersion/bungee/commands/BungeeCommandSender.java index 2b427cb3e..5b9e43382 100644 --- a/bungee/src/main/java/us/myles/ViaVersion/bungee/commands/BungeeCommandSender.java +++ b/bungee/src/main/java/us/myles/ViaVersion/bungee/commands/BungeeCommandSender.java @@ -2,7 +2,6 @@ package us.myles.ViaVersion.bungee.commands; import lombok.AllArgsConstructor; import net.md_5.bungee.api.CommandSender; -import net.md_5.bungee.api.chat.TextComponent; import net.md_5.bungee.api.connection.ProxiedPlayer; import us.myles.ViaVersion.api.command.ViaCommandSender; @@ -19,7 +18,7 @@ public class BungeeCommandSender implements ViaCommandSender { @Override public void sendMessage(String msg) { - sender.sendMessage(TextComponent.fromLegacyText(msg)); + sender.sendMessage(msg); } @Override