mirror of
https://github.com/songoda/EpicEnchants.git
synced 2024-09-27 15:22:45 +02:00
Added EXPERIENCE_BLOCK_BREAK
This commit is contained in:
parent
818123f70f
commit
a53bd7398d
@ -26,7 +26,8 @@ public enum TriggerType {
|
||||
STATIC_EFFECT,
|
||||
|
||||
BLOCK_BREAK,
|
||||
REPEATING,
|
||||
EXPERIENCE_BLOCK_BREAK,
|
||||
REPEATING, //TODO: Figure out what this is.
|
||||
RIGHT_CLICK,
|
||||
LEFT_CLICK
|
||||
}
|
||||
|
@ -67,6 +67,8 @@ public class PlayerListener implements Listener {
|
||||
@EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST)
|
||||
public void onBlockBreak(BlockBreakEvent event) {
|
||||
instance.getEnchantUtils().handlePlayer(event.getPlayer(), null, event, BLOCK_BREAK);
|
||||
if (event.getExpToDrop() != 0)
|
||||
instance.getEnchantUtils().handlePlayer(event.getPlayer(), null, event, EXPERIENCE_BLOCK_BREAK);
|
||||
}
|
||||
|
||||
@EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST)
|
||||
|
@ -20,9 +20,9 @@ item-whitelist:
|
||||
effects:
|
||||
MODIFY_EXP:
|
||||
# Chance that this will happen
|
||||
chance: "5 * {level}"
|
||||
chance: "20 * {level}"
|
||||
# The trigger that will fire this effect
|
||||
trigger: BLOCK_BREAK
|
||||
trigger: EXPERIENCE_BLOCK_BREAK
|
||||
# What player should the effect be ran on: USER/OPPONENT.
|
||||
who: USER
|
||||
# Amount of EXP to add
|
||||
|
Loading…
Reference in New Issue
Block a user