Simple Sit API

Simple Sit API

This is the Simple Sit API page here you will find all the methods that come with Simple Sit.

  • Don't know how to setup the Simple Sit API Click Here!

NOTE: only works in Simple Sit 1.3 and above

SimpleSit

  • isSitting(Player); returns true or false depending on if the player is sitting or not. Example
    Player p = player;
    if (SimpleSit.isSitting(p)) {
    // they are sitting
    } else {
    // player is not sitting
    }
    
  • seat(player) forces player to sit. Example
    SimpleSit.seat(player) // same as the player running /sit command
    

PlayerSitEvent

  • getMessage(); returns the message set in config when a player sits down.
  • setMessage("Your Text"); sets the message that is sent to the player when they sit down.
  • getPlayer(); returns the player that sat down.
  • getSeat(); returns the newly spawned seat.
  • hasCustomMessage() returns whether or not the message has been changed via code.

PlayerExitSeatEvent

  • getMessage(); returns the message set in config when a player sits down.
  • setMessage("Your Text"); sets the message that is sent to the player when they sit down.
  • getPlayer(); returns the player that sat down.
  • hasCustomMessage() returns whether or not the message has been changed via code.

Seat

  • remove(); removes seat.
  • getLocation(); returns the location of the seat.
  • setFroze(true/false) sets whether or not the seat will be affected by gravity.
  • isFroze(); returns whether or not the seat can be affected by gravity.
  • setVelocity(); allows you to set the velocity of the seat most affected when seats not froze.
  • getPassenger(); returns the player that is sitting on the seat.

Other

  • Still need help? comment below!

Comments

Posts Quoted:
Reply
Clear All Quotes