Problem with InventoryClickEvent

Discussion in 'Plugin Development' started by Furia25, Sep 21, 2020.

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

    Furia25

    Hello! I would like to have some help for my event, my goal being to rename an object with another object by clicking on it, the problem being that I have errors.
    My object is not renamed :,c
    My plugin is in 1.14.4





    My code and my Error

    Code : https://pastebin.com/sxJ7aN8C
    Error : https://pastebin.com/VrVJfFTa
     
  2. Offline

    timtower Administrator Administrator Moderator

    @Furia25 e.getCursor().getItemMeta().setDisplayName("Test");
    getItemMeta returns a copy, you need to get the value.
    Modify the value.
    Set the value.
     
  3. Offline

    Furia25

    @timtowerThanks

    The Item Still dont rename

    https://pastebin.com/9hdYuCf5

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Sep 21, 2020
  4. Offline

    KarimAKL

  5. Offline

    Furia25

    Last edited: Sep 21, 2020
  6. Offline

    caderapee

    @Furia25 try to update the inventory
     
  7. Offline

    Furia25

    Nothing happened When i update the inventory
     
  8. Offline

    KarimAKL

    @Furia25 Are you sure that it's even being called? Try debugging.
     
Thread Status:
Not open for further replies.

Share This Page