1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Cant take item

Discussion in 'Plugin Help' started by StuckDexter, Apr 17, 2017.

  1. StuckDexter

    StuckDexter Silverfish

    Messages:
    24
    Can anyone help me?

    I want that player cant take a item as drop.
    Is this possible when yes how?

    Thanks
     
  2. corytortoise

    corytortoise Skeleton

    Messages:
    825
    GitHub:
    corytortoise
    You can listen for InventoryPickupItemEvent and cancel it.
     
  3. Jonas

    Jonas Baby Zombie

    Messages:
    192
    When you mean that a player can't drop an item than use the PlayerDropEvent and cancel it
     
    Last edited: Apr 17, 2017
  4. StuckDexter

    StuckDexter Silverfish

    Messages:
    24
  5. StuckDexter

    StuckDexter Silverfish

    Messages:
    24
    And is ist possible that only one player can see the item?
    Because a item Is a entity.
     
  6. corytortoise

    corytortoise Skeleton

    Messages:
    825
    GitHub:
    corytortoise
    I believe you could despawn it from all, then spawn it to the player, or just despawn from an array of players excluding the target player. I'm not sure how you will get the Entity though.
     
  7. StuckDexter

    StuckDexter Silverfish

    Messages:
    24
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.