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 DPOHVAR DPOHVAR Jul 25, 2014 at 13:15 UTC - 0 likes

    @Rob5Underscores: Go

    you can not change the player position in a single step

    /nbt list copy - store empty list to buffer
    /nbt buffer [0] = 100 double - set X value to buffer
    /nbt buffer [1] = 500 double - set Y value to buffer
    /nbt buffer [2] = 200 double - set Z value to buffer
    /nbt *Player Pos paste - change player location to buffer value
    or
    /nbt *Player Pos copy - store player location to buffer
    /nbt buffer [1] += 500 - add 500 to Y value in buffer
    /nbt *Player Pos paste - move player up to 500 blocks

    Player can not be teleported in a short distance by changing Pos

    Last edited Jul 25, 2014 by DPOHVAR
  • Avatar of Rob5Underscores Rob5Underscores Jul 25, 2014 at 09:37 UTC - 0 likes

    How would one go about using this to change a players location. I don't understand how you would edit the list of double tags for the Pos tag.

    Thanks

    BFAK:90867600,371184c63e05ac5bd7238c60fe9b0f1c66c3aa8f8d5a2e3b210306d020591565

  • Avatar of DPOHVAR DPOHVAR Jul 13, 2014 at 22:12 UTC - 0 likes

    @t3f: Go

    cauldron-1.7.2-1.1126.04.34-server works fine
    Try to check with commands:
    /nbt debug on
    /nbt item with item that has tags (for example: book and quill with text)

    @patey5: Go

    craftbukkit-1.7.10-R0.1-20140713.051447-4 - fine
    cauldron-1.7.10-1.1179.03.109-server - init error
    As soon as I find the cause of the error, I will publish the snapshot in maven repo.

  • Avatar of patey5 patey5 Jul 13, 2014 at 20:15 UTC - 0 likes

    any dev versions for 1.7.10 I could use for testing? it doesn't need to be stable, I just don't want to remove all the PowerNBT code while I test something else on 1.7.10

  • Avatar of t3f t3f Jul 13, 2014 at 02:04 UTC - 0 likes

    @DPOHVAR: Go

    With 0.7.3.1 and cauldron-1.7.2-1.1147.04.84-server i'm seeing /nbt item act like i've nothing in my hand. Any suggestions on what I might be affecting it?

  • Avatar of DPOHVAR DPOHVAR Jun 24, 2014 at 18:59 UTC - 0 likes

    @patey5: Go

    Check that player has tag "Race" in forgeData.

    like this:

    int race = 0;
    Object raceData = forgeData.get("Race");
    if (raceData instanceof Integer) race = (Integer) raceData;
    

    I hope this helps

    If not, It would be much more useful if you show a stack trace of exception. And full source code of file (to find the line number). To PM

  • Avatar of patey5 patey5 Jun 24, 2014 at 18:19 UTC - 0 likes

    @DPOHVAR: Go

    thanks :)

    I'm a litle inexperienced with java though so I'm having trouble using the api-

    as a test I'm using a command, when the command is entered it returns an answer based on the nbt tag, which is an integer. my code:

    	public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
    		if (cmd.getName().equalsIgnoreCase("Race")) {
    			
    			Player player = (Player)sender;
    			
    			NBTManager manager = NBTManager.getInstance();
    			NBTCompound forgeData = manager.readForgeData(player);
    			int race;
    			race = (int)forgeData.get("Race");
    
    			
    			if (!(sender instanceof Player)) {
    				sender.sendMessage("This command can only be run by a player.");
    				return true;
    			} else {
    				if (args.length == 0){
    					if (race == 0) {
    						sender.sendMessage("We need to know what you are.");
    						sender.sendMessage("Be you Dwarven,Elven,Human or Koboldian?");
    						sender.sendMessage("~/race selection~");
    						return true;
    					}else{
    						 if (race == 1){
    							 sender.sendMessage("You're a Dwarf, how could you forget!?");
    							 return true;
    						 }
    						 if (race == 2){
    							 sender.sendMessage("You're an Elf, how could you forget!?");
    							 return true;
    						 }
    						 if (race == 3){
    							 sender.sendMessage("You're a Human, how could you forget!?");
    							 return true;
    						 }
    						 if (race == 4){
    							 sender.sendMessage("You're a Koboldian, how could you forget!?");
    							 return true;
    						 }
    					}
    				}else{
    					if (args[0].equalsIgnoreCase("Dwarven")){
    						
    						sender.sendMessage("Enjoy your life as a Dwarf!");
    						return true;
    					}
    					if (args[0].equalsIgnoreCase("Elven")){
    						sender.sendMessage("Enjoy your life as an Elf!");
    						return true;
    					}
    					if (args[0].equalsIgnoreCase("Human")){
    						sender.sendMessage("Enjoy your life as a Human!");
    						return true;
    					}
    					if (args[0].equalsIgnoreCase("Koboldian")){
    						sender.sendMessage("Enjoy your life as a Kobold!");
    						return true;
    					}
    				}
    			}
    		}
    		return false;
    	}
    

    this causes an unhandled exception error, any idea where I went wrong?

  • Avatar of DPOHVAR DPOHVAR Jun 21, 2014 at 16:35 UTC - 0 likes

    @patey5: Go

    PowerNBT 0.7.3.1 now can work with cauldron
    Tested with cauldron-1.7.2-1.1126.04.34-server

  • Avatar of DPOHVAR DPOHVAR Jun 17, 2014 at 02:14 UTC - 0 likes

    @patey5: Go

    MCPC + no longer exists (((
    Try to find in archives: google:mcpc-plus-1.7.2

    I will add support cauldron in the next snapshot
    It takes a few days

  • Avatar of patey5 patey5 Jun 16, 2014 at 23:35 UTC - 0 likes

    @DPOHVAR: Go

    I'm using cauldron, MCPC+ was renamed to cauldron for the 1.7.2 version, and none of the 1.7.2 versions work for powerNBT 0.7.1 or above. all return the same error, http://pastebin.com/yWbSdgtr

    do you know where I can find the right MCPC+? I checked the jenkins but only found cauldron for 1.7.2

    Last edited Jun 17, 2014 by patey5

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
13,160
Recent files

Authors