Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-25 15:50:10 +01:00
Avoid relocation issues on BungeeCord
Dieser Commit ist enthalten in:
Ursprung
d50ceaa172
Commit
7b1eefb115
@ -2,7 +2,6 @@ package us.myles.ViaVersion;
|
|||||||
|
|
||||||
import com.google.gson.JsonObject;
|
import com.google.gson.JsonObject;
|
||||||
import net.md_5.bungee.api.ProxyServer;
|
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.connection.ProxiedPlayer;
|
||||||
import net.md_5.bungee.api.event.PlayerDisconnectEvent;
|
import net.md_5.bungee.api.event.PlayerDisconnectEvent;
|
||||||
import net.md_5.bungee.api.plugin.Listener;
|
import net.md_5.bungee.api.plugin.Listener;
|
||||||
@ -111,13 +110,13 @@ public class BungeePlugin extends Plugin implements ViaPlatform, Listener {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void sendMessage(UUID uuid, String message) {
|
public void sendMessage(UUID uuid, String message) {
|
||||||
getProxy().getPlayer(uuid).sendMessage(TextComponent.fromLegacyText(message));
|
getProxy().getPlayer(uuid).sendMessage(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean kickPlayer(UUID uuid, String message) {
|
public boolean kickPlayer(UUID uuid, String message) {
|
||||||
if (getProxy().getPlayer(uuid) != null) {
|
if (getProxy().getPlayer(uuid) != null) {
|
||||||
getProxy().getPlayer(uuid).disconnect(TextComponent.fromLegacyText(message));
|
getProxy().getPlayer(uuid).disconnect(message);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -2,7 +2,6 @@ package us.myles.ViaVersion.bungee.commands;
|
|||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import net.md_5.bungee.api.CommandSender;
|
import net.md_5.bungee.api.CommandSender;
|
||||||
import net.md_5.bungee.api.chat.TextComponent;
|
|
||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||||
import us.myles.ViaVersion.api.command.ViaCommandSender;
|
import us.myles.ViaVersion.api.command.ViaCommandSender;
|
||||||
|
|
||||||
@ -19,7 +18,7 @@ public class BungeeCommandSender implements ViaCommandSender {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void sendMessage(String msg) {
|
public void sendMessage(String msg) {
|
||||||
sender.sendMessage(TextComponent.fromLegacyText(msg));
|
sender.sendMessage(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren