public interface SuperiorPlayer extends IMissionsHolder, IPersistentDataHolder, IDatabaseBridgeHolder
Modifier and Type | Method and Description |
---|---|
org.bukkit.OfflinePlayer |
asOfflinePlayer()
Get the offline-player object.
|
org.bukkit.entity.Player |
asPlayer()
Get the player object.
|
HitActionResult |
canHit(SuperiorPlayer otherPlayer)
Check whether or not this player can hit another player.
|
BorderColor |
getBorderColor()
Get the border color of the player.
|
int |
getDisbands()
Get the amount of left disbands.
|
Island |
getIsland()
Get the island of the player.
|
SuperiorPlayer |
getIslandLeader()
Get the island owner of the player's island.
|
long |
getLastTimeStatus()
Get the last time player joined or left the server.
|
org.bukkit.Location |
getLocation()
Get the location of the player.
|
java.lang.String |
getName()
Get the last known name of the player.
|
PlayerRole |
getPlayerRole()
Get the role of the player.
|
BlockPosition |
getSchematicPos1()
Get the first schematic position of the player.
|
BlockPosition |
getSchematicPos2()
Get the second schematic position of the player.
|
org.bukkit.scheduler.BukkitTask |
getTeleportTask()
Get the current active teleport task of the player.
|
java.lang.String |
getTextureValue()
Get the last known skin-texture value of the player.
|
java.util.UUID |
getUniqueId()
Get the UUID of the player.
|
java.util.Locale |
getUserLocale()
Get the locale of the player.
|
org.bukkit.World |
getWorld()
Get the world that the player is inside.
|
boolean |
hasAdminSpyEnabled()
Check whether or not the player has admin spy mode enabled.
|
boolean |
hasBlocksStackerEnabled()
Check whether or not the blocks stacker mode is enabled for the player.
|
boolean |
hasBypassModeEnabled()
Check whether or not the bypass mode is enabled for the player.
|
boolean |
hasDisbands()
Check whether or not the player has more disbands.
|
boolean |
hasFlyGamemode()
Check whether or not this player is in a gamemode with fly mode enabled.
|
boolean |
hasIsland()
Check if this player is a member of an island.
|
boolean |
hasIslandFlyEnabled()
Set whether or not the player has flying enabled.
|
boolean |
hasPermission(IslandPrivilege permission)
Check whether or not the player has a permission on his island.
|
boolean |
hasPermission(java.lang.String permission)
Check whether or not the player has a permission.
|
boolean |
hasPermissionWithoutOP(java.lang.String permission)
Check whether or not the player has a permission without having op.
|
boolean |
hasSchematicModeEnabled()
Check whether or not the schematic mode is enabled for the player.
|
boolean |
hasTeamChatEnabled()
Check whether or not the team chat is enabled for the player.
|
boolean |
hasToggledPanel()
Check whether or not the player has their panel toggled.
|
boolean |
hasWorldBorderEnabled()
Check whether or not the world border is enabled for the player.
|
boolean |
isAFK()
Check whether or not the player is AFK.
|
boolean |
isImmunedToPortals()
Whether the player is immuned to portals or not.
|
boolean |
isImmunedToPvP()
Whether the player is immuned to PvP or not.
|
boolean |
isInsideIsland()
Check whether or not the player is inside their island.
|
boolean |
isLeavingFlag()
Whether the player has just left an island's area or not.
|
boolean |
isOnline()
Check whether or not the player is online.
|
boolean |
isShownAsOnline()
Checks whether the player is shown as online.
|
boolean |
isVanished()
Check whether or not the player is vanished.
|
void |
merge(SuperiorPlayer otherPlayer)
Merge another player into this object.
|
void |
runIfOnline(java.util.function.Consumer<org.bukkit.entity.Player> toRun)
Execute code only if the player is online.
|
void |
setBorderColor(BorderColor borderColor)
Set the border color for the player.
|
void |
setDisbands(int disbands)
Check whether or not the player has a permission.
|
void |
setImmunedToPortals(boolean immuneToPortals)
Set whether or not the player is immuned to portals.
|
void |
setImmunedToPvP(boolean immunedToPvP)
Set immunity to PvP for this player.
|
void |
setIsland(Island island)
Set the island of the player.
|
void |
setIslandLeader(SuperiorPlayer islandLeader)
Deprecated.
|
void |
setLeavingFlag(boolean leavingFlag)
Set whether or not the player has just left an island's area.
|
void |
setPlayerRole(PlayerRole playerRole)
Set the role of the player.
|
void |
setSchematicPos1(org.bukkit.block.Block block)
Set the first schematic position of the player.
|
void |
setSchematicPos2(org.bukkit.block.Block block)
Set the second schematic position of the player.
|
void |
setTeleportTask(org.bukkit.scheduler.BukkitTask teleportTask)
Set a teleportation task for the player.
|
void |
setTextureValue(java.lang.String textureValue)
Set the skin-texture value for the player.
|
void |
setToggledPanel(boolean toggledPanel)
Set whether or not the player has their panel toggled.
|
void |
setUserLocale(java.util.Locale locale)
Set the locale of the player.
|
void |
teleport(Island island)
Teleport the player to an island.
|
void |
teleport(Island island,
java.util.function.Consumer<java.lang.Boolean> teleportResult)
Teleport the player to an island.
|
void |
teleport(Island island,
org.bukkit.World.Environment environment)
Teleport the player to an island.
|
void |
teleport(Island island,
org.bukkit.World.Environment environment,
java.util.function.Consumer<java.lang.Boolean> teleportResult)
Teleport the player to an island.
|
void |
teleport(org.bukkit.Location location)
Teleport the player to a location.
|
void |
teleport(org.bukkit.Location location,
java.util.function.Consumer<java.lang.Boolean> teleportResult)
Teleport the player to a location.
|
void |
toggleAdminSpy()
Toggle admin spy mode.
|
void |
toggleBlocksStacker()
Toggle the blocks stacker for the player.
|
void |
toggleBypassMode()
Toggle the bypass mode for the player.
|
void |
toggleIslandFly()
Toggle flying mode.
|
void |
toggleSchematicMode()
Toggle the schematic mode for the player.
|
void |
toggleTeamChat()
Toggle the team chat for the player.
|
void |
toggleWorldBorder()
Toggle the world border for the player.
|
void |
updateLastTimeStatus()
Update the last time player joined or left the server.
|
void |
updateName()
Update the cached name with the current player's name.
|
void |
updateWorldBorder(Island island)
Update world border for this player.
|
canCompleteMissionAgain, completeMission, getAmountMissionCompleted, getCompletedMissions, getCompletedMissionsWithAmounts, hasCompletedMission, resetMission
getPersistentDataContainer
getDatabaseBridge
java.util.UUID getUniqueId()
java.lang.String getName()
java.lang.String getTextureValue()
void setTextureValue(java.lang.String textureValue)
textureValue
- The skin texture.void updateLastTimeStatus()
long getLastTimeStatus()
void updateName()
@Nullable org.bukkit.entity.Player asPlayer()
@Nullable org.bukkit.OfflinePlayer asOfflinePlayer()
boolean isOnline()
void runIfOnline(java.util.function.Consumer<org.bukkit.entity.Player> toRun)
boolean hasFlyGamemode()
boolean isAFK()
boolean isVanished()
boolean isShownAsOnline()
boolean hasPermission(java.lang.String permission)
boolean hasPermissionWithoutOP(java.lang.String permission)
boolean hasPermission(IslandPrivilege permission)
HitActionResult canHit(SuperiorPlayer otherPlayer)
Players cannot hit each other if one of the followings is true: 1) They are inside an island that has pvp disabled. 2) One of them has pvp warm-up. 3) They are both in the same island, and they hit each other outside of a pvp world. 4) One of the players isn't online (duh?) 5) The target player is inside an island as a visitor and can't take damage. 6) The target player is inside an island as a coop and can't take damage.
otherPlayer
- The other player to check.@Nullable org.bukkit.World getWorld()
@Nullable org.bukkit.Location getLocation()
void teleport(org.bukkit.Location location)
location
- The location to teleport the player to.void teleport(org.bukkit.Location location, @Nullable java.util.function.Consumer<java.lang.Boolean> teleportResult)
location
- The location to teleport the player to.teleportResult
- The result of the teleportation process.void teleport(Island island)
island
- The island to teleport the player to.void teleport(Island island, org.bukkit.World.Environment environment)
island
- The island to teleport the player to.environment
- The environment to teleport the player to.void teleport(Island island, @Nullable java.util.function.Consumer<java.lang.Boolean> teleportResult)
island
- The island to teleport the player to.teleportResult
- Consumer that will be ran when task is finished.void teleport(Island island, org.bukkit.World.Environment environment, @Nullable java.util.function.Consumer<java.lang.Boolean> teleportResult)
island
- The island to teleport the player to.environment
- The environment to teleport the player to.teleportResult
- Consumer that will be ran when task is finished.boolean isInsideIsland()
SuperiorPlayer getIslandLeader()
@Deprecated void setIslandLeader(SuperiorPlayer islandLeader)
setIsland(Island)
islandLeader
- The island owner's player.@Nullable Island getIsland()
void setIsland(Island island)
island
- The island to set the player to.java.lang.IllegalArgumentException
- if island doesn't contain player as a member.boolean hasIsland()
PlayerRole getPlayerRole()
void setPlayerRole(PlayerRole playerRole)
playerRole
- The role to give the player.int getDisbands()
void setDisbands(int disbands)
boolean hasDisbands()
java.util.Locale getUserLocale()
void setUserLocale(java.util.Locale locale)
locale
- The locale to set.boolean hasWorldBorderEnabled()
void toggleWorldBorder()
void updateWorldBorder(@Nullable Island island)
island
- The island the player should see the border of.boolean hasBlocksStackerEnabled()
void toggleBlocksStacker()
boolean hasSchematicModeEnabled()
void toggleSchematicMode()
boolean hasTeamChatEnabled()
void toggleTeamChat()
boolean hasBypassModeEnabled()
void toggleBypassMode()
boolean hasToggledPanel()
void setToggledPanel(boolean toggledPanel)
boolean hasIslandFlyEnabled()
void toggleIslandFly()
boolean hasAdminSpyEnabled()
void toggleAdminSpy()
BorderColor getBorderColor()
void setBorderColor(BorderColor borderColor)
borderColor
- The color to set.BlockPosition getSchematicPos1()
void setSchematicPos1(@Nullable org.bukkit.block.Block block)
block
- The block to change the position to.BlockPosition getSchematicPos2()
void setSchematicPos2(@Nullable org.bukkit.block.Block block)
block
- The block to change the position to.boolean isImmunedToPvP()
void setImmunedToPvP(boolean immunedToPvP)
immunedToPvP
- Whether or not the player should be immuned to PvP.boolean isLeavingFlag()
void setLeavingFlag(boolean leavingFlag)
leavingFlag
- Whether or not the island has left an island's area.@Nullable org.bukkit.scheduler.BukkitTask getTeleportTask()
void setTeleportTask(@Nullable org.bukkit.scheduler.BukkitTask teleportTask)
teleportTask
- The teleport task to set.boolean isImmunedToPortals()
void setImmunedToPortals(boolean immuneToPortals)
immuneToPortals
- Whether the player should be immuned or not.void merge(SuperiorPlayer otherPlayer)