3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-09-08 13:52:50 +02:00

Add docs to abstract LegacyViaInjector methods

Dieser Commit ist enthalten in:
Nassim Jahnke 2021-10-01 16:33:18 +02:00
Ursprung 427b0a68d0
Commit 6e5992c168
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 6BE3B555EBC5982B
2 geänderte Dateien mit 19 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -238,9 +238,27 @@ public abstract class LegacyViaInjector implements ViaInjector {
return "decoder";
}
/**
* Returns the Vanilla server connection object the channels to be injected should be searched in.
*
* @return server connection object, or null if failed
*/
protected abstract @Nullable Object getServerConnection() throws ReflectiveOperationException;
/**
* Returns a new Via channel initializer wrapping the original one.
*
* @param oldInitializer original channel initializer
* @return wrapped Via channel initializer
*/
protected abstract WrappedChannelInitializer createChannelInitializer(ChannelInitializer<Channel> oldInitializer);
/**
* Should throw a {@link RuntimeException} with information on what/who might have caused an issue.
* Called when injection fails.
*
* @param bootstrapAcceptor head channel handler to be used when blaming
* @throws ReflectiveOperationException during reflective operation
*/
protected abstract void blame(ChannelHandler bootstrapAcceptor) throws ReflectiveOperationException;
}

Datei anzeigen

@ -46,9 +46,7 @@ public final class SynchronizedListWrapper<E> implements List<E> {
}
private void handleAdd(E o) {
synchronized (this) {
addHandler.accept(o);
}
addHandler.accept(o);
}
@Override