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

Need help

Comments in 'Plugin Development' started by IronPony, Dec 11, 2013.

  1. IronPony
    Offline

    IronPony Active Member Plugin Developer

    Joined:
    Sep 1, 2013
    Posts:
    93
    Plugins:
    4
    Minecraft User:
    1ron_pon3
    I think that the problem is simple, maybe I just need to sleep sometimes :D

    The code is:

    PHP:
    case "player.spawn":
    $user $data["player"]
    Error: Cannot use object of type Player as array
    I used the same code several times and it has been working
  2. Falk
    Offline

    Falk Staff Member Global Moderator

    Joined:
    Sep 2, 2013
    Posts:
    1,707
    Plugins:
    22
    Minecraft User:
    Falkirknh
    I think that the player object is the only data passed so ['player'] isn't needed
    IronPony likes this.
  3. InusualZ
    Offline

    InusualZ Active Member Plugin Developer

    Joined:
    Aug 23, 2013
    Posts:
    218
    Plugins:
    1
    Minecraft User:
    Inusu4lZ
    Like he say, when the event player.spawn is trigged, PocketMine send the player object

Share This Page

Advertisement