Interface IGenerator
public interface IGenerator
- 
Method SummaryModifier and TypeMethodDescriptionvoidThis only must be called by the arena instance when it restarts.voiddisable()Disable a generator and destroy its data.voiddropItem(org.bukkit.Location location) This will drop the item at a given location.voidEnable generator rotation.intGet the amount of items that are dropped once.getArena()Get the arena assigned to this generator.getBwt()Get the team assigned to this generator.intgetDelay()Get spawn rate delay.org.bukkit.entity.ArmorStandGet generator hologram holder (armor stand) containing the rotating item.Get holograms associated to this generator.org.bukkit.LocationGet the generator location.intGet seconds before next item spawn.org.bukkit.inventory.ItemStackgetOre()Get generator ore.intGet the spawn limit of the generators.getType()Get generator type.booleanisStack()Check if the dropped items can be stacked.voidrotate()This method is called every tick to manage the block rotation.voidsetAmount(int amount) Set how many items should the generator spawn at once.voidsetDelay(int delay) Change item spawn delay.voidsetNextSpawn(int nextSpawn) Set the remaining time till the next item spawn.voidsetOre(org.bukkit.inventory.ItemStack ore) Change the item that this generator will spawn.voidsetSpawnLimit(int value) This is the limit when the generator will stop spawning new items until they are collected.voidsetStack(boolean stack) Should the dropped items be stacked?voidsetType(GeneratorType type) Set generator type.voidspawn()This will attempt to spawn the items every second.voidupdateHolograms(org.bukkit.entity.Player p, String iso) This will hide generator holograms with a different iso.voidupgrade()Manage what to do when the generator upgrade is called fromIArena.updateNextEvent()
- 
Method Details- 
getLanguageHologramsGet holograms associated to this generator. Language iso, Hologram instance.
- 
disablevoid disable()Disable a generator and destroy its data.
- 
upgradevoid upgrade()Manage what to do when the generator upgrade is called fromIArena.updateNextEvent()
- 
spawnvoid spawn()This will attempt to spawn the items every second.
- 
dropItemvoid dropItem(org.bukkit.Location location) This will drop the item at a given location.- Parameters:
- location- You can customize this location in order to drop items near a player if it's a base generator with multiple teammates.
 
- 
setOrevoid setOre(org.bukkit.inventory.ItemStack ore) Change the item that this generator will spawn.
- 
getArenaIArena getArena()Get the arena assigned to this generator.
- 
rotatevoid rotate()This method is called every tick to manage the block rotation.
- 
setDelayvoid setDelay(int delay) Change item spawn delay. In seconds.
- 
setAmountvoid setAmount(int amount) Set how many items should the generator spawn at once.
- 
getLocationorg.bukkit.Location getLocation()Get the generator location.
- 
getOreorg.bukkit.inventory.ItemStack getOre()Get generator ore.
- 
updateHologramsThis will hide generator holograms with a different iso.- Parameters:
- iso- player language iso.
 
- 
enableRotationvoid enableRotation()Enable generator rotation. Make sure it has a helmet set. DIAMOND and EMERALD generator types will get the rotation activated when the arena starts. If you want to have a different rotating type you should call this manually atGameStateChangeEvent
- 
setSpawnLimitvoid setSpawnLimit(int value) This is the limit when the generator will stop spawning new items until they are collected.
- 
getBwtITeam getBwt()Get the team assigned to this generator.- Returns:
- null if this is not a team generator.
 
- 
getHologramHolderorg.bukkit.entity.ArmorStand getHologramHolder()Get generator hologram holder (armor stand) containing the rotating item.- Returns:
- null if there is no rotating item.
 
- 
getTypeGeneratorType getType()Get generator type.
- 
getAmountint getAmount()Get the amount of items that are dropped once.
- 
getDelayint getDelay()Get spawn rate delay.
- 
getNextSpawnint getNextSpawn()Get seconds before next item spawn.
- 
getSpawnLimitint getSpawnLimit()Get the spawn limit of the generators. If there is this amount of items dropped near the generator it will stop spawning new items.
- 
setNextSpawnvoid setNextSpawn(int nextSpawn) Set the remaining time till the next item spawn.
- 
setStackvoid setStack(boolean stack) Should the dropped items be stacked?
- 
isStackboolean isStack()Check if the dropped items can be stacked.
- 
setTypeSet generator type. This may break things.
- 
destroyDatavoid destroyData()This only must be called by the arena instance when it restarts. Do never call it unless you have a custom arena. Manage your data destroy.
 
-