mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-08-31 01:29:37 +02:00
Merge pull request #1419 from Dimatert9/master
Do not use Bukkit#sendPluginMessage
This commit is contained in:
commit
f23b8933ac
|
@ -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