mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2025-02-02 12:51:22 +01:00
More changes involving BaseProtocol - not tested yet
This commit is contained in:
parent
051df7401e
commit
31a1bf35d9
@ -117,6 +117,10 @@ public class BungeeServerHandler implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
info.setServerProtocolVersion(protocolId);
|
||||||
|
// Add version-specific base Protocol
|
||||||
|
pipeline.add(ProtocolRegistry.getBaseProtocol(protocolId));
|
||||||
|
|
||||||
user.put(info);
|
user.put(info);
|
||||||
user.put(storage);
|
user.put(storage);
|
||||||
|
|
||||||
|
@ -72,6 +72,7 @@ public abstract class Protocol {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialise a user for this protocol setting up objects.
|
* Initialise a user for this protocol setting up objects.
|
||||||
|
* /!\ WARNING - May be called more than once in a single {@link UserConnection}
|
||||||
*
|
*
|
||||||
* @param userConnection The user to initialise
|
* @param userConnection The user to initialise
|
||||||
*/
|
*/
|
||||||
|
@ -16,7 +16,7 @@ import java.util.concurrent.CopyOnWriteArrayList;
|
|||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
public class ProtocolPipeline extends Protocol {
|
public class ProtocolPipeline extends Protocol {
|
||||||
List<Protocol> protocolList;
|
private List<Protocol> protocolList;
|
||||||
private UserConnection userConnection;
|
private UserConnection userConnection;
|
||||||
|
|
||||||
public ProtocolPipeline(UserConnection userConnection) {
|
public ProtocolPipeline(UserConnection userConnection) {
|
||||||
@ -48,7 +48,7 @@ public class ProtocolPipeline extends Protocol {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a protocol to the current pipeline
|
* Add a protocol to the current pipeline
|
||||||
* This will call the Protocol#init method.
|
* This will call the {@link Protocol#init(UserConnection)} method.
|
||||||
*
|
*
|
||||||
* @param protocol The protocol to add to the end
|
* @param protocol The protocol to add to the end
|
||||||
*/
|
*/
|
||||||
@ -174,6 +174,10 @@ public class ProtocolPipeline extends Protocol {
|
|||||||
return protocolList;
|
return protocolList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Cleans the pipe and adds {@link us.myles.ViaVersion.protocols.base.BaseProtocol}
|
||||||
|
* /!\ WARNING - It doesn't add version-specific base Protocol
|
||||||
|
*/
|
||||||
public void cleanPipes() {
|
public void cleanPipes() {
|
||||||
pipes().clear();
|
pipes().clear();
|
||||||
registerPackets();
|
registerPackets();
|
||||||
|
Loading…
Reference in New Issue
Block a user