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 TypeMethodDescriptionvoid
dropItem
(org.bukkit.Location loc, org.bukkit.inventory.ItemStack item) Drops an itemstack at a locationvoid
dropLootTable
(org.bukkit.Location loc, org.bukkit.loot.LootTable table) Drops a random set of items from the specified loot tablevoid
dropRandomLuckyDrop
(org.bukkit.Location loc) The main method that gets called per playervoid
run()
The main method of the runnablevoid
setConfig
(ScenarioConfiguration config) void
spawnEntity
(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, runTaskTimerAsynchronously
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
setConfig
in interfaceScenarioConfigurable
-