Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.evyatar.bungeecord.information;
- import org.bukkit.Bukkit;
- import org.bukkit.entity.Player;
- import org.bukkit.plugin.messaging.PluginMessageListener;
- import com.evyatar.bungeecord.Main;
- import com.evyatar.bungeecord.OnDataRecievedEvent;
- import com.google.common.io.ByteArrayDataInput;
- import com.google.common.io.ByteStreams;
- public class BungeeCord_Listener implements PluginMessageListener {
- @Override
- public void onPluginMessageReceived(String channel, Player sender, byte[] message) {
- if (!channel.equals(Main.BUNGEECORD_CHANNEL)) {
- return;
- }
- ByteArrayDataInput input = ByteStreams.newDataInput(message);
- Bukkit.getServer().getPluginManager().callEvent(new OnDataRecievedEvent(channel, input, sender));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement