public class InstanceManager
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private static WauzCore |
core
A direct reference to the main class.
|
| Constructor and Description |
|---|
InstanceManager() |
| Modifier and Type | Method and Description |
|---|---|
static void |
closeInstance(org.bukkit.World world)
Unloads the world of an instance and deletes the folder.
|
private static void |
createSpawnCircle(org.bukkit.World world,
org.bukkit.Location location)
Creates a circle out of obsidian and glowstone at the given location.
|
static boolean |
enter(org.bukkit.entity.Player player,
java.lang.String instanceName)
Creates an instance for the given player.
|
static void |
enterArcade(org.bukkit.entity.Player player)
Lets the player enter the arcade lobby.
|
static void |
enterGuild(org.bukkit.entity.Player player)
Lets the player enter their guildhall.
|
static void |
enterSurvival(org.bukkit.entity.Player player,
java.lang.String instanceName)
Creates an instance for the given player.
|
private static void |
openInstance(java.io.File source,
java.io.File target)
Creates a new instance from a template.
|
private static void |
placeExitSign(org.bukkit.block.Block block,
org.bukkit.block.BlockFace blockFace)
Places a exit sign on the given block.
|
static void |
removeInactiveInstances()
Removes all instance folders.
|
private static WauzCore core
public static boolean enter(org.bukkit.entity.Player player,
java.lang.String instanceName)
player - The player who opened the instance.instanceName - The name of the instance.openInstance(File, File)public static void enterGuild(org.bukkit.entity.Player player)
player - The player who opened the instance.openInstance(File, File)public static void enterArcade(org.bukkit.entity.Player player)
player - The player who opened the instance.openInstance(File, File)public static void enterSurvival(org.bukkit.entity.Player player,
java.lang.String instanceName)
player - The player who opened the instance.instanceName - The name of the instance.createSpawnCircle(World, Location)private static void createSpawnCircle(org.bukkit.World world,
org.bukkit.Location location)
world - The world on which the circle should be created.location - The center location of the circle.placeExitSign(Block, BlockFace)private static void placeExitSign(org.bukkit.block.Block block,
org.bukkit.block.BlockFace blockFace)
block - The block where the sign should be placed.blockFace - The direction thr sign should face.private static void openInstance(java.io.File source,
java.io.File target)
source - The instance template.target - The new instance folder.public static void closeInstance(org.bukkit.World world)
world - The instance world.WauzActiveInstancePool.unregisterInstance(String),
WauzFileUtils.removeFilesRecursive(File)public static void removeInactiveInstances()