Placing chests with NBT data

Discussion in 'Spigot Help' started by BlackBeltPanda, Sep 23, 2015.

  1. Is there a restriction on non-OP players placing chests with NBT data?
    I can place a pre-filled chest as OP but as a regular player, the chest is empty.
    #1 BlackBeltPanda, Sep 23, 2015
    Last edited: Sep 23, 2015
  2. Update: This occurs with no plugins, so it seems to be a Spigot issue.
    Running git-Spigot-76236cb-62a2169 (MC: 1.8.8) (Implementing API version 1.8.8-R0.1-SNAPSHOT)

    I can't find any patch notes relating to this. =/
  3. I have the same problem, anyone found a solution yet?

    my command: /give @p[score_Noob=0] minecraft:chest 1 0 {display:{Name:"Starter Kit"},BlockEntityTag:{Items:[{Slot:0,id:ender_chest,Count:1},{Slot:1,id:golden_shovel,Count:1},{Slot:2,id:cooked_beef,Count:16},{Slot:3,id:torch,Count:16}]}}

    I got items inside the chest, but other players only get empty chest :(
    • Agree Agree x 1
  4. Here we are four months later and this issue still exists. I tested in single-player mode, and gamemode survival players can place +NBT chests just fine without the contents clearing, but when this happens on a spigot server the items are lost. I really hope someone makes a fix for this, but my temporary (dev) solution is to set players to gamemode creative when they place a chests then immediately switch them back to survival in the same tick.
  5. More than a year later, I still hate this "feature". So I figured out where it is in the Spigot source code.

    After you run BuildTools.jar to compile everything, you can do this:
    1. In the subfolder Spigot/Spigot-Server
    2. Edit the file src/main/java/net/minecraft/server/
    3. Remove these lines:
    // CraftBukkit start
    public boolean isFilteredNBT() {
    return true;
    // CraftBukkit end

    4. Recompile Spigot

    Hooray, no more stupid NBT limitation when placing chests as a non-op'd player.

    Hope someone finds these breadcrumbs and they are useful.
    • Informative Informative x 4
  6. I have edit the, but i don't know what i have to do after!! How i recompile spigot?!