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

Plugin Help

Comments in 'Plugin Development' started by applqpak, Jan 15, 2016.

  1. applqpak
    Offline

    applqpak Active Member Plugin Developer

    Joined:
    Dec 16, 2015
    Posts:
    284
    Plugins:
    1
    Minecraft User:
    applqpak
    Hello, I have a problem with my LaggyKick plugin, it's like @ZacHack's "PingKick" plugin, but updated.

    Crash Dump:
    Code:
    PocketMine-MP Crash Dump Fri Jan 15 06:58:13 UTC 2016
    
    Error: Call to a member function getAddress() on null
    File: /LaggyKick.phar/src/LaggyKick/Main
    Line: 41
    Type: E_ERROR
    
    THIS CRASH WAS CAUSED BY A PLUGIN
    BAD PLUGIN: LaggyKick v1.0.0
    
    Code:
    [32]       if($cmd->getName() === "ping") {
    [33]
    [34]         if(!(isset($args[0]))) {
    [35]
    [36]           $sender->sendMessage(TF::RED . "Error: not enough args. Usage: /ping <player>");
    [37]
    [38]         } else {
    [39]
    [40]           $player = $this->getServer()->getPlayer($args[0]);
    [41]           $player_ip = $player->getAddress();
    [42]           $get_ping = 'max-ping: ';
    [43]           $config_file = file_get_contents($this->getDataFolder() . "ping.txt");
    [44]           $max_ping = substr(strstr($config_file, $get_ping), strlen($get_ping));
    [45]
    [46]           $tB = microtime(true);
    [47]           $fP = fSockOpen($player_ip, 80, $errno, $errstr, 10);
    [48]
    [49]           if(!($fP)) {
    [50]
    [51]             $sender->sendMessage(TF::RED . $player . "'s IP: " . $player_ip . " was unreachable.");
    
    Backtrace:
    #0 (): pocketmine\Server->crashDump(boolean)
    
    PocketMine-MP version: 1.6dev #52 [Protocol 38; API 1.13.1]
    Git commit: 0000000000000000000000000000000000000000
    uname -a: Linux 40b144a07a74 3.19.8-031908-generic #201505110938 SMP Mon May 11 13:39:59 UTC 2015 x86_64
    PHP Version: 5.6.9
    Zend version: 2.6.0
    OS : Linux, linux
    
    Loaded plugins:
    PlayHarder 1.0-TEST by hm for API(s) 1.13.0, 2.0.0
    CustomMessages 1.0.0 by applqpak/NameNoOne100 for API(s) 1.0.0
    essentialsTP 1.1.0 by  for API(s) 1.12.0
    AdvancedKits 4.0.1 by luca28pet for API(s) 1.12.0
    ChatFilter 1.1 by onebone for API(s) 1.1.0, 1.2.0, 1.2.1
    Economy2 0.1.1 by ProjectInfinity for API(s) 1.12.0
    TheDropper 1.0.0 by  for API(s) 1.1.0
    TimerBan 2.1 by onebone for API(s) 1.2.0, 1.2.1
    TapToDo 2.2.1 by Falk for API(s) 1.0.0
    iProtector 3.1a by LDX for API(s) 1.9.0
    Slapper 1.2.8 by jojoe77777 for API(s) 1.12.0
    ASR 2.0.2 by iJoshuaHD for API(s) 1.12.0
    PeacefulSpawn 2.4 by LDX for API(s) 1.3.1, 1.4.0
    SimpleAuth 1.7.1 by PocketMine Team, shoghicp for API(s) 1.12.0
    Broadcaster 1.16 by EvolSoft for API(s) 1.12.0
    DevTools 1.10.0 by PocketMine Team for API(s) 1.3.1
    ftd 1.0.0 by  for API(s) 1.0.0
    InventoryClear 1.3 by CrazedMiner for API(s) 1.11.0
    AlwaysSpawn 2.2.2 by Philip Shilling for API(s) 1.12.0
    Geo_Protection 1.0.0 by NameNoOne100 for API(s) 1.0.0
    1vs1 0.0.5 by  for API(s) 1.0.0, 1.1.0
    WorldEditArt 1.0.0_beta_dev_#048 by PEMapModder for API(s) 1.0.0
    Alias 1.2.0 by ZacHack for API(s) 1.12.0
    PurePerms 1.2.2 by 64FF00 for API(s) 1.12.0
    xRulesx 1.0.0 by xFlare for API(s) 1.8.0
    CombatLogger 1.2.0 by Lambo for API(s) 1.12.0
    EconomyAPI 0.1.0 by ProjectInfinity for API(s) 1.12.0
    SimpleAuthHelper 2.0.4 by aliuly for API(s) 1.12.0
    WhitelistReason 1.0.0 by applqpak/NameNoOne100 for API(s) 1.0.0
    ClearLagg 1.1.0 by LegendOfMCPE for API(s) 1.0.0
    KillMoney 1.1.0 by Topic for API(s) 1.9.0
    Economy2Shop 0.1.2 by ProjectInfinity for API(s) 1.12.0
    FactionsPro 1.3.2 by Tethered_ for API(s) 1.12.0
    ItemCasePE 1.0.8 by aliuly for API(s) 1.10.0, 1.13.0
    LaggyKick 1.0.0 by  for API(s) 1.0.0
    VoteReward 2.1 by LDX for API(s) 1.0.0, 1.1.0, 1.2.0, 1.3.0
    PureChat 1.3.3 by 64FF00 for API(s) 1.11.0
    Jail 2.0.3 by hoyinm14mc for API(s) 1.13.0, 1.13.1
    KillRate 2.1.1 by aliuly for API(s) 1.12.0
    
    ----------------------REPORT THE DATA BELOW THIS LINE-----------------------
    
    ===BEGIN CRASH DUMP===
    eNrNXAtT5LaW/ivanqkKbLX73dB0llRxgUkmgQwLzJ1bN05Rsi13e7Atx7JpOqn89z3nSLZlQ2Zg
    hs0ulaTbehx9530kq/NHr4gS0VuOZ/PJYjYeHUz7PZHnMu8t/+gV2wy6eqc3p5eX7y57/V4ilOIr
    bDvmccwKyThLROKJnIVl6heRTNlKFEdBkMPInV0Gz2kZxzA1jGKcNzzjq9X2p8i/HWRrng9V7jdN
    w3MepTA2jlIYOxv/2e9lcbmCtmWvHgT9vgwE4ptOoIPRXxTuvPaTwPkOlv+ZJwLWPjw8ZG4vi9KV
    29tlf8C86RTG4+esnkcz/2MnUkoUO695vlK/jH7d3TXj52b8njWesddKpIHIne/w81yLZOf6zXJ5
    eXrCBrDmKQpwyVJZMJHKcrVmSHjA3uPIJRsiJvZfWcy3Iv8OwH2La+ybtRbWWn8yESuhsRzo/tmo
    jUVTYYfsdbGOFPF/JfI7ke/s0sMF9Tes4Vqz8WM0bqIMyegHmlvrkSZN2pOg/4YYOWTfJPzewe9L
    9g0NnbaH+jINo9UNmgCMxo8bnA3NhUgLtdNAP+EFfyPjAOGTKJHqoLgvjJRmszZlWLgCoUpPFfkO
    /Isf9pr9Buxun0FvLNKdpkkTNqqedVRd/ANIJ5GfS/STnSIvhR6/3x4XXiBnV9K/fZch9VqkfbYY
    AQDwqVTqTwDQZ+ORJrMwyx60yJFNAk1jh/ORHjVv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WovoocSekfUPxBG0loViJCabmv6MMFGiljHN+z3hXLrAH8ik/NPbQ
    1gUZ6SUPolJZ04weuEFHTqqnGrvD8VCtYEzCUzCnzAKwxQYgbLUF14vQOVyTBTXwZmNXYR88BG/i
    34ZHtEeH/XgpjH7NfHJ7ancUKGvJFl9ELZNZGRtq5jumpg5hNyWfdEB6CFqf9TlkRwoliaJMIFYX
    eORiWscmPOA52pLp4q5SKf66scyg2NEVnzZICh660DC0gMo+zjILItE5Pm44LlQ3UhtPvAgsXw8x
    R3h6j77UwQiPE/AXlky36hxrjERbr6nk6+CGdu3gAU+7pU4nrdZsnUVpKBszWEvUPS05sM77oBAi
    fKlMtwmW+eQhCuSraqC4bzHdrOkmwGBrnPHVCrKPORyoj12wRsTfmd4+zo3Gg+TUY3hQXtqUScXd
    2WATunepFZCnjknOTQVIrTKzDoyO8cyQDrFELDPMVn2G9/3wsAWQmFIMKpMQKmUBwob8lGKex0Em
    tZaoHfBHiwgzbzesGqKEglMVOsFVAc9QQw3p7oq+6ggFX7c8IhK8EqcrX6iUOOZb/YAFC9A3IJYV
    GuoCY8ed8pL9gl8dSDJ92jr/ihR1FKzKEPu0lZio9gt601YdcdNu7LHDW9rcUhZTVDEg2wkUEhEA
    NSnegk6rEgD6xvBIHF2XUlKz2pLhufhy8u1+f35wP+5P76f9ybfjbwPIxDpq7eB7FB8jzOFixFZg
    30o/zea7dLgt7guRokDoVuAx5CHr97wBvbGqHyEdrOpf0GY+DjUP6rc4KsRU/wLZ0b92/l3/JFm/
    pfV8qGvW9Xg8OE0DvMFdNej/50L1VOZx/RCaXyriHQv96jcssrp31fymd5U0zWtwZP0uHMZ/VPXV
    OHy3RtIOPHNrY27gJp4+7K1JQNG4zYqGxYIj4sCSx9XFGRHB+xCZD8VeM3cLEqHfQptvbI6/Gx3j
    WszBd02T0Xw0ha+v3+Ju2t9bLLw9z/Ono2C6x8Mp96ezMAhm3r439/YX+6GYwx97jW8w1yi3+vdA
    mVTRfaMVs5s3A8bI76UI4+r2dY/WE2G48AJ/b+6NPMHDRTjjgdgLR3vhYrYQe8FsGoTBYrJH66l1
    IhvBKvI81eY00rKEwYW8FSkkorxu+SD4LYQMLagB/vhjy+ktyti86vw9yvTTZDDv/fnn/wAkZ3xF
    ===END CRASH DUMP===
    
  2. applqpak
    Offline

    applqpak Active Member Plugin Developer

    Joined:
    Dec 16, 2015
    Posts:
    284
    Plugins:
    1
    Minecraft User:
    applqpak
    I don't know what it means by "Call to member function getAddress() on null."
  3. AndrewBit
    Offline

    AndrewBit Notable Member

    Joined:
    Jun 18, 2015
    Posts:
    435
    Minecraft User:
    AndrewBit4
    PHP:
    if($player instanceof Player){
    //
    }
    PEMapModder, Vaivez66 and applqpak like this.
  4. applqpak
    Offline

    applqpak Active Member Plugin Developer

    Joined:
    Dec 16, 2015
    Posts:
    284
    Plugins:
    1
    Minecraft User:
    applqpak
    Oh, thank you. Also, thanks for quick reply. :p
  5. applqpak
    Offline

    applqpak Active Member Plugin Developer

    Joined:
    Dec 16, 2015
    Posts:
    284
    Plugins:
    1
    Minecraft User:
    applqpak
    Now, when I do /ping applqpak it says Error: Player(147) was not found.
  6. applqpak
    Offline

    applqpak Active Member Plugin Developer

    Joined:
    Dec 16, 2015
    Posts:
    284
    Plugins:
    1
    Minecraft User:
    applqpak
    When I ping someone who is online, it says "Error: Player(147) was not found." And when I ping someone who is not online, it says "Error: was not found."
  7. wolfdale
    Offline

    wolfdale Active Member Plugin Developer

    Joined:
    Dec 3, 2014
    Posts:
    276
    Plugins:
    1
    Minecraft User:
    ace
    Thats because you are using the player object when displaying instead of the name of the player
    PEMapModder and applqpak like this.
  8. Vaivez66
    Offline

    Vaivez66 Notable Member Plugin Developer

    Joined:
    Jun 10, 2015
    Posts:
    402
    Plugins:
    2
    Use $player->getName()
    applqpak likes this.
  9. applqpak
    Offline

    applqpak Active Member Plugin Developer

    Joined:
    Dec 16, 2015
    Posts:
    284
    Plugins:
    1
    Minecraft User:
    applqpak
    That's fixed most errors, now when I run /ping applqpak it says "Unknown error occurred..." And on the server.log it says "fsockopen(): failed to open stream PlayersIPHere:80."
  10. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    First of all, why do you think that method even has any chance to work? I am on a computer with no any servers running, and I tried your method on "127.0.0.1", and it fails with "No connection could be made because the target machine actively refused it", simply because there is no server running at port 80.
    fsockopen($ip) creates a TCP socket to $ip:80. Why do you think it would be a valid connection, much less sending data?
  11. applqpak
    Offline

    applqpak Active Member Plugin Developer

    Joined:
    Dec 16, 2015
    Posts:
    284
    Plugins:
    1
    Minecraft User:
    applqpak
    Because, I've run test, and it opens up sockets perfectly fine.
  12. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Because there is an HTTP server on your side?
    fsockopen on an address that doesn't have a server running always fails.
  13. applqpak
    Offline

    applqpak Active Member Plugin Developer

    Joined:
    Dec 16, 2015
    Posts:
    284
    Plugins:
    1
    Minecraft User:
    applqpak
    Seems to work, when I did it on websites, my IP, and my friends...
  14. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
  15. wolfdale
    Offline

    wolfdale Active Member Plugin Developer

    Joined:
    Dec 3, 2014
    Posts:
    276
    Plugins:
    1
    Minecraft User:
    ace
    PEMapModder, Vaivez66 and applqpak like this.
  16. applqpak
    Offline

    applqpak Active Member Plugin Developer

    Joined:
    Dec 16, 2015
    Posts:
    284
    Plugins:
    1
    Minecraft User:
    applqpak
  17. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Note that it is definitely possible to find an address that ignores your ping.

Share This Page

Advertisement