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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static Set<com.sk89q.worldguard.protection.regions.ProtectedRegion>
    getRegions​(UUID playerUUID)
    Gets the regions a player is currently in.
    static Set<String>
    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 regions
    static boolean
    isPlayerInAllRegions​(UUID playerUUID, Set<String> regionNames)
    Checks whether a player is in one or several regions
    static boolean
    isPlayerInAnyRegion​(UUID playerUUID, String... regionName)
    Checks whether a player is in one or several regions
    static boolean
    isPlayerInAnyRegion​(UUID playerUUID, Set<String> regionNames)
    Checks whether a player is in one or several regions
    void
     
    void
     

    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, toString

    Methods inherited from class org.bukkit.plugin.PluginBase

    equals, getName, hashCode

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • WorldGuardEvents

      public WorldGuardEvents()
  • Method Details

    • onEnable

      public void onEnable()
      Specified by:
      onEnable in interface org.bukkit.plugin.Plugin
      Overrides:
      onEnable in class org.bukkit.plugin.java.JavaPlugin
    • onDisable

      public void onDisable()
      Specified by:
      onDisable in interface org.bukkit.plugin.Plugin
      Overrides:
      onDisable in class org.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

      @Nonnull public static Set<String> getRegionsNames(UUID playerUUID)
      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

      public static boolean isPlayerInAllRegions(UUID playerUUID, Set<String> regionNames)
      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

      public static boolean isPlayerInAnyRegion(UUID playerUUID, Set<String> regionNames)
      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

      public static boolean isPlayerInAnyRegion(UUID playerUUID, String... regionName)
      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

      public static boolean isPlayerInAllRegions(UUID playerUUID, String... regionName)
      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).