Class PlayerUtility
java.lang.Object
tfagaming.projects.minecraft.homestead.tools.minecraft.players.PlayerUtility
-
Field Summary
FieldsModifier and TypeFieldDescription -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetPlayerGroup(org.bukkit.OfflinePlayer player) static booleanhasControlRegionPermissionFlag(long regionId, org.bukkit.entity.Player player, long flag) static booleanhasPermissionFlag(long regionId, long subAreaId, org.bukkit.entity.Player player, long flag, boolean notify) static booleanhasPermissionFlag(long regionId, org.bukkit.entity.Player player, long flag, boolean notify) Checks whether the given player has the specified player flag in the target region.static booleanisOperator(org.bukkit.entity.Player player) static booleanisOperator(org.bukkit.OfflinePlayer player) static voidsendMessageRegionEnter(org.bukkit.entity.Player player, Placeholder placeholder) static voidsendMessageRegionExit(org.bukkit.entity.Player player, Placeholder placeholder) static voidteleportPlayer(org.bukkit.entity.Player player, org.bukkit.Location location) static voidteleportPlayerToChunk(org.bukkit.entity.Player player, org.bukkit.Chunk chunk) static voidteleportPlayerToChunkSafely(org.bukkit.entity.Player player, RegionChunk chunk, @Nullable Runnable after) Teleport a player to a chunk safely, thread-safe for Folia.
-
Field Details
-
RENT_FLAGS_SET
-
WAR_FLAGS_SET
-
-
Method Details
-
sendMessageRegionEnter
-
sendMessageRegionExit
-
teleportPlayerToChunkSafely
public static void teleportPlayerToChunkSafely(org.bukkit.entity.Player player, RegionChunk chunk, @Nullable @Nullable Runnable after) Teleport a player to a chunk safely, thread-safe for Folia. -
teleportPlayerToChunk
public static void teleportPlayerToChunk(org.bukkit.entity.Player player, org.bukkit.Chunk chunk) -
teleportPlayer
public static void teleportPlayer(org.bukkit.entity.Player player, org.bukkit.Location location) -
isOperator
public static boolean isOperator(org.bukkit.entity.Player player) -
isOperator
public static boolean isOperator(org.bukkit.OfflinePlayer player) -
hasPermissionFlag
public static boolean hasPermissionFlag(long regionId, org.bukkit.entity.Player player, long flag, boolean notify) Checks whether the given player has the specified player flag in the target region. If the player lacks the permission, a cooldown-gated info message is sent, except for theTAKE_FALL_DAMAGEflag where no message is shown.Resolution order:
1. If the player is the active renter of the region, permissions are granted for all flags exceptPVP.
2. Otherwise, if the player is a member, the member flags are used.
3. Otherwise, the region's global player flags are used.- Parameters:
regionId- The region IDplayer- The player to fetchflag- The PlayerFlags bit to fetch- Returns:
trueIf the action is allowed;falseotherwise
-
hasPermissionFlag
public static boolean hasPermissionFlag(long regionId, long subAreaId, org.bukkit.entity.Player player, long flag, boolean notify) -
hasControlRegionPermissionFlag
public static boolean hasControlRegionPermissionFlag(long regionId, org.bukkit.entity.Player player, long flag) -
getPlayerGroup
-