{"id":29402556,"url":"https://github.com/lonedev6/fastnbt","last_synced_at":"2025-07-10T17:07:08.428Z","repository":{"id":211793671,"uuid":"356700270","full_name":"LoneDev6/FastNBT","owner":"LoneDev6","description":"Spigot library to edit items NBT very fast.","archived":false,"fork":false,"pushed_at":"2025-07-09T18:18:10.000Z","size":687,"stargazers_count":9,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-09T20:54:15.440Z","etag":null,"topics":["java","library","minecraft","nbt","plugin","spigot"],"latest_commit_sha":null,"homepage":"https://lonedev6.github.io/FastNBT/beer/devs/fastnbt/nms/nbt/package-summary.html","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LoneDev6.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-04-10T21:35:11.000Z","updated_at":"2025-07-09T18:18:13.000Z","dependencies_parsed_at":"2024-08-27T15:57:12.277Z","dependency_job_id":"c0bedab3-ac42-4cf9-b549-022921b01dcb","html_url":"https://github.com/LoneDev6/FastNBT","commit_stats":null,"previous_names":["lonedev6/fastnbt"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/LoneDev6/FastNBT","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LoneDev6%2FFastNBT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LoneDev6%2FFastNBT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LoneDev6%2FFastNBT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LoneDev6%2FFastNBT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LoneDev6","download_url":"https://codeload.github.com/LoneDev6/FastNBT/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LoneDev6%2FFastNBT/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264614858,"owners_count":23637672,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java","library","minecraft","nbt","plugin","spigot"],"created_at":"2025-07-10T17:07:07.800Z","updated_at":"2025-07-10T17:07:08.421Z","avatar_url":"https://github.com/LoneDev6.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003chr\u003e\n\u003ch3 align=\"center\"\u003e\n\u003ca href=\"https://lonedev6.github.io/FastNBT/beer/devs/fastnbt/nms/nbt/package-summary.html\"\u003e☕ JavaDocs\u003c/a\u003e\n\u003c/h3\u003e\n\u003chr\u003e \n\n![Maven Central](https://img.shields.io/maven-central/v/beer.devs/FastNbt-jar?label=Maven%20Central\u0026style=flat-square)\n\n# Comparison to NBT API\n\n## Installations\n\u003cimg src=\"https://pstats.devs.beer/signatures/bukkit/FastNbt.svg\" width=\"800\"\u003e\n\u003cimg src=\"https://bstats.org/signatures/bukkit/ItemNBTAPI.svg\" width=\"800\"\u003e\n\n## Benchmark\n**FastNbt** is ~190% faster than [NBT API](https://github.com/tr7zw/Item-NBT-API).\\\n[Check the benchmark here](https://github.com/LoneDev6/FastNBT-Benchmark)\n\n## Usability\n\n**FastNbt** is easier to use compared to NBT API and requires less boilerplate code.\n\n### Creating an head texture\n```java\nNItem nItem = new nItem(new ItemStack(Material.PLAYER_HEAD));\nnItem.setSkull(\"dummy\", \"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYjc4ZWYyZTRjZjJjNDFhMmQxNGJmZGU5Y2FmZjEwMjE5ZjViMWJmNWIzNWE0OWViNTFjNjQ2Nzg4MmNiNWYwIn19fQ==\");\nnItem.save(); // If finished editing\n```\n\n### Renaming an item\nNOTE: FastNBT supports only Compound strings.\nIf you want to use legacy notation you have to call the Spigot API as usual.\n```java\nNItem nItem = new nItem(new ItemStack(Material.STONE));\nnItem.setDisplayNameCompound(\"{\\\"text\\\":\\\"Example Compound Name\\\",\\\"color\\\":\\\"blue\\\"}\");\nnItem.save(); // If finished editing\n```\n\n### Setting an attribute modifier\n```java\nnItem.setAttributeModifier(\n        \"minecraft:generic.movement_speed\",\n                1,\n                6,\n                \"bro\",\n                \"mainhand\",\n                1337,\n                1337\n);\nnItem.save(); // If finished editing\n```\n### Setting an attribute modifier (manual method)\n```java\nNList attributes = nItem.getOrAddList(\"AttributeModifiers\", NBTType.Compound);\nNCompound attribute = new NCompound();\nattribute.setString(\"AttributeName\", attributeName);\nattribute.setInt(\"Operation\", operation);\nattribute.setInt(\"UUIDLeast\", uuidLeast);\nattribute.setInt(\"UUIDMost\", uuidMost);\nattribute.setDouble(\"Amount\", amount);\nattribute.setString(\"Name\", name);\nattribute.setString(\"Slot\", slot);\nattributes.addCompound(attribute);\n```\n\n# Limitations\n\nCurrently, supports only items.\n\n# Adding it to your project\n\n![Maven Central](https://img.shields.io/maven-central/v/beer.devs/FastNbt-jar?label=Maven%20Central\u0026style=flat-square)\n\n\n## Method 1 - Direct use on Spigot\nThis is the easiest way.\n\n### Step 1 - `plugin.yml`\n```yml\nname: Your Plugin\nauthor: You\n# ....\nlibraries:\n  - beer.devs:FastNbt-jar:VERSION\n```\n\n### Step 2 - Maven\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ebeer.devs\u003c/groupId\u003e\n    \u003cartifactId\u003eFastNbt-jar\u003c/artifactId\u003e\n    \u003cversion\u003eVERSION\u003c/version\u003e\n    \u003cscope\u003eprovided\u003c/scope\u003e\n\u003c/dependency\u003e\n```\n\n### Step 2 - or Gradle\n```kt\ndependencies {\n    compileOnly(\"beer.devs:FastNbt-jar:VERSION\")\n}\n```\n\n## Method 2 - Direct use on Paper\nThis is the easiest way, but requires some special steps.\n\n### Step 1\nShade libby into your JAR, read more [here](https://github.com/AlessioDP/libby).\n\n### Step 2 - `plugin.yml`\nAdd the lib into `libraries-libby` of your `plugin.yml` and specify the `--remap` flag.\n```yml\nname: Your Plugin\nauthor: You\n# ....\nlibraries-libby:\n  - beer.devs:FastNbt-jar:VERSION --remap\n```\n\n### Step 3\nYou need to include this [LibsLoader](https://gist.github.com/LoneDev6/27fed334fc3ef013e666a7371a6b3551) class in your plugin and call in `onLoad`.\\\nThis will load the libraries you specified in the `plugin.yml` file.\n```java\nnew LibsLoader(this).loadAll();\n```\n\n### Step 4 - Maven or gradle\nSame as Method 1\n\n## Method 3 - Shading\n\nYou can shade the library in your plugin if you want to use it without connecting to maven central.\n\n### Shading Configuration Maven\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ebeer.devs\u003c/groupId\u003e\n    \u003cartifactId\u003eFastNbt-jar\u003c/artifactId\u003e\n    \u003cversion\u003eVERSION\u003c/version\u003e\n    \u003cscope\u003eprovided\u003c/scope\u003e\n\u003c/dependency\u003e\n```\n```xml\n \u003cplugin\u003e\n    \u003cgroupId\u003eorg.apache.maven.plugins\u003c/groupId\u003e\n    \u003cartifactId\u003emaven-shade-plugin\u003c/artifactId\u003e\n    \u003cversion\u003e3.5.0\u003c/version\u003e\n    \u003cexecutions\u003e\n        \u003cexecution\u003e\n            \u003cphase\u003epackage\u003c/phase\u003e\n            \u003cgoals\u003e\n                \u003cgoal\u003eshade\u003c/goal\u003e\n            \u003c/goals\u003e\n            \u003cconfiguration\u003e\n                \u003crelocations\u003e\n                    \u003crelocation\u003e\n                        \u003cpattern\u003ebeer.devs.fastnbt.\u003c/pattern\u003e\n                        \u003cshadedPattern\u003eYOUR_PACKAGE_HERE.libs.beer.devs.fastnbt.\u003c/shadedPattern\u003e\n                    \u003c/relocation\u003e\n                \u003c/relocations\u003e\n            \u003c/configuration\u003e\n        \u003c/execution\u003e\n    \u003c/executions\u003e\n\u003c/plugin\u003e\n```\n\n### Shading Configuration Gradle\n```kt\ndependencies {\n    implementation(\"beer.devs:FastNbt-jar:VERSION\")\n}\n```\n\n```kt\ntasks {\n    shadowJar {\n        relocate(\"beer.devs.fastnbt\", \"YOUR_PACKAGE_HERE.libs.beer.devs.fastnbt\")\n    }\n}\n```\n\n-----\n\n# Updating\n\n- Create a new module for the new NMS version and add the correct `paper-nms` **dependency**.\n- Add the new NMS version to the `Version` enum.\n- Add the new module in the modules list of `FastNbt` module and as dependency in the `FastNbt-jar` module.\n\nShould be all.\n\n# LoneDev's Notes\n\n## How to deploy to maven central\n`mvn deploy -DskipNexusStaging=true -PpublishToMavenCentral`\n\n## How to install locally\n`mvn install`\n\n## Editing to the repository\n- Clone it\n- Make your changes\n- Run `mvn install` in order to access the plugin as dependency in your projects\n\n## Updating Javadocs\n\nIn order to update Javadocs you have to build locally, as old NMS jars are not available and can't be easily included on Github.\n- Run the command `mvn clean install javadoc:javadoc -pl FastNbt-core -am`\n- Get the generated javadocs from `.cache/targets/FastNbt-core/target/reports/apidocs/`\n- Push the contents into the `javadoc` branch\n \n## Installing Paper NMS manually\n(In case Paper didn't provide the remapping for a particular version)\\\n`mvn install:install-file -Dfile=C:/Progetti/Minecraft/Spigot/_jars/spigot/paper/paper-1.21.6.jar -DgroupId=io.papermc.paper -DartifactId=paper -Dversion=1.21.6 -Dpackaging=jar`\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eio.papermc.paper\u003c/groupId\u003e\n    \u003cartifactId\u003epaper\u003c/artifactId\u003e\n    \u003cversion\u003e1.21.6\u003c/version\u003e\n    \u003cscope\u003eprovided\u003c/scope\u003e\n\u003c/dependency\u003e\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flonedev6%2Ffastnbt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flonedev6%2Ffastnbt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flonedev6%2Ffastnbt/lists"}