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

KillMoney 1.1.0

With this plugin, you can Kill players and Earn Money.

  1. PhoenixChicken
    Offline

    PhoenixChicken Active Member

    Joined:
    Sep 7, 2015
    Posts:
    41
    Minecraft User:
    Phoenix_Chicken
    Crashes my server:

    Fatal error: Call to a member function getDamager() on null in phar:///Users/servers/Desktop/h/plugins/KillMoney_v1.1.0.phar/src/KillMoney/KillMoney.php on line 60
    [05:32:27] [EMERGENCY]: An unrecoverable error has occurred and the server has crashed. Creating a crash dump
    [05:32:27] [EMERGENCY]: Please upload the "/Users/servers/Desktop/h/CrashDump_Thu_Nov_26-05.32.27-UTC_2015.log" file to the Crash Archive and submit the link to the Bug Reporting page. Give as much info as you can.
  2. PhoenixChicken
    Offline

    PhoenixChicken Active Member

    Joined:
    Sep 7, 2015
    Posts:
    41
    Minecraft User:
    Phoenix_Chicken
    Heh... Turns out he's inactive.... Great.
    Legoboy0215 likes this.
  3. JoRa22
    Offline

    JoRa22 New Member

    Joined:
    Jun 21, 2016
    Posts:
    5
    can you tell me why I am getting this error?

    [Server] Server thread/CRITICAL "Could not pass event 'pocketmine\event\entity\EntityDeathEvent' to 'KillMoney v1.1.0': Call to undefined method pocketmine\event\entity\EntityDamageEvent::getDamager() on KillMoney\KillMoney
  4. Survingo
    Offline

    Survingo Active Member

    Joined:
    Dec 6, 2015
    Posts:
    221
    Because it's not working for 1.6dev...
    EntityDamageEvent::getDamager() doesn't exists in EntityDamageEvent.php anymore it's located in EntityDamageByEntityEvent.php and EntityDamageByBlockEvent.php
  5. JoRa22
    Offline

    JoRa22 New Member

    Joined:
    Jun 21, 2016
    Posts:
    5
    Thx for the response and Sorry I'm a bit of a noob with this... But how can fix this?
  6. Yeelze
    Offline

    Yeelze New Member

    Joined:
    Apr 2, 2016
    Posts:
    31
    Minecraft User:
    Yeelze
    I find a solution.
    You can go to EconomyAPI source and add to the Main:
    PHP:
    public function onDeath(PlayerDeathEvent $event){
            if((
    $entity $event->getEntity()) instanceof Player){
                
    $cause $entity->getLastDamageCause();
                if(
    $cause instanceof EntityDamageByEntityEvent && ($damager $cause->getDamager()) instanceof Player){
                    
    $amount 1;
                    
    $this->addMoney($damager$amount);
                    
    $damager->sendMessage("┬žaYou get ".$amount." coin!");
                }
            }
        }
    And in the use:
    PHP:
    use pocketmine\event\player\PlayerDeathEvent;
    Survingo likes this.

Share This Page

Advertisement