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

PluginEvent errors

Comments in 'Plugin Development' started by Tethered_, Jul 21, 2015.

  1. Tethered_
    Offline

    Tethered_ Active Member Plugin Developer

    Joined:
    Jun 24, 2014
    Posts:
    178
    Plugins:
    2
    Minecraft User:
    Frostbyte58
    I'm trying to create custom Plugin Events but I get this error when I call one from another plugin:

    Fatal error: Access to undeclared static property: gladius\event\game\GameStartEvent::$handlerList in phar://C:/Users/Tethered/Desktop/PocketMine-MP/PocketMine-MP.phar/src/pocketmine/plugin/PluginManager.php on line 770
    Creeperface likes this.
  2. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
  3. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,325
    Plugins:
    11
    Minecraft User:
    PEMapModder
    You need to add a line:
    PHP:
    public static $handlerList null;
    in your event. Look at all events in PocketMine source that you can use as event handler events. They all have this line.
  4. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    and what is "can not redeclare class" ?
  5. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,325
    Plugins:
    11
    Minecraft User:
    PEMapModder
    More details?
  6. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    sorry it was my fail xD

Share This Page

Advertisement