public class PacketFilterBuilder
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static ReportType |
REPORT_SPIGOT_IS_DELAYING_INJECTOR |
static ReportType |
REPORT_TEMPORARY_EVENT_ERROR |
Constructor and Description |
---|
PacketFilterBuilder() |
Modifier and Type | Method and Description |
---|---|
InternalManager |
build()
Create a new packet filter manager.
|
PacketFilterBuilder |
classLoader(java.lang.ClassLoader classLoader)
Update the current class loader.
|
AsyncFilterManager |
getAsyncManager()
Retrieve the asynchronous manager.
|
java.lang.ClassLoader |
getClassLoader()
Retrieve the class loader set in this builder.
|
org.bukkit.plugin.Plugin |
getLibrary()
Retrieve a reference to the current ProtocolLib instance.
|
MinecraftVersion |
getMinecraftVersion()
Retrieve the current Minecraft version.
|
ErrorReporter |
getReporter()
Retrieve the error reporter.
|
org.bukkit.Server |
getServer()
Retrieve the current CraftBukkit server.
|
DelayedSingleTask |
getUnhookTask()
Retrieve the task that is used to delay unhooking when ProtocolLib is no in use.
|
boolean |
isNettyEnabled()
Determine if we should prepare to hook Netty in Spigot.
|
PacketFilterBuilder |
library(org.bukkit.plugin.Plugin library)
Set a reference to the plugin instance of ProtocolLib.
|
PacketFilterBuilder |
minecraftVersion(MinecraftVersion mcVersion)
Set the current Minecraft version.
|
PacketFilterBuilder |
reporter(ErrorReporter reporter)
Set the error reporter.
|
PacketFilterBuilder |
server(org.bukkit.Server server)
Set the current server.
|
PacketFilterBuilder |
unhookTask(DelayedSingleTask unhookTask)
Set the task used to delay unhooking when ProtocolLib is no in use.
|
public static final ReportType REPORT_TEMPORARY_EVENT_ERROR
public static final ReportType REPORT_SPIGOT_IS_DELAYING_INJECTOR
public PacketFilterBuilder classLoader(@Nonnull java.lang.ClassLoader classLoader)
classLoader
- - current class loader.public PacketFilterBuilder server(@Nonnull org.bukkit.Server server)
server
- - current server.public PacketFilterBuilder library(@Nonnull org.bukkit.plugin.Plugin library)
library
- - plugin instance.public PacketFilterBuilder minecraftVersion(@Nonnull MinecraftVersion mcVersion)
mcVersion
- - Minecraft version.public PacketFilterBuilder unhookTask(@Nonnull DelayedSingleTask unhookTask)
unhookTask
- - the unhook task.public PacketFilterBuilder reporter(@Nonnull ErrorReporter reporter)
reporter
- - new error reporter.public boolean isNettyEnabled()
This is calculated in the build()
method.
public java.lang.ClassLoader getClassLoader()
public org.bukkit.Server getServer()
public org.bukkit.plugin.Plugin getLibrary()
public MinecraftVersion getMinecraftVersion()
public DelayedSingleTask getUnhookTask()
public ErrorReporter getReporter()
public AsyncFilterManager getAsyncManager()
This is first constructed the build()
method.
public InternalManager build()