Package net.raidstone.wgevents
Class WorldGuardEvents
java.lang.Object
org.bukkit.plugin.PluginBase
org.bukkit.plugin.java.JavaPlugin
net.raidstone.wgevents.WorldGuardEvents
- All Implemented Interfaces:
org.bukkit.command.CommandExecutor,org.bukkit.command.TabCompleter,org.bukkit.command.TabExecutor,org.bukkit.event.Listener,org.bukkit.plugin.Plugin
public class WorldGuardEvents
extends org.bukkit.plugin.java.JavaPlugin
implements org.bukkit.event.Listener
- Since:
- 2/24/19
- Author:
- Weby & Anrza (info@raidstone.net)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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 booleanisPlayerInAllRegions(UUID playerUUID, String... regionName)Checks whether a player is in one or several regionsstatic booleanisPlayerInAllRegions(UUID playerUUID, Set<String> regionNames)Checks whether a player is in one or several regionsstatic booleanisPlayerInAnyRegion(UUID playerUUID, String... regionName)Checks whether a player is in one or several regionsstatic booleanisPlayerInAnyRegion(UUID playerUUID, Set<String> regionNames)Checks whether a player is in one or several regionsvoidvoidonEnable()Methods inherited from class org.bukkit.plugin.java.JavaPlugin
getClassLoader, getCommand, getConfig, getDataFolder, getDefaultWorldGenerator, getDescription, getFile, getLogger, getPlugin, getPluginLoader, getProvidingPlugin, getResource, getServer, getTextResource, isEnabled, isNaggable, onCommand, onLoad, onTabComplete, reloadConfig, saveConfig, saveDefaultConfig, saveResource, setEnabled, setNaggable, toStringMethods inherited from class org.bukkit.plugin.PluginBase
equals, getName, hashCode
-
Constructor Details
-
WorldGuardEvents
public WorldGuardEvents()
-
-
Method Details
-
onEnable
public void onEnable()- Specified by:
onEnablein interfaceorg.bukkit.plugin.Plugin- Overrides:
onEnablein classorg.bukkit.plugin.java.JavaPlugin
-
onDisable
public void onDisable()- Specified by:
onDisablein interfaceorg.bukkit.plugin.Plugin- Overrides:
onDisablein classorg.bukkit.plugin.java.JavaPlugin
-
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).
-