Changed sync delay to 10 ticks to improve reliability.

This commit is contained in:
Aust1n46 2016-09-08 17:54:19 -04:00
parent 7c307fa71b
commit 61d54ed9af
3 changed files with 4 additions and 2 deletions

View File

@ -707,7 +707,7 @@ public class MineverseChat extends JavaPlugin implements PluginMessageListener {
p.getPlayer().sendPluginMessage(this, "VentureChat", outstream.toByteArray());
break;
}
// System.out.println("Sync start bottom...");
//System.out.println("Sync start bottom...");
out.close();
}
catch(IOException e) {
@ -798,6 +798,7 @@ public class MineverseChat extends JavaPlugin implements PluginMessageListener {
}
}
if(subchannel.equals("Sync")) {
//System.out.println("Received update...");
String uuid = msgin.readUTF();
MineverseChatPlayer p = MineverseChatAPI.getMineverseChatPlayer(UUID.fromString(uuid));
for(Object ch : p.getListening().toArray()) {

View File

@ -345,6 +345,7 @@ public class MineverseChatBungee extends Plugin implements Listener {
//System.out.println("Sync received...");
String identifier = in.readUTF();
if(identifier.equals("Receive")) {
//System.out.println("Sending update...");
String server = ser.getInfo().getName();
UUID uuid = UUID.fromString(in.readUTF());
SynchronizedMineverseChatPlayer smcp = MineverseChatAPI.getSynchronizedMineverseChatPlayer(uuid);

View File

@ -118,7 +118,7 @@ public class LoginListener implements Listener {
public void run() {
plugin.synchronize(sync, false);
}
}, 1L);
}, 10L);
if(!plugin.getConfig().getConfigurationSection("login").getString("message", "Default").equalsIgnoreCase("Default")) {
event.setJoinMessage(Format.FormatStringAll(plugin.getConfig().getConfigurationSection("login").getString("message", "Default").replace("{player}", event.getPlayer().getName())));
}