mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-27 12:45:57 +01:00
Do not use Bukkit#sendPluginMessage
This commit is contained in:
parent
ce490304ea
commit
0e0d8dff3d
@ -363,8 +363,4 @@ public class BukkitService implements SettingsDependent {
|
||||
public BanEntry banIp(String ip, String reason, Date expires, String source) {
|
||||
return Bukkit.getServer().getBanList(BanList.Type.IP).addBan(ip, reason, expires, source);
|
||||
}
|
||||
|
||||
public void sendPluginMessage(String channel, byte[] data) {
|
||||
Bukkit.getServer().sendPluginMessage(authMe, channel, data);
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package fr.xephi.authme.service.bungeecord;
|
||||
|
||||
import com.google.common.collect.Iterables;
|
||||
import com.google.common.io.ByteArrayDataOutput;
|
||||
import com.google.common.io.ByteStreams;
|
||||
import fr.xephi.authme.AuthMe;
|
||||
@ -52,7 +53,10 @@ public class BungeeSender implements SettingsDependent {
|
||||
for (String element : data) {
|
||||
out.writeUTF(element);
|
||||
}
|
||||
bukkitService.sendPluginMessage("BungeeCord", out.toByteArray());
|
||||
Player player = Iterables.getFirst(plugin.getServer().getOnlinePlayers(), null);
|
||||
if (player != null) {
|
||||
player.sendPluginMessage(plugin, "BungeeCord", out.toByteArray());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user