Posts by King Nothing

A small new update is available now!
Unfortunately the forums, server list and report tool were offline last night due to technical issues. Sorry for the inconvenience! It should be working again.
However, unfortunately the Standalone update is temporarily not available. We expect it to be fixed in a couple of hours. Please let me know if you want to get a Steam key instead!

    What i Evetually want this to do is check Weather an item is "Sellable" and the Sell Price (the Prices will change and be Written to a databse )
    right now this is just to get the man code working,
    Im using a chest to "eat"the item and give the correct amout of money for it.

    Java
    @EventMethod
    public void PlayerInventoryToChestEvent(PlayerInventoryToChestEvent event){
    Player player = event.getPlayer();
    final int infoId = event.getChestID();
    String Pname = player.getName();
    Chest chest = getWorld().getChest(infoId);
    Item[] Items = chest.getItems();
    // player.sendTextMessage("yes"+NameofItem);
    if (items.getName() != null && item.getName().equals("bandage")){
    }

    ive Tried all Three Methods and get "Cannot Find Symbol"


    if i use getitem without (1) i get "Found no Arguments"



    this CANNOT be done
    Maybe Red can explain why we need an argument for getItem();

    the problem is with
    line 8 on


    this is the Whole Block, the cose itself is 300 lines long.

    java.lang.NullPointerException
    at BootyBay.PlayerInventoryToChestEvent(BootyBay.java:10)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at pluginapi.PluginEventHandler.triggerEvent(SourceFile:201)
    at aU.f.a(SourceFile:883)
    at aU.f.messageReceived(SourceFile:119)
    at k.e.a(SourceFile:109)
    at k.c.run(SourceFile:65)


    why does reurn a NULL exeption?

    it only works in single player, it clears the chest in singleplayer, but not on the server

    This Code I posted, when there somethuing that is there, it works Fine, I want it to say "Not Fouind." it Shows the Igtem Info

    how do get the "Name" of the item?

    the above code gives these errors:


    java.lang.NullPointerException
    at e.a.a(SourceFile:339)
    at e.a.a(SourceFile:311)
    at pluginapi.objects.ChestAPI.insertNewItem(SourceFile:51)
    at BootyBay.onItemPickUpFromChest(BootyBay.java:29)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at pluginapi.PluginEventHandler.triggerEvent(SourceFile:201)
    at aU.f.a(SourceFile:942)
    at aU.f.messageReceived(SourceFile:119)
    at k.e.a(SourceFile:109)
    at k.c.run(SourceFile:65)


    please help me, i tied useing every type of syntax and get Nothing.