Class WorldGuardEvents

java.lang.Object
net.raidstone.wgevents.WorldGuardEvents
All Implemented Interfaces:
org.bukkit.event.Listener

public class WorldGuardEvents extends Object implements org.bukkit.event.Listener
Since:
2/24/19
  • 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

      @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).