mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-10-31 07:39:42 +01: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) {
|
public BanEntry banIp(String ip, String reason, Date expires, String source) {
|
||||||
return Bukkit.getServer().getBanList(BanList.Type.IP).addBan(ip, reason, expires, 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;
|
package fr.xephi.authme.service.bungeecord;
|
||||||
|
|
||||||
|
import com.google.common.collect.Iterables;
|
||||||
import com.google.common.io.ByteArrayDataOutput;
|
import com.google.common.io.ByteArrayDataOutput;
|
||||||
import com.google.common.io.ByteStreams;
|
import com.google.common.io.ByteStreams;
|
||||||
import fr.xephi.authme.AuthMe;
|
import fr.xephi.authme.AuthMe;
|
||||||
@ -52,7 +53,10 @@ public class BungeeSender implements SettingsDependent {
|
|||||||
for (String element : data) {
|
for (String element : data) {
|
||||||
out.writeUTF(element);
|
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