Posts by King Nothing

A new update is now available, introducing "Points of interest" and many more changes!
Latest hotfix: 0.9 (2025-11-05)

    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.