mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 07:06:45 +01:00
Move Hylian Luck into a separate listener since it actually cancels the
event. Priority when cancelling events should not be MONITOR.
This commit is contained in:
parent
aabbc2f238
commit
7919e591cb
@ -15,6 +15,7 @@ Version 1.4.00-dev
|
|||||||
= Fixed bug where Impact improperly determined the defender's armor
|
= Fixed bug where Impact improperly determined the defender's armor
|
||||||
= Fixed ArrayIndexOutOfBoundsException resulting from being unranked in a skill when using FlatFile
|
= Fixed ArrayIndexOutOfBoundsException resulting from being unranked in a skill when using FlatFile
|
||||||
= Fixed Woodcutting accidentally using Mining double drop values.
|
= Fixed Woodcutting accidentally using Mining double drop values.
|
||||||
|
! Moved Hylian Luck into a separate listener since it actually cancels the event and shouldn't just be on MONITOR.
|
||||||
! Changed how Tree Feller is handled, it should now put less stress on the CPU
|
! Changed how Tree Feller is handled, it should now put less stress on the CPU
|
||||||
! Changed Fisherman's Diet and Farmer's Diet to use two seperate config values
|
! Changed Fisherman's Diet and Farmer's Diet to use two seperate config values
|
||||||
! Major refactoring - please take note, this WILL break any mcMMO-related plugin not properly hooking into the API.
|
! Major refactoring - please take note, this WILL break any mcMMO-related plugin not properly hooking into the API.
|
||||||
|
@ -38,6 +38,7 @@ import com.gmail.nossr50.skills.woodcutting.Woodcutting;
|
|||||||
import com.gmail.nossr50.spout.SpoutSounds;
|
import com.gmail.nossr50.spout.SpoutSounds;
|
||||||
import com.gmail.nossr50.util.BlockChecks;
|
import com.gmail.nossr50.util.BlockChecks;
|
||||||
import com.gmail.nossr50.util.ItemChecks;
|
import com.gmail.nossr50.util.ItemChecks;
|
||||||
|
import com.gmail.nossr50.util.Misc;
|
||||||
import com.gmail.nossr50.util.ModChecks;
|
import com.gmail.nossr50.util.ModChecks;
|
||||||
import com.gmail.nossr50.util.Permissions;
|
import com.gmail.nossr50.util.Permissions;
|
||||||
import com.gmail.nossr50.util.Users;
|
import com.gmail.nossr50.util.Users;
|
||||||
@ -204,16 +205,25 @@ public class BlockListener implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Permissions.hylianLuck(player) && ItemChecks.isSword(player.getItemInHand())) {
|
|
||||||
Herbalism.hylianLuck(block, player, event);
|
|
||||||
}
|
|
||||||
|
|
||||||
//Remove metadata when broken
|
//Remove metadata when broken
|
||||||
if (BlockChecks.shouldBeWatched(block)) {
|
if (BlockChecks.shouldBeWatched(block)) {
|
||||||
mcMMO.placeStore.setFalse(block);
|
mcMMO.placeStore.setFalse(block);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||||
|
public void onBlockBreakHigher(BlockBreakEvent event) {
|
||||||
|
Player player = event.getPlayer();
|
||||||
|
|
||||||
|
if (Misc.isNPC(player)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Permissions.hylianLuck(player) && ItemChecks.isSword(player.getItemInHand())) {
|
||||||
|
Herbalism.hylianLuck(event.getBlock(), player, event);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Monitor BlockDamage events.
|
* Monitor BlockDamage events.
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user