More debug messages

This commit is contained in:
ME1312 2020-08-24 12:04:21 -04:00
parent d3e6d3e579
commit fa82e0ab96
No known key found for this signature in database
GPG Key ID: FEFFE2F698E88FA8
5 changed files with 26 additions and 23 deletions

View File

@ -150,7 +150,7 @@ public class ConfigUpdater {
if (i > 0) {
YAMLSection settings = new YAMLSection();
settings.set("Version", ((now.compareTo(was) <= 0)?was:now).toString());
if (updated.getMap("Settings", new YAMLSection()).contains("RemotePlayer-Cache-Interval")) settings.set("RemotePlayer-Cache-Interval", updated.getMap("Settings").getRawString("RemotePlayer-Cache-Interval"));
if (updated.getMap("Settings", new YAMLSection()).contains("RPEC-Check-Interval")) settings.set("RPEC-Check-Interval", updated.getMap("Settings").getRawString("RPEC-Check-Interval"));
settings.set("Disabled-Overrides", updated.getMap("Settings", new YAMLSection()).getRawStringList("Disabled-Overrides", Collections.emptyList()));
YAMLSection smart_fallback = new YAMLSection();

View File

@ -999,15 +999,18 @@ public final class SubProxy extends BungeeCord implements Listener {
@EventHandler(priority = Byte.MIN_VALUE)
public void resetPlayer(PlayerDisconnectEvent e) {
fallbackLimbo.remove(e.getPlayer().getUniqueId());
SubCommand.players.remove(e.getPlayer().getUniqueId());
UUID id = e.getPlayer().getUniqueId();
fallbackLimbo.remove(id);
SubCommand.players.remove(id);
Logger.get("SubServers").info("PlayerDisconnectEvent(" + id + ")");
synchronized (rPlayers) {
if (rPlayers.containsKey(e.getPlayer().getUniqueId()) && (!rPlayerLinkP.containsKey(e.getPlayer().getUniqueId()) || rPlayerLinkP.get(e.getPlayer().getUniqueId()).isMaster())) {
RemotePlayer player = rPlayers.get(e.getPlayer().getUniqueId());
rPlayerLinkS.remove(e.getPlayer().getUniqueId());
rPlayerLinkP.remove(e.getPlayer().getUniqueId());
rPlayers.remove(e.getPlayer().getUniqueId());
if (rPlayers.containsKey(id) && (!rPlayerLinkP.containsKey(id) || rPlayerLinkP.get(id).isMaster())) {
Logger.get("SubServers").info("RP::Remove(" + id + ")");
RemotePlayer player = rPlayers.get(id);
rPlayerLinkS.remove(id);
rPlayerLinkP.remove(id);
rPlayers.remove(id);
for (Proxy proxy : SubAPI.getInstance().getProxies().values()) if (proxy.getSubData()[0] != null) {
((SubDataClient) proxy.getSubData()[0]).sendPacket(new PacketExSyncPlayer(mProxy.getName(), false, player));

View File

@ -44,9 +44,9 @@ if [[ $__RETURN -eq 0 ]]; then
exit 4
fi
else
echo ERROR: Failed downloading Paper. Is PaperMC.io down?
__Restore
rm -Rf "$0"
exit 3
echo ERROR: Failed downloading Paper. Is PaperMC.io down?
__Restore
rm -Rf "$0"
exit 3
fi
exit 2

View File

@ -250,7 +250,6 @@ public final class ExProxy extends BungeeCord implements Listener {
ArrayList<RemotePlayer> add = new ArrayList<RemotePlayer>();
for (ProxiedPlayer player : getPlayers()) {
if (!rPlayers.containsKey(player.getUniqueId())) { // Add players that don't exist
Logger.get("SubServers").info("RPEC::Add(" + player.getUniqueId() + ")");
RemotePlayer p = new RemotePlayer(player);
rPlayerLinkP.put(player.getUniqueId(), p.getProxy().toLowerCase());
rPlayers.put(player.getUniqueId(), p);
@ -261,7 +260,6 @@ public final class ExProxy extends BungeeCord implements Listener {
ArrayList<RemotePlayer> remove = new ArrayList<RemotePlayer>();
for (NamedContainer<String, UUID> player : proxy.getPlayers()) { // Remove players that shouldn't exist
if (getPlayer(player.get()) == null) {
Logger.get("SubServers").info("RPEC::Remove(" + player + ")");
remove.add(rPlayers.get(player.get()));
rPlayerLinkS.remove(player.get());
rPlayerLinkP.remove(player.get());
@ -270,7 +268,6 @@ public final class ExProxy extends BungeeCord implements Listener {
}
for (UUID player : Util.getBackwards(rPlayerLinkP, api.getName().toLowerCase())) { // Remove players that shouldn't exist (internally)
if (getPlayer(player) == null) {
Logger.get("SubServers").info("RPEC::Internal(" + player + ")");
rPlayerLinkS.remove(player);
rPlayerLinkP.remove(player);
rPlayers.remove(player);
@ -537,17 +534,20 @@ public final class ExProxy extends BungeeCord implements Listener {
@EventHandler(priority = Byte.MIN_VALUE)
public void resetPlayer(PlayerDisconnectEvent e) {
fallbackLimbo.remove(e.getPlayer().getUniqueId());
SubCommand.permitted.remove(e.getPlayer().getUniqueId());
UUID id = e.getPlayer().getUniqueId();
fallbackLimbo.remove(id);
SubCommand.permitted.remove(id);
synchronized (rPlayers) {
if (rPlayers.containsKey(e.getPlayer().getUniqueId()) && (!rPlayerLinkP.containsKey(e.getPlayer().getUniqueId()) || rPlayerLinkP.get(e.getPlayer().getUniqueId()).equalsIgnoreCase(api.getName()))) {
if (rPlayers.containsKey(id) && (!rPlayerLinkP.containsKey(id) || rPlayerLinkP.get(id).equalsIgnoreCase(api.getName()))) {
RemotePlayer player = rPlayers.get(id);
rPlayerLinkS.remove(id);
rPlayerLinkP.remove(id);
rPlayers.remove(id);
if (api.getSubDataNetwork()[0] != null) {
((SubDataClient) api.getSubDataNetwork()[0]).sendPacket(new PacketExSyncPlayer(false, rPlayers.get(e.getPlayer().getUniqueId())));
((SubDataClient) api.getSubDataNetwork()[0]).sendPacket(new PacketExSyncPlayer(false, player));
}
rPlayerLinkS.remove(e.getPlayer().getUniqueId());
rPlayerLinkP.remove(e.getPlayer().getUniqueId());
rPlayers.remove(e.getPlayer().getUniqueId());
}
}
}

View File

@ -74,7 +74,7 @@ public class ConfigUpdater {
if (i > 0) {
YAMLSection settings = new YAMLSection();
settings.set("Version", ((now.compareTo(was) <= 0)?was:now).toString());
if (updated.getMap("Settings", new YAMLSection()).contains("RemotePlayer-Cache-Interval")) settings.set("RemotePlayer-Cache-Interval", updated.getMap("Settings").getRawString("RemotePlayer-Cache-Interval"));
if (updated.getMap("Settings", new YAMLSection()).contains("RPEC-Check-Interval")) settings.set("RPEC-Check-Interval", updated.getMap("Settings").getRawString("RPEC-Check-Interval"));
settings.set("Disabled-Overrides", updated.getMap("Settings", new YAMLSection()).getRawStringList("Disabled-Overrides", Collections.emptyList()));
YAMLSection smart_fallback = new YAMLSection();