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

Solved Trouble with gamemode change plugin (Anti-Ghost mod)

Comments in 'Plugin Development' started by Survingo, Mar 16, 2016.

  1. Survingo
    Offline

    Survingo Active Member

    Joined:
    Dec 6, 2015
    Posts:
    221
    Hello all! :)
    I successfully coded an plugin versus the gamemode-changing-griefers.
    My plugin got an simple repeating task and gamemode change task.
    It's not an problem with my plugin, everything works fine with /gamemode change, but it doesn't detect this ghost mod or else.
    Anyone have an idea to detect non-pocketmine changed gamemodes?
    Last edited: Mar 16, 2016
  2. CookieSteve
    Offline

    CookieSteve Active Member

    Joined:
    Apr 22, 2014
    Posts:
    132
    Minecraft User:
    iStrqfeChris
    Changing GameMode using Ghost Hack only changes the gamemode Client side According to the Server they are still in Survival and they wont be able to do any Creative Actions Server Side Except Fly ( I think )
    Legoboy0215, applqpak and Survingo like this.
  3. Survingo
    Offline

    Survingo Active Member

    Joined:
    Dec 6, 2015
    Posts:
    221
    Yeah, you're right. They can't fly long time.
    But it's enough to get i.e. on other islands on skywars and digging fast.

    Hypixel got such a thing in their core.
    Trying to change gamemode via mods will result in an kick
  4. CookieSteve
    Offline

    CookieSteve Active Member

    Joined:
    Apr 22, 2014
    Posts:
    132
    Minecraft User:
    iStrqfeChris
    Maybe if u detect if they're flying you try to teleport them back
    applqpak, ImagicalGamer and Survingo like this.
  5. Survingo
    Offline

    Survingo Active Member

    Joined:
    Dec 6, 2015
    Posts:
    221
    The problem is they don't fly; PM doesn't recognize that, cause it's changed in-app hm
  6. CraftYourBukkit
    Offline

    CraftYourBukkit Notable Member Plugin Developer

    Joined:
    Jan 20, 2015
    Posts:
    1,022
    Plugins:
    2
    Minecraft User:
    CraftYourBukkit
    Yes it does, otherwise pocketmine wouldn't recognize the player on the other island either.
    Survingo likes this.
  7. Hotshot_9930
    Offline

    Hotshot_9930 Notable Member Plugin Developer

    Joined:
    May 26, 2014
    Posts:
    665
    Plugins:
    2
    Minecraft User:
    HotshotHD
    Instead of trying to detect WHEN they switch gamemodes. Make the plugin detect if they are flying and kick them. I have submitted a plugin that does this, it's awaiting approval.
  8. Legoboy0215
    Offline

    Legoboy0215 Notable Member

    Joined:
    Nov 1, 2014
    Posts:
    1,724
    Minecraft User:
    Legoboy0215
    Jump? Fall?
  9. Thunder33345
    Offline

    Thunder33345 Notable Member

    Joined:
    Apr 3, 2014
    Posts:
    755
    Minecraft User:
    Thunder33345
    something like this helps?

    (credit: not me)
    public function PlayerMove(PlayerMoveEvent $event){
    $player = $event->getPlayer();
    $name = $player->getName();
    if(round($event->getTo()->getY() - $event->getFrom()->getY(),3) == 0.375) {
    $this->players[$name] ++;
    }else{
    $this->players[$name] = 0;
    }
    if($this->players[$name] === 3){
    //do stuff
    }
    }
  10. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    It is usually not that exact.
  11. Survingo
    Offline

    Survingo Active Member

    Joined:
    Dec 6, 2015
    Posts:
    221
    Well, I use now the floor x, y, z under the player and if it is to high... ->kick ;)
  12. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    What if player is using special ability, jumping, on ladder, falling or just flying in Creative mode? You should perform standart checks although this could slowdown server (atleast on PHP 5.6) if you do it on PlayerMoveEvent
    Survingo and MichaelM04 like this.
  13. Survingo
    Offline

    Survingo Active Member

    Joined:
    Dec 6, 2015
    Posts:
    221
    By the way I already added that...
    Primus likes this.

Share This Page

Advertisement