Package com.comphenix.protocol.injector
Class PacketFilterBuilder
java.lang.Object
com.comphenix.protocol.injector.PacketFilterBuilder
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Create a new packet filter manager.Retrieve the asynchronous manager.org.bukkit.plugin.PluginRetrieve a reference to the current ProtocolLib instance.Retrieve the current Minecraft version.Retrieve the error reporter.org.bukkit.ServerRetrieve the current CraftBukkit server.library(ProtocolLib library) Set a reference to the plugin instance of ProtocolLib.minecraftVersion(MinecraftVersion mcVersion) Set the current Minecraft version.reporter(ErrorReporter reporter) Set the error reporter.server(org.bukkit.Server server) Set the current server.
-
Constructor Details
-
PacketFilterBuilder
public PacketFilterBuilder()
-
-
Method Details
-
server
Set the current server.- Parameters:
server- - current server.- Returns:
- This builder, for chaining.
-
library
Set a reference to the plugin instance of ProtocolLib.- Parameters:
library- - plugin instance.- Returns:
- This builder, for chaining.
-
minecraftVersion
Set the current Minecraft version.- Parameters:
mcVersion- - Minecraft version.- Returns:
- This builder, for chaining.
-
reporter
Set the error reporter.- Parameters:
reporter- - new error reporter.- Returns:
- This builder, for chaining.
-
getServer
public org.bukkit.Server getServer()Retrieve the current CraftBukkit server.- Returns:
- Current server.
-
getLibrary
public org.bukkit.plugin.Plugin getLibrary()Retrieve a reference to the current ProtocolLib instance.- Returns:
- ProtocolLib.
-
getMinecraftVersion
Retrieve the current Minecraft version.- Returns:
- Current version.
-
getReporter
Retrieve the error reporter.- Returns:
- Error reporter.
-
getAsyncManager
Retrieve the asynchronous manager.This is first constructed the
build()method.- Returns:
- The asynchronous manager.
-
build
Create a new packet filter manager.- Returns:
- A new packet filter manager.
-