Thank you for checking out NBTProxy! Please send me a PM or create and issue/PR on github (
https://github.com/MrBlobman/NBTProxy) if you have any feedback. I would greatly appreciate an feature requests or suggestions!
This library is a great resource for interacting with NBT tags. It is called NBT Proxy because it is a collection of classes that wrap nms classes that you can interact with despite the underlying implementation changing between versions. In addition to this it provides a serialization API for reading and writing custom objects to and from ItemStacks with the use of your own serializers/deserializers. This makes storing information such as pick stats very easy to do. More information on that can be found on the wiki ( https://github.com/MrBlobman/NBTProxy/wiki).
➤Server Owners
This plugin is a developer resource and a utility.
Try out the commands such as
after enabling it in the config.yml.
More information on the available commands can be found on the wiki page https://github.com/MrBlobman/NBTProxy/wiki/Utility-Commands
➤Developers
To use this in your project please build against the API and not this implementation.
▶Depending on the API:
There are 2 ways to depend on the API:
Add the jar to your build path. You can grab a prebuilt binary of the API from github on the releases tab. https://github.com/MrBlobman/NBTProxy/releases
Install to your local maven repository. The project can be built and published with gradle.
To install it you need to clone the repository and publish it with a gradle command.
If you are building with gradle add the following to your dependencies extension:
For maven users you can add the following to your dependencies section:
▶Hooking into the API:
Make sure that you add "NBTProxy" to the dependencies section of your plugin.yml. Then to check if the server your plugin is running on is using an NMS version that is supported by this API you can run the following:
Please note I am looking at better ways to preform this check and there will most likely be a better way to do it in the future but either way the above code will still function the same.
▶Using the API:
There is a great example over on the github wiki (https://github.com/MrBlobman/NBTProxy/wiki) for how to take advantage of the great serialization features for ItemStacks. This is similar to how Gson's serialization works (without the reflection at the moment) and as such the class is named NBTson.
The TagFactory class (http://mrblobman.github.io/NBTProxy/docs/io/github/mrblobman/nbt/TagFactory.html) have methods for instantiating new tags as well as obtaining classes for reading, writing and appending NBT data to various things (http://mrblobman.github.io/NBTProxy/docs/index.html?io/github/mrblobman/nbt/TagFactory.html).
The javadocs for the API classes can be found here http://mrblobman.github.io/NBTProxy/docs/index.html
This library is a great resource for interacting with NBT tags. It is called NBT Proxy because it is a collection of classes that wrap nms classes that you can interact with despite the underlying implementation changing between versions. In addition to this it provides a serialization API for reading and writing custom objects to and from ItemStacks with the use of your own serializers/deserializers. This makes storing information such as pick stats very easy to do. More information on that can be found on the wiki ( https://github.com/MrBlobman/NBTProxy/wiki).
➤Server Owners
This plugin is a developer resource and a utility.
- Another plugin may require you to use.
- You may wish to take advantage of all of the commands for reading and manipulating NBT data on items, entities, blocks, or files!
Try out the commands such as
Code (Text):
/nbt read item
More information on the available commands can be found on the wiki page https://github.com/MrBlobman/NBTProxy/wiki/Utility-Commands
➤Developers
To use this in your project please build against the API and not this implementation.
▶Depending on the API:
There are 2 ways to depend on the API:
Add the jar to your build path. You can grab a prebuilt binary of the API from github on the releases tab. https://github.com/MrBlobman/NBTProxy/releases
Install to your local maven repository. The project can be built and published with gradle.
To install it you need to clone the repository and publish it with a gradle command.
Code (Text):
git clone https://github.com/MrBlobman/NBTProxy.git
cd NBTProxy
./gradlew publishApiPublicationToMavenLocal
cd NBTProxy
./gradlew publishApiPublicationToMavenLocal
Code (Text):
compile group: 'io.github.mrblobman', name: 'NBTProxy-api', version: '2.1.0'
HTML:
<dependency>
<groupId>io.github.mrblobman </groupId>
<artifactId>NBTProxy-api </artifactId>
<version>2.1.0 </version>
<scope>provided </scope>
</dependency>
<groupId>io.github.mrblobman </groupId>
<artifactId>NBTProxy-api </artifactId>
<version>2.1.0 </version>
<scope>provided </scope>
</dependency>
Make sure that you add "NBTProxy" to the dependencies section of your plugin.yml. Then to check if the server your plugin is running on is using an NMS version that is supported by this API you can run the following:
Code (Java):
try
{
TagFactory factory = TagFactory. get ( ) ;
} catch ( UnsupportedOperationException e ) {
//Code to run if there is not a compatible version running on the server
this. getLogger ( ). severe (e. getMessage ( ) ) ;
this. setEnabled ( false ) ;
return ;
}
TagFactory factory = TagFactory. get ( ) ;
} catch ( UnsupportedOperationException e ) {
//Code to run if there is not a compatible version running on the server
this. getLogger ( ). severe (e. getMessage ( ) ) ;
this. setEnabled ( false ) ;
return ;
}
Please note I am looking at better ways to preform this check and there will most likely be a better way to do it in the future but either way the above code will still function the same.
▶Using the API:
There is a great example over on the github wiki (https://github.com/MrBlobman/NBTProxy/wiki) for how to take advantage of the great serialization features for ItemStacks. This is similar to how Gson's serialization works (without the reflection at the moment) and as such the class is named NBTson.
The TagFactory class (http://mrblobman.github.io/NBTProxy/docs/io/github/mrblobman/nbt/TagFactory.html) have methods for instantiating new tags as well as obtaining classes for reading, writing and appending NBT data to various things (http://mrblobman.github.io/NBTProxy/docs/index.html?io/github/mrblobman/nbt/TagFactory.html).
The javadocs for the API classes can be found here http://mrblobman.github.io/NBTProxy/docs/index.html
Quick facts
- Edition: Minecraft Java
- File type: .jar
- Minecraft versions listed: 1.8, 1.9, 1.10
- How to install: Install the matching mod loader (Forge, Fabric or NeoForge) for your Minecraft version. → Download the .jar. → Put it in the .minecraft/mods folder and launch that loader profile.
- Where to get it: Opens on Spigot — not every file is mirrored on our own servers.
Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.
NBTProxy is a free Minecraft Java mod. Compatible with Minecraft 1.8, 1.9, 1.10, 1.11 and newer. Downloaded 571 times (via Spigot). Download it and open it directly in the game.