Package net.raidstone.wgevents
Class WorldGuardEvents
java.lang.Object
net.raidstone.wgevents.WorldGuardEvents
- All Implemented Interfaces:
org.bukkit.event.Listener
- Since:
- 2/24/19
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
enable
(org.bukkit.plugin.java.JavaPlugin plugin) static Set
<com.sk89q.worldguard.protection.regions.ProtectedRegion> getRegions
(UUID playerUUID) Gets the regions a player is currently in.getRegionsNames
(UUID playerUUID) Gets the regions names a player is currently in.static boolean
isPlayerInAllRegions
(UUID playerUUID, String... regionName) Checks whether a player is in one or several regionsstatic boolean
isPlayerInAllRegions
(UUID playerUUID, Set<String> regionNames) Checks whether a player is in one or several regionsstatic boolean
isPlayerInAnyRegion
(UUID playerUUID, String... regionName) Checks whether a player is in one or several regionsstatic boolean
isPlayerInAnyRegion
(UUID playerUUID, Set<String> regionNames) Checks whether a player is in one or several regionsvoid
onDisable
(org.bukkit.event.server.PluginDisableEvent event)
-
Constructor Details
-
WorldGuardEvents
public WorldGuardEvents()
-
-
Method Details
-
enable
public void enable(org.bukkit.plugin.java.JavaPlugin plugin) -
onDisable
public void onDisable(org.bukkit.event.server.PluginDisableEvent event) -
getRegions
@Nonnull public static Set<com.sk89q.worldguard.protection.regions.ProtectedRegion> getRegions(UUID playerUUID) Gets the regions a player is currently in.- Parameters:
playerUUID
- UUID of the player in question.- Returns:
- Set of WorldGuard protected regions that the player is currently in.
-
getRegionsNames
Gets the regions names a player is currently in.- Parameters:
playerUUID
- UUID of the player in question.- Returns:
- Set of Strings with the names of the regions the player is currently in.
-
isPlayerInAllRegions
Checks whether a player is in one or several regions- Parameters:
playerUUID
- UUID of the player in question.regionNames
- Set of regions to check.- Returns:
- True if the player is in (all) the named region(s).
-
isPlayerInAnyRegion
Checks whether a player is in one or several regions- Parameters:
playerUUID
- UUID of the player in question.regionNames
- Set of regions to check.- Returns:
- True if the player is in (any of) the named region(s).
-
isPlayerInAnyRegion
Checks whether a player is in one or several regions- Parameters:
playerUUID
- UUID of the player in question.regionName
- List of regions to check.- Returns:
- True if the player is in (any of) the named region(s).
-
isPlayerInAllRegions
Checks whether a player is in one or several regions- Parameters:
playerUUID
- UUID of the player in question.regionName
- List of regions to check.- Returns:
- True if the player is in (any of) the named region(s).
-