Posts by yahwho

    Hi @red51


    Is there a method in which I can catch an illegal state and cancel the event?


    I'm getting a few:


    Code
    INFO: Player <playername> illegal state: InventoryStackExchange: Origin item is null

    I'm finding it difficult to replicate the exact cause, sometimes I can get it to happen, other times I can't. ?(





    Edit: not super important as it doesn't seem to happen often. . . also, it seems to happen when splitting stacks.

    Hi @red51


    I'm working on some code that uses a GUI when items are moved from or to a chest (for player operated shops).


    The problem I am having is the GUI always appears underneath the in-game inventory's GUI. So I could do with something like:




    Behind this screen (indicated by red arrow) appears my confirmation GUI. Which is only visible once you close the inventory screen.





    As it appears behind the inventory screen its not much use currently ;(



    Edit: Maybe a way to show and hide (.setVisible(false || true) ) the inventory screen might work?

    Hi!


    Code
    public void onPlayerSetExplosiveEvent(PlayerSetExplosiveEvent event){
    //this would be a super useful event method
    }


    This would be great - currently I have had to make TNT explosions on Medieval Realms server zero damage to prevent griefers using it maliciously. But if someone could use it on their own land. . .

    There is already a mini pig.


    But yet, I would assume smaller animals would just require the object to be made smaller ( or even bigger! Imagine attacking a giant leopard! :) )


    An API call for setting an NPCs size by ID would be great!

    I'm struggling to get a chest ID via a raycast, I'm using this code:



    But as my code comment states, I always get a -1 return on the r.getCollisionInfor();

    Hi all, and seasons greetings!


    I am trying to determine when a firework is lit, I have tried PlayerObjectInteraction, PlayerChangeObjectStatusEvent, and PlayerObjectEvent, but none seem to be called when a firework is lit. Looking through the API I do not see anything obvious to use?


    Any help would be greatly received 8o