public class RollbackManager
extends java.lang.Object
Constructor and Description |
---|
RollbackManager(org.bukkit.plugin.java.JavaPlugin plugin)
Creates a new rollback manager for the specified plugin.
|
Modifier and Type | Method and Description |
---|---|
void |
checkRollbacks()
Rolls back arenas which have not been rolled back due to a crash or unclean shutdown.
|
org.bukkit.plugin.java.JavaPlugin |
getPlugin()
Retrieves the plugin associated with this rollback manager.
|
void |
logBlockChange(org.bukkit.block.Block block,
java.lang.String arena)
Logs a block change.
|
void |
logInventoryChange(org.bukkit.inventory.Inventory inventory,
org.bukkit.block.Block block,
java.lang.String arena)
Logs an inventory change.
|
void |
rollback(java.lang.String arena)
Rolls back the given arena.
|
public RollbackManager(org.bukkit.plugin.java.JavaPlugin plugin)
plugin
- the plugin to create the rollback manager forpublic org.bukkit.plugin.java.JavaPlugin getPlugin()
public void logBlockChange(org.bukkit.block.Block block, java.lang.String arena)
block
- the block which was changedarena
- the arena in which the block is containedpublic void logInventoryChange(org.bukkit.inventory.Inventory inventory, org.bukkit.block.Block block, java.lang.String arena)
inventory
- the inventory to logblock
- the block containing the inventoryarena
- the arena in which the block is containedpublic void rollback(java.lang.String arena)
This method should not be called from your plugin unless you understand the implications.
arena
- the arena to roll backpublic void checkRollbacks()