Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Renamed or Enchanted items

Comments in 'Plugin Development' started by XEmAX32, Oct 1, 2015.

  1. XEmAX32
    Offline

    XEmAX32 Active Member

    Joined:
    Feb 1, 2015
    Posts:
    80
    Minecraft User:
    XEmAX32
    Hi guys how i can add to a player inventory some enchanted or renamed items?
    Not with /give, its for a plugin :p
  2. Gamecrafter
    Offline

    Gamecrafter

    Joined:
    Nov 20, 2014
    Posts:
    978
    Plugins:
    9
    This Gist is by @shoghicp:
  3. XEmAX32
    Offline

    XEmAX32 Active Member

    Joined:
    Feb 1, 2015
    Posts:
    80
    Minecraft User:
    XEmAX32
    thank's gamecrafter :D.
    but if I want to see if a player have the renamed item in the hand what i have to do?
  4. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Check $item->getName()?

    BTW, remember that you should avoid using $server->dispatchCommand() for executing commands that you wrote instead of from direct player input.
    XEmAX32 likes this.
  5. XEmAX32
    Offline

    XEmAX32 Active Member

    Joined:
    Feb 1, 2015
    Posts:
    80
    Minecraft User:
    XEmAX32

Share This Page

Advertisement