public class BukkitUnwrapper extends java.lang.Object implements PacketConstructor.Unwrapper
Typical conversions include:
Modifier and Type | Field and Description |
---|---|
static ReportType |
REPORT_CANNOT_FIND_UNWRAP_METHOD |
static ReportType |
REPORT_CANNOT_READ_FIELD_HANDLE |
static ReportType |
REPORT_ILLEGAL_ARGUMENT |
static ReportType |
REPORT_SECURITY_LIMITATION |
Constructor and Description |
---|
BukkitUnwrapper()
Construct a new Bukkit unwrapper with ProtocolLib's default error reporter.
|
BukkitUnwrapper(ErrorReporter reporter)
Construct a new Bukkit unwrapper with the given error reporter.
|
Modifier and Type | Method and Description |
---|---|
static BukkitUnwrapper |
getInstance()
Retrieve the default instance of the Bukkit unwrapper.
|
java.lang.Object |
unwrapItem(java.lang.Object wrappedObject)
Convert the given wrapped object to the equivalent net.minecraft.server object.
|
public static final ReportType REPORT_ILLEGAL_ARGUMENT
public static final ReportType REPORT_SECURITY_LIMITATION
public static final ReportType REPORT_CANNOT_FIND_UNWRAP_METHOD
public static final ReportType REPORT_CANNOT_READ_FIELD_HANDLE
public BukkitUnwrapper()
public BukkitUnwrapper(ErrorReporter reporter)
reporter
- - the error reporter to use.public static BukkitUnwrapper getInstance()
public java.lang.Object unwrapItem(java.lang.Object wrappedObject)
PacketConstructor.Unwrapper
Note that we may pass in a class instead of object - in that case, the unwrapper should return the equivalent NMS class.
unwrapItem
in interface PacketConstructor.Unwrapper
wrappedObject
- - wrapped object or class.