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

Neeeeed help!

Comments in 'Plugin Development' started by Let It Snow!, Nov 13, 2013.

?

Is this plugin in existence?

  1. yes

    1 vote(s)
    100.0%
  2. no

    0 vote(s)
    0.0%
  1. Let It Snow!
    Offline

    Let It Snow! Active Member

    Joined:
    Oct 30, 2013
    Posts:
    60
    Minecraft User:
    LetItSnow_
    Hi, I'm running a server which has quite a few plugins. But there's one I need! I get players all the time asking for OP, I don't respond but can someone make a plugin that if they ask they get a warning of 'auto kick' and if they ask more then 4 times they get ban temp?
  2. Blubbll
    Offline

    Blubbll Active Member

    Joined:
    Oct 3, 2013
    Posts:
    325
    Minecraft User:
    Blubbll
  3. Let It Snow!
    Offline

    Let It Snow! Active Member

    Joined:
    Oct 30, 2013
    Posts:
    60
    Minecraft User:
    LetItSnow_
  4. Blubbll
    Offline

    Blubbll Active Member

    Joined:
    Oct 3, 2013
    Posts:
    325
    Minecraft User:
    Blubbll
    I understood it as when a user types "Op me" it then sends them a message containing "do /opme to get op"
    and when they do /opme it kicks them.
    Official:
    /op me = kill user, then send message:
    [Message] You need to be trusted by the owner if you wannto be OP
    And then kick user with reason: "Asking for OP"
  5. wies
    Offline

    wies Notable Member

    Joined:
    Aug 23, 2013
    Posts:
    392
    it doesn't send a message to the player when they say op me. It only kills and kicks the player when he uses the command /opme
    Let It Snow! likes this.
  6. Let It Snow!
    Offline

    Let It Snow! Active Member

    Joined:
    Oct 30, 2013
    Posts:
    60
    Minecraft User:
    LetItSnow_
    And it's stolen from another maker @Glitchmaster_PE
  7. wies
    Offline

    wies Notable Member

    Joined:
    Aug 23, 2013
    Posts:
    392
    yes it was an example plugin in his tutorial.
  8. Glitchmaster_PE
    Offline

    Glitchmaster_PE Notable Member Plugin Developer

    Joined:
    Aug 31, 2013
    Posts:
    834
    Plugins:
    8
    Minecraft User:
    Glitchmaster_PE
    No, it has some differences from my example plugin
  9. Let It Snow!
    Offline

    Let It Snow! Active Member

    Joined:
    Oct 30, 2013
    Posts:
    60
    Minecraft User:
    LetItSnow_
    Just help me...
  10. Glitchmaster_PE
    Offline

    Glitchmaster_PE Notable Member Plugin Developer

    Joined:
    Aug 31, 2013
    Posts:
    834
    Plugins:
    8
    Minecraft User:
    Glitchmaster_PE
    Although it was very similar
  11. Let It Snow!
    Offline

    Let It Snow! Active Member

    Joined:
    Oct 30, 2013
    Posts:
    60
    Minecraft User:
    LetItSnow_
    Just help me...
  12. Let It Snow!
    Offline

    Let It Snow! Active Member

    Joined:
    Oct 30, 2013
    Posts:
    60
    Minecraft User:
    LetItSnow_
    Jesus... can you help me! Maybe make a costom plugin A N Y T H I N G !
  13. Glitchmaster_PE
    Offline

    Glitchmaster_PE Notable Member Plugin Developer

    Joined:
    Aug 31, 2013
    Posts:
    834
    Plugins:
    8
    Minecraft User:
    Glitchmaster_PE
    I may be able to make that plugin, but I do not know how to filter chat... I can check some of the other plugins that include a chat filter though, I am also quit busy now-a-days, so we will have to see
  14. Let It Snow!
    Offline

    Let It Snow! Active Member

    Joined:
    Oct 30, 2013
    Posts:
    60
    Minecraft User:
    LetItSnow_
    Ok thanks,
  15. Falk
    Offline

    Falk Staff Member Global Moderator

    Joined:
    Sep 2, 2013
    Posts:
    1,710
    Plugins:
    22
    Minecraft User:
    Falkirknh
    If I have some spare time tonight I could try to make one too
  16. Falk
    Offline

    Falk Staff Member Global Moderator

    Joined:
    Sep 2, 2013
    Posts:
    1,710
    Plugins:
    22
    Minecraft User:
    Falkirknh
    Here is something I did cause I was bored in school, it won't block the messages but it will warn the user and kick them if they do it a lot.

    PHP:
    <?php

    /*
    __PocketMine Plugin__
    name=OPKick
    description=Prevent users from asking for OP
    version=0.1
    author=Falk
    class=opkick
    apiversion=10
    */
           
    class opkick implements Plugin{   
        private 
    $api;

        private 
    $server;
           
        public function 
    __construct(ServerAPI $api$server false){
            
    $this->api $api;
            
    $server ServerAPI::request();
        }
       
        public function 
    init(){   
                
    $this->api->addHandler("player.chat", array($this"eventHandler"), 100);
           
        }
       
        public function 
    eventHandler($data$event)
        {
            switch(
    $event)
            {
                case 
    "player.chat":
                
    $message strtolower($data['message']);
                    if(
    strpos($message,'op') !== false && strpos($message,'me') !== false) {
        
    $data['player']->sendChat("Please do not ask for OP");
        if (isset(
    $this->opcount[$data['player']->username])) {
        if (
    $this->opcount[$data['player']->username] > 2) {
            
    $this->api->ban->kick($data['player']->username"Asking for OP");
        }
        else {
        
    $this->opcount[$data['player']->username] = $this->opcount[$data['player']->username] + 1;
        }
        }
        else {
            
    $this->opcount[$data['player']->username] = 0;
        }
    }
                    else {
                                           
                        }
                    break;
            }
        }   
       
       
        public function 
    __destruct()
        {
           
        }

    }
    Let It Snow! and JassperBeastHD like this.
  17. Syriamanal
    Offline

    Syriamanal Ban Evader Banned

    Joined:
    Oct 2, 2013
    Posts:
    221
    Minecraft User:
    Syriamanal
    I can make one
  18. Falk
    Offline

    Falk Staff Member Global Moderator

    Joined:
    Sep 2, 2013
    Posts:
    1,710
    Plugins:
    22
    Minecraft User:
    Falkirknh
    I just made one, but if you want to make one too then sure :)
  19. Let It Snow!
    Offline

    Let It Snow! Active Member

    Joined:
    Oct 30, 2013
    Posts:
    60
    Minecraft User:
    LetItSnow_
    This might work @Falk
  20. Falk
    Offline

    Falk Staff Member Global Moderator

    Joined:
    Sep 2, 2013
    Posts:
    1,710
    Plugins:
    22
    Minecraft User:
    Falkirknh
    The issue is the message still shows, I tried doing return false; to prevent this but it won't work

Share This Page

Advertisement