SteamWar/SpigotCore
Archiviert
13
0

Hotfix tinyprotocol

Dieser Commit ist enthalten in:
Lixfel 2021-09-14 21:14:15 +02:00
Ursprung 2f91da922f
Commit 0ba50c80e5

Datei anzeigen

@ -47,7 +47,7 @@ public abstract class TinyProtocol {
MethodInvoker networkMarkers; MethodInvoker networkMarkers;
try { try {
networkMarkers = Reflection.getTypedMethod(serverConnectionClass, null, List.class, serverConnectionClass); networkMarkers = Reflection.getTypedMethod(serverConnectionClass, null, List.class, serverConnectionClass);
} catch (IllegalStateException e) { } catch (IllegalStateException e) { // Paper, wtf why.
networkMarkers = Reflection.getTypedMethod(serverConnectionClass, null, Queue.class, serverConnectionClass); networkMarkers = Reflection.getTypedMethod(serverConnectionClass, null, Queue.class, serverConnectionClass);
} }
getNetworkMarkers = networkMarkers; getNetworkMarkers = networkMarkers;
@ -65,7 +65,7 @@ public abstract class TinyProtocol {
private Set<Channel> uninjectedChannels = Collections.newSetFromMap(new MapMaker().weakKeys().<Channel, Boolean>makeMap()); private Set<Channel> uninjectedChannels = Collections.newSetFromMap(new MapMaker().weakKeys().<Channel, Boolean>makeMap());
// List of network markers // List of network markers
private List<Object> networkManagers; private Collection<Object> networkManagers;
// Injected channel handlers // Injected channel handlers
private List<Channel> serverChannels = Lists.newArrayList(); private List<Channel> serverChannels = Lists.newArrayList();
@ -196,7 +196,7 @@ public abstract class TinyProtocol {
boolean looking = true; boolean looking = true;
// We need to synchronize against this list // We need to synchronize against this list
networkManagers = (List<Object>) getNetworkMarkers.invoke(null, serverConnection); networkManagers = (Collection<Object>) getNetworkMarkers.invoke(null, serverConnection);
createServerChannelHandler(); createServerChannelHandler();
// Find the correct list, or implicitly throw an exception // Find the correct list, or implicitly throw an exception