Class RandomLuckyDropScenario
java.lang.Object
org.bukkit.scheduler.BukkitRunnable
uk.radialbog9.spigot.manhunt.scenario.scenarios.RandomLuckyDropScenario
- All Implemented Interfaces:
Runnable,ScenarioConfigurable
public class RandomLuckyDropScenario
extends org.bukkit.scheduler.BukkitRunnable
implements ScenarioConfigurable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddropItem(org.bukkit.Location loc, org.bukkit.inventory.ItemStack item) Drops an itemstack at a locationvoiddropLootTable(org.bukkit.Location loc, org.bukkit.loot.LootTable table) Drops a random set of items from the specified loot tablevoiddropRandomLuckyDrop(org.bukkit.Location loc) The main method that gets called per playervoidrun()The main method of the runnablevoidsetConfig(ScenarioConfiguration config) voidspawnEntity(org.bukkit.Location loc, org.bukkit.entity.EntityType type) Spawns an entity of a specified typeMethods inherited from class org.bukkit.scheduler.BukkitRunnable
cancel, getTaskId, isCancelled, runTask, runTaskAsynchronously, runTaskLater, runTaskLaterAsynchronously, runTaskTimer, runTaskTimerAsynchronouslyMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface uk.radialbog9.spigot.manhunt.scenario.config.ScenarioConfigurable
getConfig
-
Constructor Details
-
RandomLuckyDropScenario
public RandomLuckyDropScenario()
-
-
Method Details
-
dropRandomLuckyDrop
public void dropRandomLuckyDrop(org.bukkit.Location loc) The main method that gets called per player- Parameters:
loc- The location to drop the "surprise"
-
dropLootTable
public void dropLootTable(org.bukkit.Location loc, org.bukkit.loot.LootTable table) Drops a random set of items from the specified loot table- Parameters:
loc- The location to drop the itemstable- The loot table to get the items from
-
dropItem
public void dropItem(org.bukkit.Location loc, org.bukkit.inventory.ItemStack item) Drops an itemstack at a location- Parameters:
loc- The location to drop the itemitem- The itemstack to drop
-
spawnEntity
public void spawnEntity(org.bukkit.Location loc, org.bukkit.entity.EntityType type) Spawns an entity of a specified type- Parameters:
loc- The location to spawn the entitytype- The type of entity to spawn
-
run
public void run()The main method of the runnable -
setConfig
- Specified by:
setConfigin interfaceScenarioConfigurable
-