Possible to "bless" a mule's chest to a player so only he can open it?

Discussion in 'Plugin Development' started by ice374, Aug 21, 2013.

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

    ice374

    Hey, I'm wondering if it is possible to "bless" a certain mule's chest to a player so only he can open it? And if so, how?
     
  2. Offline

    etaxi341

    ice374 Cancel the PlayerInteractEntityEvent (I think its called so) if the Player is not the owner of the mule.
     
    ice374 likes this.
  3. Offline

    ice374

    i get that bit, but how do i store and check if they are the owner
     
  4. Offline

    etaxi341

    ice374 Save the UUID of the Mule + the Players Name in a HashMap which is saved on reload and then loaded back into the HashMap. Then check if the UUID and the Playername are correct and then he is the owner.

    ice374 EDIT: Or you could set the Name of the Mule to the Name of the Owner. Then just check if the name of the mule is the Players name.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 4, 2016
    ice374 likes this.
  5. Offline

    ice374

Thread Status:
Not open for further replies.

Share This Page