Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-11-03 14:50:30 +01:00
Add docs to abstract LegacyViaInjector methods
Dieser Commit ist enthalten in:
Ursprung
427b0a68d0
Commit
6e5992c168
@ -238,9 +238,27 @@ public abstract class LegacyViaInjector implements ViaInjector {
|
|||||||
return "decoder";
|
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;
|
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);
|
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;
|
protected abstract void blame(ChannelHandler bootstrapAcceptor) throws ReflectiveOperationException;
|
||||||
}
|
}
|
@ -46,9 +46,7 @@ public final class SynchronizedListWrapper<E> implements List<E> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void handleAdd(E o) {
|
private void handleAdd(E o) {
|
||||||
synchronized (this) {
|
addHandler.accept(o);
|
||||||
addHandler.accept(o);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren