1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Speed in my server

Discussion in 'Development' started by DanielYTK, Jan 31, 2017.

  1. DanielYTK

    DanielYTK Zombie

    Messages:
    227
    If a player has no effect, and if the player is faster than normal, how can I kick that player off my server?
     
  2. XFizzer

    XFizzer Spider

    Messages:
    13
    GitHub:
    xfizzer
    /kick or /ban
     
  3. robske_110 (Tim)

    robske_110 (Tim) Wither Skeleton Poggit Reviewer

    Messages:
    1,342
    GitHub:
    robske110
    PM's anti-speed-hack is broken :eek:
    You might just want to check the distance a player moved in a tick and if it's too high, revert the movement or kick him.
     
  4. DanielYTK

    DanielYTK Zombie

    Messages:
    227
    Ok, and how do this?
     
  5. DanielYTK

    DanielYTK Zombie

    Messages:
    227
    hello???
     
  6. Dog2puppy

    Dog2puppy Slime

    Messages:
    94
    GitHub:
    colesquared
    Use the PlayerMoveEvent and you can use $event->setCancelled() to revert it.
     
  7. DanielYTK

    DanielYTK Zombie

    Messages:
    227
    I'm asking: How to check distance and speed in 1 tick?
     
  8. AnkitM252

    AnkitM252 Spider Jockey

    Messages:
    29
    GitHub:
    AnkitM252
  9. DanielYTK

    DanielYTK Zombie

    Messages:
    227
  10. AnkitM252

    AnkitM252 Spider Jockey

    Messages:
    29
    GitHub:
    AnkitM252
    No problem
     
  11. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    i think using a task is better like repeating task
     
  12. DanielYTK

    DanielYTK Zombie

    Messages:
    227
    I am new to php, I do not know how to create a repeating task '-'
     
  13. corytortoise

    corytortoise Skeleton

    Messages:
    825
    GitHub:
    corytortoise
    You really don't even need too much PHP knowledge for tasks, if you know the basics. You can check out this thread by @Jack Noordhuis even though it mostly pertains to timers, or you can check out http://learn-mc.ga/MCPE/#Vol4 for a quick Task tutorial. And of course, check out src/pocketmine/scheduler/PluginTask(I think this is the right file path...).
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.