Interface NMSObject
- All Known Subinterfaces:
NMSChunk
,NMSChunkDef
,NMSChunkProvider
,NMSChunkSection
,NMSOutEntityDestroy
,NMSOutEntityStatus
,NMSPacket
,NMSWorld
This interface defines the fundamental contract for wrapper classes that encapsulate NMS objects, providing a type-safe abstraction layer over Minecraft's internal server objects. All NMS wrappers must provide access to their underlying NMS handle for direct manipulation when needed.
The wrapper pattern is used throughout the NMS abstraction layer to:
- Provide version-independent interfaces for NMS functionality
- Hide complex reflection-based access patterns
- Enable type-safe operations on NMS objects
- Maintain compatibility across different Minecraft versions
Example usage:
// Wrapper provides safe, abstracted access
NMSChunk chunk = chunkProvider.wrap(bukkitChunk);
// Direct handle access when needed for advanced operations
Object nmsChunkHandle = chunk.getHandle();
-
Method Summary
-
Method Details
-
getHandle
Retrieves the underlying NMS object handle.This method provides access to the raw NMS object that this wrapper encapsulates. The returned object is the actual Minecraft server implementation instance, typically obtained through reflection or version-specific factories.
Warning: Direct manipulation of NMS handles should be used sparingly and with caution, as it bypasses the abstraction layer's version compatibility guarantees. Prefer using the wrapper's provided methods when possible.
- Returns:
- the underlying NMS object instance
-