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

Blocking Movement

Comments in 'Plugin Development' started by Falk, Nov 3, 2013.

  1. Falk
    Offline

    Falk Staff Member Global Moderator

    Joined:
    Sep 2, 2013
    Posts:
    1,706
    Plugins:
    22
    Minecraft User:
    Falkirknh
    How does one block movement on player.connect or player.spawn? Like what SimpleAuth does.
  2. SuperChipsLP
    Offline

    SuperChipsLP Active Member Plugin Developer

    Joined:
    Sep 15, 2013
    Posts:
    204
    Plugins:
    5
    Minecraft User:
    Redmol
    Try this :)

    PHP:
    foreach($this->api->player->getAll() as $p)
            {
    $p->blocked true;
            }
  3. wies
    Offline

    wies Notable Member

    Joined:
    Aug 23, 2013
    Posts:
    390
    Yes, just get the player object and set the variable "blocked" to true, but this will also block other actions like block placement and item usage, ...
  4. Falk
    Offline

    Falk Staff Member Global Moderator

    Joined:
    Sep 2, 2013
    Posts:
    1,706
    Plugins:
    22
    Minecraft User:
    Falkirknh
    Okay that sounds pretty easy

Share This Page

Advertisement