PowerNBT

NBTTagList

[PowerNBT]

Powerful NBT editor for CraftBukkit 1.5 and later.
Simple NBT API (for developers).
Works with CraftBukkit, MCPC+, Cauldron, Spigot (fix to forge 1.4.7)

PowerNBT 0.5

Features

  • Browsing and editing NBT tags
  • supports items, players, offline-players, entities, blocks, chunks, schematic files and all other nbt files
  • save tags to file
  • spawn entity with custom nbt tags
  • parse mojangson string
  • custom colors and unicode symbols
  • supports tab-completion
  • supports operations copy/paste/cut/swap
  • supports variables

All commands

See: commands

Examples

  • /nbt me Inventory remove - clear inventory
  • /nbt me Inventory = *Bob EnderItems - get Bob's enderchest to yourself
  • /nbt @Eve remove - remove file Eve.dat (offline player)
  • /nbt block ExtraType = "Notch" - set skull owner
  • /nbt * Health = 1000 - set 1000 health to mob, which you select
  • /nbt item ench copy - copy item enchantments to buffer
  • /nbt item ench paste - paste enchantments to other item

Permissions

  • powernbt.use

Bugs

Changelog

Version 0.8.2 beta

  • added: binary opetarions: ^= , &= , |= , useful to set binary flags
  • added: operation: multiplication: *=
  • added: operation: spawn entity
  • added: value: numbers in binary format
  • added: values in mojangson format
  • added: object: hand
  • added: object: schematic
  • added: view mode: binary
  • added: silent mode for command
  • added: API: read chunk
  • added: API: save chunk
  • added: API: parse mojangson string
  • added: API: spawn entity
  • fixed: support cauldron 1.7.10
  • bug: invisible players after change chunk data.
  • bug: on update blocks after change chunk. cauldron 1.7.10

Version 0.8.1

  • added: read/write chunks

Version 0.7.3.1

  • fix: work with Cauldron 1.7.2

Tutorials

API

See API for documentation and examples
Maven dependency (since 0.7.2)
API for version 0.7.2 and later

Warning

If you add a tag, which is not expected by the client, it may be crashed. Be careful!

Helpful links, about NBT format:


GithubMavenJavadoc

You must login to post a comment. Don't have an account? Register to get one!

  • Avatar of DPOHVAR DPOHVAR Oct 28, 2015 at 04:31 UTC - 0 likes

    Newest versions of PowerNBT on https://www.spigotmc.org/resources/powernbt.9098/

  • Avatar of SkullTraill SkullTraill Oct 27, 2015 at 11:55 UTC - 0 likes

    I'm using the plugin with kCauldron (needed to work on Tekkit Legends servers).

    I get this error whenever I run /nbt

    [22:29:46 INFO]: SkullTraill issued server command: /nbt
    [22:29:46 ERROR]: null
    org.bukkit.command.CommandException: Unhandled exception executing command 'nbt' in plugin PowerNBT v0.6.2
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[PluginCommand.class:1.7.10-1481.148]
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:181) ~[SimpleCommandMap.class:1.7.10-1481.148]
            at org.bukkit.craftbukkit.v1_7_R4.CraftServer.dispatchCommand(CraftServer.java:717) ~[CraftServer.class:1.7.10-1481.148]
            at net.minecraft.network.NetHandlerPlayServer.func_147361_d(NetHandlerPlayServer.java:1317) [nh.class:?]
            at net.minecraft.network.NetHandlerPlayServer.func_147354_a(NetHandlerPlayServer.java:1099) [nh.class:?]
            at net.minecraft.network.play.client.C01PacketChatMessage.func_148833_a(C01PacketChatMessage.java:38) [ir.class:?]
            at net.minecraft.network.play.client.C01PacketChatMessage.func_148833_a(C01PacketChatMessage.java:53) [ir.class:?]
            at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:244) [ej.class:?]
            at net.minecraft.network.NetworkSystem.func_151269_c(NetworkSystem.java:173) [nc.class:?]
            at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:991) [MinecraftServer.class:?]
            at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:431) [lt.class:?]
            at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:809) [MinecraftServer.class:?]
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:669) [MinecraftServer.class:?]
            at java.lang.Thread.run(Unknown Source) [?:1.7.0]
    Caused by: java.lang.NoClassDefFoundError: Could not initialize class me.dpohvar.powernbt.utils.Caller
            at me.dpohvar.powernbt.PowerNBT.getCaller(PowerNBT.java:43) ~[?:?]
            at me.dpohvar.powernbt.command.Command.onCommand(Command.java:16) ~[?:?]
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[PluginCommand.class:1.7.10-1481.148]
            ... 13 more
    [22:30:00 INFO]: Unloaded
    [22:30:00 INFO]: Unloaded
    [22:30:00 INFO]: Unloaded
    [22:30:00 INFO]: Unloaded
    [22:30:00 INFO]: Unloaded
    

    Just restarted the server and got this:

    [22:32:35 INFO]: SkullTraill issued server command: /nbt
    [22:32:35 ERROR]: null
    org.bukkit.command.CommandException: Unhandled exception executing command 'nbt' in plugin PowerNBT v0.6.2
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[PluginCommand.class:1.7.10-1481.148]
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:181) ~[SimpleCommandMap.class:1.7.10-1481.148]
            at org.bukkit.craftbukkit.v1_7_R4.CraftServer.dispatchCommand(CraftServer.java:717) ~[CraftServer.class:1.7.10-1481.148]
            at net.minecraft.network.NetHandlerPlayServer.func_147361_d(NetHandlerPlayServer.java:1317) [nh.class:?]
            at net.minecraft.network.NetHandlerPlayServer.func_147354_a(NetHandlerPlayServer.java:1099) [nh.class:?]
            at net.minecraft.network.play.client.C01PacketChatMessage.func_148833_a(C01PacketChatMessage.java:38) [ir.class:?]
            at net.minecraft.network.play.client.C01PacketChatMessage.func_148833_a(C01PacketChatMessage.java:53) [ir.class:?]
            at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:244) [ej.class:?]
            at net.minecraft.network.NetworkSystem.func_151269_c(NetworkSystem.java:173) [nc.class:?]
            at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:991) [MinecraftServer.class:?]
            at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:431) [lt.class:?]
            at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:809) [MinecraftServer.class:?]
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:669) [MinecraftServer.class:?]
            at java.lang.Thread.run(Unknown Source) [?:1.7.0]
    Caused by: java.lang.ExceptionInInitializerError
            at me.dpohvar.powernbt.PowerNBT.getCaller(PowerNBT.java:43) ~[?:?]
            at me.dpohvar.powernbt.command.Command.onCommand(Command.java:16) ~[?:?]
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[PluginCommand.class:1.7.10-1481.148]
            ... 13 more
    Caused by: java.lang.NullPointerException
    
    Last edited Oct 27, 2015 by SkullTraill
  • Avatar of DPOHVAR DPOHVAR Sep 30, 2015 at 06:24 UTC - 0 likes

    @thtTNT: Go

    1) I recommend you to use the latest version of PowerNBT

            <dependency>
                <groupId>me.dpohvar.powernbt</groupId>
                <artifactId>PowerNBT</artifactId>
                <version>0.8.4.1</version>
            </dependency>
    

    2) Don't forget to import PowerNBT classes:

    import me.dpohvar.powernbt.PowerNBT;
    import me.dpohvar.powernbt.api.*;
    
  • Avatar of thtTNT thtTNT Sep 30, 2015 at 05:57 UTC - 0 likes

    Sorry for my poor English.But i have a probleam.I add the config into the "pom.xml" like this. <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>net.tygzs</groupId> <artifactId>MineRPG</artifactId> <version>1.0-SNAPSHOT</version> <packaging>jar</packaging> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <maven.compiler.source>1.7</maven.compiler.source> <maven.compiler.target>1.7</maven.compiler.target> </properties> <repositories> <repository> <id>spigot-repo</id> <url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url> </repository> <repository> <id>varscript.ru-releases</id> <name>varscript.ru-releases</name> <url>http://varscript.ru/artifactory/release</url> </repository> <repository> <id>varscript.ru-snapshots</id> <name>varscript.ru-snapshots</name> <url>http://varscript.ru/artifactory/snapshots</url> </repository> </repositories> <dependencies> <dependency> <groupId>org.spigotmc</groupId> <artifactId>spigot-api</artifactId> <version>1.8.8-R0.1-SNAPSHOT</version> <scope>provided</scope> </dependency> <dependency> <groupId>me.dpohvar.powernbt</groupId> <artifactId>PowerNBT</artifactId> <version>0.8.1</version> </dependency> </dependencies> </project> But i can not use the metod "PowerNBT.getapi()",Does anyone can help me?

  • Avatar of DPOHVAR DPOHVAR Aug 14, 2015 at 12:26 UTC - 0 likes

    @chillac99: Go

    You can change item name in your hand:

    /nbt item display.Name = "&4Destruptor"

    or give item:

    /nbt hand = {id:diamond_sword,Count:1,Damage:0,display:{Name:"&4Destruptor"}}

    Last edited Aug 17, 2015 by DPOHVAR
  • Avatar of chillac99 chillac99 Aug 14, 2015 at 08:46 UTC - 0 likes

    @DPOHVAR Hi! I really apreciate this plugin, is awesome :3 . But I need help : How can I make colored items name (like a sword with red name : "Destruptor") with your plugin ? I know that , in 1.7 , it works like "/give x diamond_sword 1 0 name:&4Destruptor" , but in 1.8 is not working. Please help me (if isn't possible with your plugin, can you show me another way?) Again, great work man. Have a nice day! :D

    Last edited Aug 14, 2015 by chillac99
  • Avatar of hotflow96 hotflow96 Aug 05, 2015 at 02:01 UTC - 0 likes

    @DPOHVAR: Go

    can custom ItemMeta solve it ?

  • Avatar of DPOHVAR DPOHVAR Aug 01, 2015 at 08:12 UTC - 0 likes

    @hotflow96: Go

    Bukkit doesn/t support saving custom nbt.
    In Forge, MCPC, Cauldon you can use tag 'forgeData' on entities

    Hacks:

    • You can save any nbt data into item tag but it will disappear when a player takes it in hands.
    • 'BlockEntityTag' in item tag can contains any nbt data. I'm not sure whether it will disappear
    • 'CustomName' of Container Block can contains any string (32767 bytes UTF-8)
    • tags 'Command' (string) and 'CommandStats' (strings) of CommandBlock
    • 'SpawnPotentials.Properties' of MobSpawners
    • You can save NBT data to custom file.
  • Avatar of hotflow96 hotflow96 Jul 31, 2015 at 22:12 UTC - 0 likes

    Nice code, Very appreciated! I'm working in NBT too, learned a lot from your code. Can you done with saving custom NBT tag in Bukkit?

  • Avatar of DPOHVAR DPOHVAR Jul 01, 2015 at 22:34 UTC - 0 likes

    @HardcoreFlans: Go

    Easy :)
    /nbt me Inventory[0].tag."Missiles 0" = 42 float

Facts

Date created
Nov 28, 2012
Categories
Last update
Jan 25, 2015
Development stage
Release
Language
  • enUS
  • ruRU
License
GNU General Public License version 3 (GPLv3)
Curse link
PowerNBT
Downloads
18,362
Recent files

Authors