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

Let player move head

Comments in 'Plugin Development' started by xBeastMode, Jan 20, 2016.

Thread Status:
Not open for further replies.
  1. xBeastMode
    Offline

    xBeastMode Active Member

    Joined:
    Nov 27, 2015
    Posts:
    292
    How to let a player turn their head around but not walk?
  2. MichaelM04
    Offline

    MichaelM04 Active Member Plugin Developer

    Joined:
    Nov 12, 2015
    Posts:
    213
    Plugins:
    1
    Minecraft User:
    Michael
    I don't think this is possible in mcpe when you turn it still considers it player move event
  3. xBeastMode
    Offline

    xBeastMode Active Member

    Joined:
    Nov 27, 2015
    Posts:
    292
    Have to played LBSG? You can move your head around but it doesn't let you walk.
  4. MichaelM04
    Offline

    MichaelM04 Active Member Plugin Developer

    Joined:
    Nov 12, 2015
    Posts:
    213
    Plugins:
    1
    Minecraft User:
    Michael
    maybe if you freeze player but allow current block there standing on to allow movement (BTW lbsg is just spam and garbage the entire time your playing not even worth it)
  5. Hittmana
    Offline

    Hittmana Active Member

    Joined:
    Jul 26, 2015
    Posts:
    224
    Minecraft User:
    move_it
    Obviously you can do it, have you seen HereAuth by McpeMapModder.
  6. MichaelM04
    Offline

    MichaelM04 Active Member Plugin Developer

    Joined:
    Nov 12, 2015
    Posts:
    213
    Plugins:
    1
    Minecraft User:
    Michael
    if that's true maybe take a look at the source code for hereauth
  7. Hittmana
    Offline

    Hittmana Active Member

    Joined:
    Jul 26, 2015
    Posts:
    224
    Minecraft User:
    move_it
    Yeah, or ask McpeMapModder for help on this
  8. MichaelM04
    Offline

    MichaelM04 Active Member Plugin Developer

    Joined:
    Nov 12, 2015
    Posts:
    213
    Plugins:
    1
    Minecraft User:
    Michael
    you mean @PEMapModder ?
  9. jojoe77777
    Offline

    jojoe77777 Notable Member Plugin Developer

    Joined:
    May 28, 2015
    Posts:
    653
    Plugins:
    1
    Minecraft User:
    jojoe77777
    https://forums.pocketmine.net/threads/player-can-move-a-little-code.12124/#post-122486
    PHP:
    public function onPlayerMove(\pocketmine\event\player\PlayerMoveEvent $ev){
        
    $from $event->getFrom();
        
    $to $event->getTo();
        if(
    $from->!== $to->or $from->!== $to->or $from->!== $to->z$ev->setCancelled();
    }
    Skullex, applqpak and wolfdale like this.
  10. MichaelM04
    Offline

    MichaelM04 Active Member Plugin Developer

    Joined:
    Nov 12, 2015
    Posts:
    213
    Plugins:
    1
    Minecraft User:
    Michael
    applqpak likes this.
  11. MichaelM04
    Offline

    MichaelM04 Active Member Plugin Developer

    Joined:
    Nov 12, 2015
    Posts:
    213
    Plugins:
    1
    Minecraft User:
    Michael
    Oh a little too late :p
    applqpak likes this.
  12. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    *facepalm*
    The server knows where the player is.
    The server knows what direction the player is locating at (yaw&pitch).
    The server can teleport a player.
    The server can change a player's orientation (yaw&pitch) by a method like teleportation.
    So, how would it probably be impossible to disallow it?
    Please don't reply if you don't even have an idea what is meant by "possible".

    https://github.com/PEMapModder/HereAuth/blob/master/src/HereAuth/EventRouter.php#L205
    The if block about Locomotion checks if the player has moved in position, regardless of the orientation.
    The if block about Rotation checks if the player has moved in orientation, regardless of position
    Skullex likes this.
  13. Skullex
    Offline

    Skullex Active Member

    Joined:
    Nov 14, 2015
    Posts:
    212
    Minecraft User:
    Skullex
    Nice plugin btw
  14. MichaelM04
    Offline

    MichaelM04 Active Member Plugin Developer

    Joined:
    Nov 12, 2015
    Posts:
    213
    Plugins:
    1
    Minecraft User:
    Michael
    xBeastMode likes this.
  15. xBeastMode
    Offline

    xBeastMode Active Member

    Joined:
    Nov 27, 2015
    Posts:
    292
  16. Hittmana
    Offline

    Hittmana Active Member

    Joined:
    Jul 26, 2015
    Posts:
    224
    Minecraft User:
    move_it
Thread Status:
Not open for further replies.

Share This Page

Advertisement