public interface SystemManager
Modifier and Type | Method and Description |
---|---|
void |
addSpawnCondition(SpawnCondition spawnCondition,
org.bukkit.entity.EntityType... entityTypes)
Add a spawn condition to entities.
|
void |
clearSpawnConditions(org.bukkit.entity.EntityType entityType)
Clear all the spawn conditions of an entity.
|
java.util.List<UnloadedStackedBarrel> |
getAllStackedBarrels()
Get all the stacked barrels on the server.
|
java.util.List<UnloadedStackedSpawner> |
getAllStackedSpawners()
Get all the stacked spawners on the server.
|
LootTable |
getLootTable(org.bukkit.entity.LivingEntity livingEntity)
Get a loot-table from a living-entity.
|
java.util.Optional<SpawnCondition> |
getSpawnCondition(java.lang.String id)
Get a spawn condition by it's id.
|
java.util.Collection<SpawnCondition> |
getSpawnConditions(org.bukkit.entity.EntityType entityType)
Get all the spawn conditions of an entity.
|
StackedBarrel |
getStackedBarrel(org.bukkit.block.Block block)
Get the stacked barrel object of a block.
|
StackedBarrel |
getStackedBarrel(org.bukkit.Location location)
Get the stacked barrel object of a block by location.
|
java.util.List<StackedBarrel> |
getStackedBarrels()
Get all the stacked barrels from cache.
|
java.util.List<StackedBarrel> |
getStackedBarrels(org.bukkit.Chunk chunk)
Get all the stacked barrels from cache in a chunk.
|
java.util.List<StackedBarrel> |
getStackedBarrels(org.bukkit.World world,
int chunkX,
int chunkZ)
Get all the stacked barrels from cache in a chunk.
|
java.util.List<StackedEntity> |
getStackedEntities()
Get all the stacked entities from cache.
|
StackedEntity |
getStackedEntity(org.bukkit.entity.LivingEntity livingEntity)
Get the stacked entity object of a living-entity.
|
StackedItem |
getStackedItem(org.bukkit.entity.Item item)
Get the stacked item object of an item.
|
java.util.List<StackedItem> |
getStackedItems()
Get all the stacked items from cache.
|
StackedSnapshot |
getStackedSnapshot(org.bukkit.Chunk chunk)
Get a stacked snapshot of a chunk.
|
StackedSnapshot |
getStackedSnapshot(org.bukkit.Chunk chunk,
boolean loadData)
Deprecated.
see getStackedSnapshot(Chunk chunk)
|
StackedSpawner |
getStackedSpawner(org.bukkit.block.CreatureSpawner spawner)
Get the stacked spawner object of a creature-spawner.
|
StackedSpawner |
getStackedSpawner(org.bukkit.Location location)
Get the stacked spawner object of a creature-spawner by location.
|
java.util.List<StackedSpawner> |
getStackedSpawners()
Get all the stacked spawners from cache.
|
java.util.List<StackedSpawner> |
getStackedSpawners(org.bukkit.Chunk chunk)
Get all the stacked spawners from cache in a chunk.
|
java.util.List<StackedSpawner> |
getStackedSpawners(org.bukkit.World world,
int chunkX,
int chunkZ)
Get all the stacked spawners from cache in a chunk.
|
boolean |
hasEntityNamesToggledOff(org.bukkit.entity.Player player)
Check whether or not a player has entity names toggled off.
|
boolean |
hasItemNamesToggledOff(org.bukkit.entity.Player player)
Check whether or not a player has item names toggled off.
|
boolean |
isStackedBarrel(org.bukkit.block.Block block)
Checks if a block is a stacked barrel.
|
boolean |
isStackedBarrel(org.bukkit.Location location)
Checks if a block is a stacked barrel.
|
boolean |
isStackedSpawner(org.bukkit.block.Block block)
Checks if a block is a stacked spawner.
|
boolean |
isStackedSpawner(org.bukkit.Location location)
Checks if a block is a stacked spawner.
|
void |
performCacheClear()
Performs a cache clear.
|
void |
performCacheSave()
Performs a cache save.
|
void |
performKillAll()
Perform a kill all.
|
void |
performKillAll(boolean applyTaskFilter)
Perform a kill all.
|
void |
performKillAll(java.util.function.Predicate<org.bukkit.entity.Entity> entityPredicate,
java.util.function.Predicate<org.bukkit.entity.Item> itemPredicate)
Perform a kill all.
|
void |
performKillAll(java.util.function.Predicate<org.bukkit.entity.Entity> entityPredicate,
java.util.function.Predicate<org.bukkit.entity.Item> itemPredicate,
boolean applyTaskFilter)
Perform a kill all.
|
SpawnCondition |
registerSpawnCondition(SpawnCondition spawnCondition)
Register a new spawn condition into the system.
|
void |
removeSpawnCondition(org.bukkit.entity.EntityType entityType,
SpawnCondition spawnCondition)
Remove a spawn condition from an entity.
|
void |
removeStackObject(StackedObject stackedObject)
Remove a stacked object from cache.
|
void |
spawnCorpse(StackedEntity stackedEntity)
Spawn a corpse for a stacked entity.
|
<T extends org.bukkit.entity.Entity> |
spawnEntityWithoutStacking(org.bukkit.Location location,
java.lang.Class<T> type)
Spawns a new entity without stacking it.
|
<T extends org.bukkit.entity.Entity> |
spawnEntityWithoutStacking(org.bukkit.Location location,
java.lang.Class<T> type,
org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason)
Deprecated.
see spawnEntityWithoutStacking(Location location, Class
|
<T extends org.bukkit.entity.Entity> |
spawnEntityWithoutStacking(org.bukkit.Location location,
java.lang.Class<T> type,
SpawnCause spawnCause)
Spawns a new entity without stacking it.
|
StackedItem |
spawnItemWithAmount(org.bukkit.Location location,
org.bukkit.inventory.ItemStack itemStack)
Drops an item with the amount of the item stack.
|
StackedItem |
spawnItemWithAmount(org.bukkit.Location location,
org.bukkit.inventory.ItemStack itemStack,
int amount)
Drops an item with a specific amount for the stack.
|
void |
toggleEntityNames(org.bukkit.entity.Player player)
Toggle entity names for a player.
|
void |
toggleItemNames(org.bukkit.entity.Player player)
Toggle item names for a player.
|
void |
updateLinkedEntity(org.bukkit.entity.LivingEntity livingEntity,
org.bukkit.entity.LivingEntity newLivingEntity)
Updates all spawners that the entity is linked into.
|
void removeStackObject(StackedObject stackedObject)
stackedObject
- the stacked objectStackedEntity getStackedEntity(org.bukkit.entity.LivingEntity livingEntity)
livingEntity
- The living-entityStackedItem getStackedItem(org.bukkit.entity.Item item)
item
- The itemStackedSpawner getStackedSpawner(org.bukkit.block.CreatureSpawner spawner)
spawner
- The creature-spawner.StackedSpawner getStackedSpawner(org.bukkit.Location location)
location
- The location of the creature-spawner.StackedBarrel getStackedBarrel(org.bukkit.block.Block block)
block
- The blockStackedBarrel getStackedBarrel(org.bukkit.Location location)
location
- The location of the block.java.util.List<StackedEntity> getStackedEntities()
java.util.List<StackedItem> getStackedItems()
java.util.List<StackedSpawner> getStackedSpawners()
java.util.List<StackedSpawner> getStackedSpawners(org.bukkit.Chunk chunk)
chunk
- The chunk to retrieve spawners from.java.util.List<StackedSpawner> getStackedSpawners(org.bukkit.World world, int chunkX, int chunkZ)
world
- The world of the chunk.chunkX
- The chunk's x-coords.chunkZ
- The chunk's z-coords.java.util.List<UnloadedStackedSpawner> getAllStackedSpawners()
java.util.List<StackedBarrel> getStackedBarrels()
java.util.List<StackedBarrel> getStackedBarrels(org.bukkit.Chunk chunk)
chunk
- The chunk to retrieve barrels from.java.util.List<StackedBarrel> getStackedBarrels(org.bukkit.World world, int chunkX, int chunkZ)
world
- The world of the chunk.chunkX
- The chunk's x-coords.chunkZ
- The chunk's z-coords.java.util.List<UnloadedStackedBarrel> getAllStackedBarrels()
boolean isStackedSpawner(org.bukkit.block.Block block)
boolean isStackedSpawner(org.bukkit.Location location)
location
- The location of the spawner.boolean isStackedBarrel(org.bukkit.block.Block block)
boolean isStackedBarrel(org.bukkit.Location location)
location
- The location of the block.void performCacheClear()
void performCacheSave()
void updateLinkedEntity(org.bukkit.entity.LivingEntity livingEntity, org.bukkit.entity.LivingEntity newLivingEntity)
livingEntity
- the entity that is already linkednewLivingEntity
- a new entity to be replaced with the old one<T extends org.bukkit.entity.Entity> T spawnEntityWithoutStacking(org.bukkit.Location location, java.lang.Class<T> type)
location
- the location to spawn the entity attype
- the entity class type@Deprecated <T extends org.bukkit.entity.Entity> T spawnEntityWithoutStacking(org.bukkit.Location location, java.lang.Class<T> type, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason)
location
- the location to spawn the entity attype
- the entity class typespawnReason
- the spawn reason to be set in the entity<T extends org.bukkit.entity.Entity> T spawnEntityWithoutStacking(org.bukkit.Location location, java.lang.Class<T> type, SpawnCause spawnCause)
location
- the location to spawn the entity attype
- the entity class typespawnCause
- the spawn cause to be set in the entityStackedItem spawnItemWithAmount(org.bukkit.Location location, org.bukkit.inventory.ItemStack itemStack)
location
- the location to spawn the item atitemStack
- the item to drop.StackedItem spawnItemWithAmount(org.bukkit.Location location, org.bukkit.inventory.ItemStack itemStack, int amount)
location
- the location to spawn the item atitemStack
- the item to drop.amount
- the amount of the item to drop.void spawnCorpse(StackedEntity stackedEntity)
stackedEntity
- the stacked entity.void performKillAll()
void performKillAll(boolean applyTaskFilter)
void performKillAll(java.util.function.Predicate<org.bukkit.entity.Entity> entityPredicate, java.util.function.Predicate<org.bukkit.entity.Item> itemPredicate)
void performKillAll(java.util.function.Predicate<org.bukkit.entity.Entity> entityPredicate, java.util.function.Predicate<org.bukkit.entity.Item> itemPredicate, boolean applyTaskFilter)
LootTable getLootTable(org.bukkit.entity.LivingEntity livingEntity)
livingEntity
- the living-entity@Deprecated StackedSnapshot getStackedSnapshot(org.bukkit.Chunk chunk, boolean loadData)
chunk
- The chunkloadData
- Should data be loaded if isn't already?StackedSnapshot getStackedSnapshot(org.bukkit.Chunk chunk)
chunk
- The chunkboolean hasItemNamesToggledOff(org.bukkit.entity.Player player)
player
- The player to check.void toggleItemNames(org.bukkit.entity.Player player)
player
- The player to toggle for.boolean hasEntityNamesToggledOff(org.bukkit.entity.Player player)
player
- The player to check.void toggleEntityNames(org.bukkit.entity.Player player)
player
- The player to toggle for.void addSpawnCondition(SpawnCondition spawnCondition, org.bukkit.entity.EntityType... entityTypes)
spawnCondition
- The spawn condition to add.entityTypes
- All the entity types to add the spawn condition to.java.util.Collection<SpawnCondition> getSpawnConditions(org.bukkit.entity.EntityType entityType)
entityType
- The entity's type.void removeSpawnCondition(org.bukkit.entity.EntityType entityType, SpawnCondition spawnCondition)
entityType
- The entity's typespawnCondition
- The spawn condition to remove.void clearSpawnConditions(org.bukkit.entity.EntityType entityType)
entityType
- The entity's type.java.util.Optional<SpawnCondition> getSpawnCondition(java.lang.String id)
id
- The id of the spawn condition.SpawnCondition registerSpawnCondition(SpawnCondition spawnCondition)
spawnCondition
- The spawn condition to register.