PowerNBT

NBTTagList

[PowerNBT]

Powerful NBT editor for CraftBukkit 1.5 and later
Works with Forge (fix to forge 1.4.7)
With this plugin you can:

  • Create custom mobspawners with stacked mobs
  • Edit Attributes
  • Custom potion effects and fireworks
  • Edit offline players
  • Rename items
  • Edit equipment of mobs
  • and more

PowerNBT 0.5

Features

  • Browsing and editing NBT tags
  • supports items, players, offline-players, entities, blocks, all nbt files
  • save tags to file
  • custom colors and unicode symbols
  • supports tab-completion
  • supports copy/paste/cut/swap
  • supports variables

Usage

View NBT tags

  • /nbt object [query]

View all the available tags from the object.
Object must be:
me - player
item,i - item in hand (only tagged items)
block,b - block at the line of sight
id123 - entity with id 123
buffer,c - copied tag
*name - other online player
query - string containing tags, sepatated by dot. Examples:
Inventory[1].id - id of second item in player inventory
display.Name - item's name.
pages[0] - first page of book
pages[] - new page
. - root
query may be omitted.

Edit NBT tags

  • /nbt object1 [query1] = value [type]

changes the value of the tag.
value - numeric value or text in quotes
For string, you can use special characters:
\n \b \t \" etc.
\c or & to place § (used for formatting codes)
\& to place '&'
\uXXXX to place any unicode symbol (where XXXX is hexadecimal char code)
type - may be byte, float, double, int, string, short, long, byte[], int[].
type is not required:
- if value is string
- if object already has a value

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.7.1 beta

  • added: work with minecraft 1.7.9 (NBTReadLimiter)
  • added: find offline player .dat file by UUID
  • added: "ForgeData" tag for entities
  • added: new simple API
  • added: ability for mapping classes
  • fixed: forge classes
  • fixed: bug with inventory click event (minecraft 1.4.x)

Version 0.6.2

  • fixed selection by "*" command
  • fixed order of arguments in commands ">", ">>"
  • fixed variable names in commands "select", "set", "as"
  • added: select items in inventory (by rightclick in survival, by click in creative)
  • added: multi-selection by holding [Shift]. Works with last container, marked as '*'
  • added: command "/powernbt cancel" to cancel selection
  • removed: input arguments to chat while selecting

Version 0.6.1 beta

  • work with bukkit 1.7.X only
  • not support named tags
  • uses types "int" and "double" by default for numbers

Tutorials

API

API is now available!
it works with any version of Bukkit since 1.3.1
see API for documentation and examples
Maven dependency (since 0.7.2)
API for version 0.7.2 and later
old API for all versions

Warning

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

Helpful links, about NBT format:


GithubMaven

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

  • Avatar of Bladerslashs Bladerslashs Nov 09, 2014 at 22:28 UTC - 0 likes

    How do we make it so that creative control doesn't affect the NBT saving? It keeps affecting the save files.

  • Avatar of johndcastro johndcastro Oct 28, 2014 at 20:20 UTC - 0 likes

    @DPOHVAR:

    No luck. I am on the 1.7.10 version of spigot (latest build) I don't know if that matters or not.

    Thanks.

  • Avatar of johndcastro johndcastro Oct 28, 2014 at 13:42 UTC - 0 likes

    Thanks @DPOHVAR: I will give it a shot. And thanks for the quick response.

  • Avatar of DPOHVAR DPOHVAR Oct 28, 2014 at 04:18 UTC - 0 likes

    @johndcastro: Go

    Check this:

    Player player = event.getPlayer();
    NBTManager manager = NBTManager.getInstance();
    NBTCompound playerdata = manager.read(player);
    NBTList atkey = playerdata.getList("Attributes");
    if (atkey != null) {
        for(Object sub in atkey) { // atkey contains only compounds
            // try this:
            ((NBTCompound) sub).remove("Modifiers"); 
            // OR this:
            ((NBTCompound) sub).put("Modifiers", new NBTList());
        }
        manager.write(player, playerdata);
    }
    // debug: check new nbt data
    NBTCompound newData = manager.read(player);
    // breakpoint here
    
  • Avatar of johndcastro johndcastro Oct 27, 2014 at 21:57 UTC - 0 likes

    Hello @DPOHVAR:

    I am trying to use the API to clear NBT data in the player.dat file (online) in a OnPlayerJoin event.

    Essentially I am trying to clear any Modifiers in the Attributes Keys of the NBT file. I have tried a few things but this is where I am at:

    http://pastebin.com/hTgEHeQY

    Any assistance would be greatly appreciated.

    Last edited Oct 27, 2014 by johndcastro
  • Avatar of DPOHVAR DPOHVAR Oct 19, 2014 at 12:04 UTC - 0 likes

    @funAlways: Go

    by default this command displays only the first 10 elements of array or compound.
    /nbt %z . full
    - display all elements in compound.
    /nbt %z . 10-20
    - display elements from 10 to 20
    /nbt %z . 50
    - display first 50 elements
    /nbt %z . 5,hex
    - display first 5 elements in hex mode
    ( «.» is required and used as an empty selector)

    Plugin using the restriction on length of the displayed data
    This also applies to text values.

  • Avatar of funAlways funAlways Oct 19, 2014 at 11:12 UTC - 0 likes

    Hi there, i used this plugin some months ago and now im using it again

    When i tried to show the content of a variable (/nbt %z) with a lot of elements it, it only says compound: x elements, but it doesn't show it all (for example, it says %z have 32 elements but only 10 of them is shown, I can edit it normally, though), are there any way to make this plugin shows all nbt element (and its value)?

    It used to show all elements and value to me.

    Last edited Oct 19, 2014 by funAlways
  • Avatar of DPOHVAR DPOHVAR Aug 28, 2014 at 23:04 UTC - 0 likes

    @patey5: Go

    New versions of the bukkkit unpredictably change their API.
    If I made ​​a patch for 1.7.9, it will no longer work on 1.7.10
    I want to partially rewrite plugin on groovy.
    This will simplify patches in the future.

  • Avatar of patey5 patey5 Aug 28, 2014 at 22:54 UTC - 0 likes

    I attempted to update PowerNBT for personal use but there's so much work put into this and so much code to go over that I haven't even been able to figure out yet how it even works in the first place lol

    any estimate for an update?

  • Avatar of TheBlackBeltPanda TheBlackBeltPanda Aug 28, 2014 at 16:18 UTC - 0 likes

    How do you save tags to file? I can't find the command anywhere.

    Edit: Nvm, it's "/nbt $<filename> = <object>"

    Last edited Aug 28, 2014 by TheBlackBeltPanda

    Subscribe and become a Pandaling today! youtube.com/theblackbeltpanda

    Owner of PandaCraft

    PandaCraft

Facts

Date created
Nov 28, 2012
Categories
Last update
Jun 21, 2014
Development stage
Release
Language
  • enUS
  • ruRU
License
GNU General Public License version 3 (GPLv3)
Curse link
PowerNBT
Downloads
14,502
Recent files

Authors