use of me.itsmas.network.server.network.redis.RedisNetwork in project Network-depr by Mas281.
the class Core method onEnable.
@Override
public void onEnable() {
saveDefaultConfig();
moduleManager = new ModuleManager();
database = new MongoDB(this);
commandManager = new CommandManager(this);
chatManager = new ChatManager(this);
network = new RedisNetwork(this);
userManager = new UserManager(this);
taskManager = new TaskManager(this);
lang = new Lang(this);
}
use of me.itsmas.network.server.network.redis.RedisNetwork in project Network-depr by Mas281.
the class BungeeListener method onPluginMessageReceived.
@Override
public void onPluginMessageReceived(String channel, Player unused, byte[] data) {
ByteArrayDataInput in = ByteStreams.newDataInput(data);
if (channel.equals("BungeeCord")) {
switch(in.readUTF()) {
case "GetServer":
{
String serverName = in.readUTF();
log("Received server name: %s ", serverName);
module.setServerName(serverName);
if (module instanceof RedisNetwork) {
((RedisNetwork) module).resetQueue();
}
break;
}
case "GetServers":
{
Set<String> servers = Sets.newHashSet(in.readUTF().split(", "));
module.setServers(Collections.unmodifiableSet(servers));
break;
}
}
} else if (channel.equals("ServerUpdates")) {
switch(in.readUTF()) {
case "ProxyLeave":
{
String player = in.readUTF();
module.removeTrackingData(player);
}
}
}
}
Aggregations