Virtual Chest Problems

Discussion in 'Plugin Development' started by ThaPear, Mar 26, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    ThaPear

    I'm trying to create a virtual chest, but the code I got from the proof of concept isn't working for me...
    This is the code for my RCChest class, for validating the chest.
    Code:
    package rc.rc.ThaPear.RemoteChests;
    
    
    import net.minecraft.server.EntityHuman;
    import net.minecraft.server.TileEntityChest;
    
    public class RCChest extends TileEntityChest
    {
        @Override
        public boolean a_(EntityHuman entityhuman)
        {
            return true;
        }
    
    }
    However, it's telling me that the class hierarchy is incorrect.
    On the java syntaxerror wiki I saw this meant I was extending from a nonexistent class, the class does exist, however.

    For opening the chest I have a command set up to call this function:
    Code:
    private boolean rcOpenChest(Player player, String[] args)
    
        {
            if(chest != null)
            {
                InventoryLargeChest lrgchst = new InventoryLargeChest("TestChest", new RCChest(), new RCChest());
                CraftPlayer cPlayer = (CraftPlayer) player;
                cPlayer.getHandle().a((IInventory)lrgchst);
            }
            return true;
        }


    Possible causes:

    When looking through my .git-downloaded folders (bukkit & craftbukkit) I noticed that a lot of net.minecraft.server... stuff was not there. (for example TileEntity, from which TileEntityChest extends) Not sure if this is the problem and how I'd fix it.


    I've setup my resources following this tutorial: HOWTO: Bukkit & CraftBukkit (Using Windows & Eclipse), which was on the wiki.

    Thanks for reading,
    ThaPear

    Edit:
    Forgot some information:
    I can build it to .jar fine, but my (craftbukkit) server says net.minecraft.server.TileEntity stuff is missing.
     
  2. Offline

    Edward Hand

    What exact errors are you getting?
    Have you made sure to include both the bukkit and craftbukkit snapshots in your java buildpath?
     
  3. Offline

    ThaPear

    Ah thanks, I was using the wrong jars. It doesn't give those errors anymore.
     
Thread Status:
Not open for further replies.

Share This Page