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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    dropItem(org.bukkit.Location loc, org.bukkit.inventory.ItemStack item)
    Drops an itemstack at a location
    void
    dropLootTable(org.bukkit.Location loc, org.bukkit.loot.LootTable table)
    Drops a random set of items from the specified loot table
    void
    dropRandomLuckyDrop(org.bukkit.Location loc)
    The main method that gets called per player
    void
    run()
    The main method of the runnable
    void
     
    void
    spawnEntity(org.bukkit.Location loc, org.bukkit.entity.EntityType type)
    Spawns an entity of a specified type

    Methods 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 items
      table - 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 item
      item - 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 entity
      type - The type of entity to spawn
    • run

      public void run()
      The main method of the runnable
      Specified by:
      run in interface Runnable
    • setConfig

      public void setConfig(ScenarioConfiguration config)
      Specified by:
      setConfig in interface ScenarioConfigurable