public static class PacketAdapter.AdapterParameteters
extends java.lang.Object
Note: Never make spelling mistakes in a public API!
| Constructor and Description |
|---|
PacketAdapter.AdapterParameteters() |
| Modifier and Type | Method and Description |
|---|---|
PacketAdapter.AdapterParameteters |
clientSide()
Set this adapter to also look for client-side packets.
|
PacketAdapter.AdapterParameteters |
connectionSide(ConnectionSide connectionSide)
Set the packet types this listener is looking for.
|
PacketAdapter.AdapterParameteters |
gamePhase(GamePhase gamePhase)
Set which game phase this listener is active under.
|
PacketAdapter.AdapterParameteters |
listenerPriority(ListenerPriority listenerPriority)
Set the the event priority, where the execution is in ascending order from lowest to highest.
|
PacketAdapter.AdapterParameteters |
loginPhase()
Set the game phase to
GamePhase.LOGIN, allowing ProtocolLib to intercept login packets. |
PacketAdapter.AdapterParameteters |
optionAsync()
Set the listener option to
ListenerOptions.ASYNC, indicating that our listener is thread safe. |
PacketAdapter.AdapterParameteters |
optionIntercept()
Set the listener option to
ListenerOptions.INTERCEPT_INPUT_BUFFER, causing ProtocolLib to read the raw packet data from the network stream. |
PacketAdapter.AdapterParameteters |
optionManualGamePhase()
Set the listener option to
ListenerOptions.DISABLE_GAMEPHASE_DETECTION, causing ProtocolLib to ignore automatic game phase detection. |
PacketAdapter.AdapterParameteters |
options(ListenerOptions... options)
Set listener options that decide whether or not to intercept the raw packet data as read from the network stream.
|
PacketAdapter.AdapterParameteters |
options(java.util.Set<? extends ListenerOptions> options)
Set listener options that decide whether or not to intercept the raw packet data as read from the network stream.
|
PacketAdapter.AdapterParameteters |
packets(java.lang.Integer... packets)
Deprecated.
|
PacketAdapter.AdapterParameteters |
packets(java.util.Set<java.lang.Integer> packets)
Deprecated.
|
PacketAdapter.AdapterParameteters |
plugin(org.bukkit.plugin.Plugin plugin)
Set the plugin that spawned this listener.
|
PacketAdapter.AdapterParameteters |
serverSide()
Set this adapter to also look for server-side packets.
|
PacketAdapter.AdapterParameteters |
types(PacketType... packets)
Set the packet types the listener is looking for.
|
PacketAdapter.AdapterParameteters |
types(java.util.Set<PacketType> packets)
Set the packet types the listener is looking for.
|
public PacketAdapter.AdapterParameteters plugin(@Nonnull org.bukkit.plugin.Plugin plugin)
plugin - - the plugin.public PacketAdapter.AdapterParameteters connectionSide(@Nonnull ConnectionSide connectionSide)
connectionSide - - the new packet type.public PacketAdapter.AdapterParameteters clientSide()
public PacketAdapter.AdapterParameteters serverSide()
public PacketAdapter.AdapterParameteters listenerPriority(@Nonnull ListenerPriority listenerPriority)
Default is ListenerPriority.NORMAL.
listenerPriority - - the new event priority.public PacketAdapter.AdapterParameteters gamePhase(@Nonnull GamePhase gamePhase)
Default is GamePhase.PLAYING, which will not intercept login packets.
gamePhase - - the new game phase.public PacketAdapter.AdapterParameteters loginPhase()
GamePhase.LOGIN, allowing ProtocolLib to intercept login packets.public PacketAdapter.AdapterParameteters options(@Nonnull ListenerOptions... options)
The default is to disable this raw packet interception.
options - - every option to use.public PacketAdapter.AdapterParameteters options(@Nonnull java.util.Set<? extends ListenerOptions> options)
The default is to disable this raw packet interception.
options - - every option to use.public PacketAdapter.AdapterParameteters optionIntercept()
ListenerOptions.INTERCEPT_INPUT_BUFFER, causing ProtocolLib to read the raw packet data from the network stream.public PacketAdapter.AdapterParameteters optionManualGamePhase()
ListenerOptions.DISABLE_GAMEPHASE_DETECTION, causing ProtocolLib to ignore automatic game phase detection.
This is no longer relevant in 1.7.2.
public PacketAdapter.AdapterParameteters optionAsync()
ListenerOptions.ASYNC, indicating that our listener is thread safe.
This allows ProtocolLib to perform certain optimizations.
@Deprecated public PacketAdapter.AdapterParameteters packets(@Nonnull java.lang.Integer... packets)
This parameter is required.
Deprecated: Use types(PacketType...) instead.
packets - - the packet IDs to look for.@Deprecated public PacketAdapter.AdapterParameteters packets(@Nonnull java.util.Set<java.lang.Integer> packets)
This parameter is required.
packets - - a set of the packet IDs to look for.public PacketAdapter.AdapterParameteters types(@Nonnull PacketType... packets)
This parameter is required.
packets - - the packet types to look for.public PacketAdapter.AdapterParameteters types(@Nonnull java.util.Set<PacketType> packets)
This parameter is required.
packets - - a set of packet types to look for.