public class ExperienceEnhancementsListener extends AbstractExperienceListener
presets
Constructor and Description |
---|
ExperienceEnhancementsListener(Debugger debugger,
Presets presets) |
Modifier and Type | Method and Description |
---|---|
int |
getBonus(java.util.Random rnd,
int bookshelves,
int maxBookselfCount,
int slot)
Samples a level cost for a particular enchanting table, given the slot and number
of bookshelves surrounding it.
|
int |
getMaxBonus(int bookshelves,
int maxBookselfCount,
int slot)
Determines the maximum level cost in a particular enchanting table slot.
|
int |
getMinBonus(int bookshelves,
int maxBookselfCount,
int slot)
Determines the minimum level cost in a particular enchanting table slot.
|
void |
onEnchantItemEvent(org.bukkit.event.enchantment.EnchantItemEvent event) |
void |
onPlayerDeathEvent(org.bukkit.event.entity.PlayerDeathEvent event) |
void |
onPrepareItemEnchantEvent(org.bukkit.event.enchantment.PrepareItemEnchantEvent event) |
getConfiguration, getConfiguration, getPresets, setPresets
public void onPlayerDeathEvent(org.bukkit.event.entity.PlayerDeathEvent event)
public void onEnchantItemEvent(org.bukkit.event.enchantment.EnchantItemEvent event)
public void onPrepareItemEnchantEvent(org.bukkit.event.enchantment.PrepareItemEnchantEvent event)
public int getMinBonus(int bookshelves, int maxBookselfCount, int slot)
bookshelves
- - the number of bookshelves around the enchanting table.maxBookselfCount
- - the maximum number of bookshelves.slot
- - the slot number.public int getMaxBonus(int bookshelves, int maxBookselfCount, int slot)
bookshelves
- - the number of bookshelves around the enchanting table.slot
- - the slot number.public int getBonus(java.util.Random rnd, int bookshelves, int maxBookselfCount, int slot)
rnd
- - a random number generator.bookshelves
- - the number of bookshelves around the enchanting table.maxBookselfCount
- - the maximum number of bookshelves.slot
- - the slot number.