public PlayerModule
@NotNull java.util.List<org.bukkit.entity.Player> getLivingPlayers()
@NotNull java.util.List<org.bukkit.entity.Player> getDeadPlayers()
@Deprecated void getPlayersInside(@NotNull java.lang.String areaTag, @NotNull java.util.function.Consumer<java.util.List> callback)
Inspect which Players are inside the area.
void getPlayersInside(@NotNull CoordTag areaTag, @NotNull java.util.function.Consumer<java.util.List> callback)
Inspect which Players are inside the area.
boolean isOnline(@NotNull org.bukkit.entity.Player player)
Check if player
is playing this game.
player
void eliminate(@NotNull org.bukkit.entity.Player player)
Eliminate a player
out of game, consequently switching the player to spectator mode.
player
void disguiseAsPlayer(@NotNull org.bukkit.entity.Player player, @NotNull java.lang.String skinName, boolean selfVisible)
Disguise a player
to another Player.
This effectively changes the player's skin.
player
- Player who are going to disguise.skinName
- Account name of the new skin's owner.selfVisible
- If true, disguise is visible in self perspective.DependencyNotFound
- is thrown if LibsDisguises is not installed.player
void disguiseAsMob(@NotNull org.bukkit.entity.Player player, @NotNull org.bukkit.entity.EntityType type, boolean isAdult, boolean selfVisible)
Disguise a player
to a Mob.
player
- Player who are going to disguise.type
- Type of this Mob.isAdult
- Whether this Mob is an adult or a baby.selfVisible
- If true, disguise is visible in self perspective.DependencyNotFound
- is thrown if LibsDisguises is not installed.player
void disguiseAsBlock(@NotNull org.bukkit.entity.Player player, @NotNull org.bukkit.Material material, boolean selfVisible)
Disguise a player
to a FallingBlock.
player
- Player who are going to disguise.material
- Type of this block.selfVisible
- If true, disguise is visible in self perspective.DependencyNotFound
- is thrown if LibsDisguises is not installed.player
void disguiseAsCustomPreset(@NotNull org.bukkit.entity.Player player, @NotNull java.lang.String name, boolean selfVisible)
void undisguise(@NotNull org.bukkit.entity.Player player)
Stop disguise of this player
.
player
- Player who are going to stop disguise.DependencyNotFound
- is thrown if LibsDisguises is not installed.player
@Deprecated void setSpawnpoint(@NotNull PlayerType type, @NotNull java.lang.String spawnTag)
Set spawnpoint for the players associated in certain enum PlayerType
.
For team-based spawnpoint, see TeamModule.setSpawnpoint
.
type
- enum PlayerType
indicating whose spawnpoint it is.spawnTag
- Name of the coordinate tag which captures spawnpoints.IllegalArgumentException
- is thrown if spawnTag
is not in this game.enum PlayerType
,
TeamModule.setSpawnpoint
void setSpawnpoint(@NotNull PlayerType type, @NotNull CoordTag tag)
Set spawnpoint for the players associated in certain enum PlayerType
.
For team-based spawnpoint, see TeamModule.setSpawnpoint
.
type
- enum PlayerType
indicating whose spawnpoint it is.tag
- Coordinate tag which designates spawnpoint(s).IllegalArgumentException
- is raised if tag
mode is neither TagMode.SPAWN nor TagMode.AREA.enum PlayerType
,
TeamModule.setSpawnpoint
@Deprecated void overrideSpawnpoint(@NotNull org.bukkit.entity.Player player, @NotNull java.lang.String tagName, int index)
Set new spawnpoint for individual player.
Default spawnpoint becomes ineffective for that player
.
player
- The target player.tagName
- Name of the coordinate tag indicating spawnpoint.index
- (Optional) The capture index of that coordinate tag.This is randomly chosen if you to pass null.player
void overrideSpawnpoint(@NotNull org.bukkit.entity.Player player, @NotNull CoordTag tag, int index)
Set new spawnpoint for individual player.
Default spawnpoint becomes ineffective for that player
.
player
- The target player.tag
- Coordinate tag indicating spawnpoint.index
- (Optional) The capture index of that coordinate tag.This is randomly chosen if you to pass null.IllegalArgumentException
- is raised if tag
mode is neither TagMode.SPAWN nor TagMode.AREA.player
void overrideSpawnpoint(@NotNull org.bukkit.entity.Player player, @NotNull org.bukkit.Location location)
Set new spawnpoint for individual player.
Default spawnpoint becomes ineffective for that player
.
player
- The target player.location
- Location of new spawnpoint.player
void resetSpawnpoint(@NotNull org.bukkit.entity.Player player)
Reset individual spawnpoint back to default one.
In other words, it discards the spawnpoint
previously set for the player via overrideSpawnpoint
.
player
- The target player.overrideSpawnpoint