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

Solved How do i fix this crash?

Comments in 'Plugin Development' started by BlubberBoy333, Aug 9, 2015.

  1. BlubberBoy333
    Offline

    BlubberBoy333 Active Member

    Joined:
    Aug 31, 2014
    Posts:
    177
    Minecraft User:
    Blubberboy333
    I'm making a plugin, but when i start the server, it says this:
    Cannot override final method pocketmine\plugin\PluginBase::getServer()

    I've never seen this in any of my plugins. Does anyone know what is causing it, and how to fix it?
  2. BlubberBoy333
    Offline

    BlubberBoy333 Active Member

    Joined:
    Aug 31, 2014
    Posts:
    177
    Minecraft User:
    Blubberboy333
    Here is the crash dump:
    PocketMine-MP Crash Dump Sat Aug 8 23:42:07 UTC 2015

    Error: Cannot override final method pocketmine\plugin\PluginBase::getServer()
    File: /HideNSeek_v1.0.0/src/HideNSeek/MainClass
    Line: 17
    Type: E_COMPILE_ERROR

    THIS CRASH WAS CAUSED BY A PLUGIN

    Code:
    [8] use pocketmine\event\player\PlayerMoveEvent;
    [9] use pocketmine\event\player\PlayerChatEvent;
    [10] use pocketmine\event\player\PlayerInteractEvent;
    [11] use pocketmine\event\block\BlockBreakEvent;
    [12] use pocketmine\event\block\BlockPlaceEvent;
    [13] use pocketmine\event\Listener;
    [14] use pocketmine\math\Vector3;
    [15] use pocketmine\Server;
    [16]
    [17] class MainClass extends Base implements Listener{
    [18] // Map1 variables
    [19] public $seconds1 = 0;
    [20] public $map1 = array();
    [21] public $map1Hunters = array();
    [22] // Map2 variables
    [23] public $map2 = array();
    [24] public $map2Hunters = array();
    [25] public $seconds2 = 0;
    [26] // Map3 variables
    [27] public $map3 = array();
  3. CraftYourBukkit
    Offline

    CraftYourBukkit Notable Member Plugin Developer

    Joined:
    Jan 20, 2015
    Posts:
    1,022
    Plugins:
    2
    Minecraft User:
    CraftYourBukkit
    Did you import PluginBase as Base?
  4. BlubberBoy333
    Offline

    BlubberBoy333 Active Member

    Joined:
    Aug 31, 2014
    Posts:
    177
    Minecraft User:
    Blubberboy333
  5. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Full code? Did you define a function called getServer()?
  6. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    He has method called getServer() in main file right?
  7. BlubberBoy333
    Offline

    BlubberBoy333 Active Member

    Joined:
    Aug 31, 2014
    Posts:
    177
    Minecraft User:
    Blubberboy333
    Ohhh i see what i did wrong :p
    Thanks for the help guys :)

Share This Page

Advertisement