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

Player move

Comments in 'Plugin Development' started by Creeperface, Sep 25, 2015.

  1. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Right, then that's the trouble. Of course anti-fly is possible. You know, when even speech to text is possible, there is nothing that is impossible. But would you do the speech to text thing (assuming you can get audio from a plugin)? No, because that is too much trouble. Although anti-fly is much less trouble than speech to text, it is still a lot of trouble because you have many things to consider about.
  2. FlamingGenius
    Offline

    FlamingGenius Active Member

    Joined:
    Sep 23, 2015
    Posts:
    173
    Minecraft User:
    FlamingGenius
    Not something i would be interested in doing :p
  3. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    I want to disable kicking for fly but only that players can't fly i think some basic protection is not hard just when player fly 1 block above ground so i think i shoul create a task for this
    Legoboy0215 likes this.
  4. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
  5. FlamingGenius
    Offline

    FlamingGenius Active Member

    Joined:
    Sep 23, 2015
    Posts:
    173
    Minecraft User:
    FlamingGenius
    Why? I mean if flying is disabled on your server you have no worries xmod(mod tool used for "hacking" mcpe) doesnt work user can fly like half a second before busting thier ass
  6. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    But in PM 1.6 fly protection doesn't work
    Legoboy0215 likes this.
  7. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    And in bedwars it kicks you when you fall into void sometimes
  8. FlamingGenius
    Offline

    FlamingGenius Active Member

    Joined:
    Sep 23, 2015
    Posts:
    173
    Minecraft User:
    FlamingGenius
    Well as far as disabling kick goes
    PHP:
    public function onPlayerKick(PlayerKickEvent $event){
     
    $reason $this->getReason();
     if(
    $reason == "disconnectScreen"){
      
    $this->setCancelled();
     }
    }
    Replace "disconnectScreen" with actual disconnext screen
    You could also add for various screens elseif statements in multiplee cases
  9. FlamingGenius
    Offline

    FlamingGenius Active Member

    Joined:
    Sep 23, 2015
    Posts:
    173
    Minecraft User:
    FlamingGenius
    Srry i looked through the api coukdnt find the exact screen name :(
    Legoboy0215 likes this.
  10. Hotshot_9930
    Offline

    Hotshot_9930 Notable Member Plugin Developer

    Joined:
    May 26, 2014
    Posts:
    665
    Plugins:
    2
    Minecraft User:
    HotshotHD
    Its
    PHP:
     $event->setCancelled(true);
    Not $this->setCancelled();
  11. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    PHP:
    public function setCancelled($value true){
    if(!(
    $this instanceof Cancellable)){
    throw new \
    BadMethodCallException("Event is not Cancellable");
    }
    /** @var Event $this */
    $this->isCancelled = (bool) $value;
    }
  12. CraftYourBukkit
    Offline

    CraftYourBukkit Notable Member Plugin Developer

    Joined:
    Jan 20, 2015
    Posts:
    1,022
    Plugins:
    2
    Minecraft User:
    CraftYourBukkit
    true is the default value. But yea, it's $event instead of $this
    Last edited: Sep 28, 2015
  13. Legoboy0215
    Offline

    Legoboy0215 Notable Member

    Joined:
    Nov 1, 2014
    Posts:
    1,724
    Minecraft User:
    Legoboy0215
    It wasn't long ago.
  14. FlamingGenius
    Offline

    FlamingGenius Active Member

    Joined:
    Sep 23, 2015
    Posts:
    173
    Minecraft User:
    FlamingGenius
    Oops my bad i was thinking that when i typed it but i figured if i was wrong somebody would correct me :p
  15. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    It is like that since the first beta release. The false thing in the parent interface was due to a mistake, and it does not affect the real implementation. Having false as the default value was something so ancient that not even the first plugin for the 1.4 API was made.
    Legoboy0215 likes this.
  16. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    hm and if player gets knockback from another player so how can i check it in plugin?
  17. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Wow, you are so aggressive. I suppose that you are trying to do something beyond the edge of possibility.
  18. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    But it is not solution
  19. CrazedMiner
    Offline

    CrazedMiner Notable Member Plugin Developer

    Joined:
    Jan 31, 2015
    Posts:
    348
    Plugins:
    2
    Minecraft User:
    CrazedMinerYT
    Add the player to an array with the time() they were hit and check it before you punish them for flying.
  20. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    There are too many things to check. You simply can't.
    CrazedMiner likes this.

Share This Page

Advertisement