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

Ban name and player ip

Comments in 'Plugin Development' started by TonyDroide, Aug 22, 2015.

  1. TonyDroide
    Offline

    TonyDroide Active Member Plugin Developer

    Joined:
    Jun 5, 2015
    Posts:
    122
    Plugins:
    1
    Minecraft User:
    TonyDroidd
    How i cand do that??
    ( Withou use commands[/ban-ip] )

    i try
    PHP:
    $player->setBanned(true);
    but does not works xD
    and how i can ban his ip??
  2. UltimateMcraft
    Offline

    UltimateMcraft New Member

    Joined:
    Feb 17, 2014
    Posts:
    21
    Minecraft User:
    UltimateMcraft
    What?? Use english please!
    If you mean

    Here is the answer
    there is a command which bans their ip so no matter what name they use they are banned. ALthough this doesentbwork on people who have dynamic ip addresses.
    just do /ban-ip <name> <reason> although you can leave the reason blank
  3. Martin77Epic
    Offline

    Martin77Epic Banned

    Joined:
    Mar 6, 2015
    Posts:
    164
    Minecraft User:
    CookieMonsterPE
  4. Artide
    Offline

    Artide Active Member

    Joined:
    Apr 20, 2015
    Posts:
    214
    Minecraft User:
    Artide5
    Use this: $this->processIPBan($player->getAddress(), $sender, $reason);
    CrazedMiner likes this.
  5. CrazedMiner
    Offline

    CrazedMiner Notable Member Plugin Developer

    Joined:
    Jan 31, 2015
    Posts:
    348
    Plugins:
    2
    Minecraft User:
    CrazedMinerYT
    You could dispatch a command that bans them, do it with code or create your own ban system. I'd personally create my own ban system that bans their name, UUID and IP.
    Legoboy0215 likes this.
  6. Gamecrafter
    Offline

    Gamecrafter

    Joined:
    Nov 20, 2014
    Posts:
    978
    Plugins:
    9
    What's processIPBan()? What's $this? o_O
    PixelGuy75 and LDX like this.
  7. TonyDroide
    Offline

    TonyDroide Active Member Plugin Developer

    Joined:
    Jun 5, 2015
    Posts:
    122
    Plugins:
    1
    Minecraft User:
    TonyDroidd
    Please, read the thread before answering :)
  8. Artide
    Offline

    Artide Active Member

    Joined:
    Apr 20, 2015
    Posts:
    214
    Minecraft User:
    Artide5
    $this is to call the '$processIPBan' string. $processIPBan() is exactly what it says, or you don't know what the words mean?
    Last edited: Aug 23, 2015
  9. Gamecrafter
    Offline

    Gamecrafter

    Joined:
    Nov 20, 2014
    Posts:
    978
    Plugins:
    9
    You have no idea what you're talking about, do you? Please don't try to help if you don't understand yourself. You do more harm than help if you do.
    PEMapModder and CrazedMiner like this.
  10. Artide
    Offline

    Artide Active Member

    Joined:
    Apr 20, 2015
    Posts:
    214
    Minecraft User:
    Artide5
    I'm not talking, I'm typing. Also you shouldn't be replying in this thread if you're not even going to try to help.
    TonyDroide likes this.
  11. TonyDroide
    Offline

    TonyDroide Active Member Plugin Developer

    Joined:
    Jun 5, 2015
    Posts:
    122
    Plugins:
    1
    Minecraft User:
    TonyDroidd
    Can someone help me?
  12. Artide
    Offline

    Artide Active Member

    Joined:
    Apr 20, 2015
    Posts:
    214
    Minecraft User:
    Artide5
  13. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Read the pocketmine source code and see how they implemented it.
    PHP:
    $server->getIPBans()->addBan($ip$reasonnull$issuerName);
    Better than you giving wrong solutions. You don't understand PHP. Therefore you think $this is the same everywhere. And gave wrong answers.
    Last edited: Aug 25, 2015
    LDX and TonyDroide like this.
  14. Martin77Epic
    Offline

    Martin77Epic Banned

    Joined:
    Mar 6, 2015
    Posts:
    164
    Minecraft User:
    CookieMonsterPE
    Hey make /Ban-IP [Player] and /Ban [Player] [Reason] the Guy can not John with At nother IP with the acc
  15. UltimateMcraft
    Offline

    UltimateMcraft New Member

    Joined:
    Feb 17, 2014
    Posts:
    21
    Minecraft User:
    UltimateMcraft
    Wut
  16. Martin77Epic
    Offline

    Martin77Epic Banned

    Joined:
    Mar 6, 2015
    Posts:
    164
    Minecraft User:
    CookieMonsterPE
    John=Join* Sry
  17. TonyDroide
    Offline

    TonyDroide Active Member Plugin Developer

    Joined:
    Jun 5, 2015
    Posts:
    122
    Plugins:
    1
    Minecraft User:
    TonyDroidd
    Thanks ;)
  18. PocketKiller
    Offline

    PocketKiller Notable Member

    Joined:
    Jul 20, 2015
    Posts:
    741
    AMAZING @Artide You gave me an idea!
    It's to go to Pocketmine/src/pocketmine/command/defaults/bancommand
    and i CAN EDIT THE CODE AND CHANGE THE KICK message (get kicked because you are banned) to another massage!
    amazing!
  19. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    OK, but then that isn't a plugin.
  20. TonyDroide
    Offline

    TonyDroide Active Member Plugin Developer

    Joined:
    Jun 5, 2015
    Posts:
    122
    Plugins:
    1
    Minecraft User:
    TonyDroidd
    hahahaha xD

Share This Page

Advertisement