mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 22:56:45 +01:00
No need to create our mcMMOPlayer again.
This commit is contained in:
parent
44ede5c3f8
commit
109e9725a9
@ -142,7 +142,7 @@ public class BlockListener implements Listener {
|
|||||||
|
|
||||||
/* HERBALISM */
|
/* HERBALISM */
|
||||||
if (BlockUtils.affectedByGreenTerra(blockState)) {
|
if (BlockUtils.affectedByGreenTerra(blockState)) {
|
||||||
HerbalismManager herbalismManager = UserManager.getPlayer(player).getHerbalismManager();
|
HerbalismManager herbalismManager = mcMMOPlayer.getHerbalismManager();
|
||||||
|
|
||||||
/* Green Terra */
|
/* Green Terra */
|
||||||
if (herbalismManager.canActivateAbility()) {
|
if (herbalismManager.canActivateAbility()) {
|
||||||
@ -167,7 +167,7 @@ public class BlockListener implements Listener {
|
|||||||
|
|
||||||
/* MINING */
|
/* MINING */
|
||||||
else if (BlockUtils.affectedBySuperBreaker(blockState) && ItemUtils.isPickaxe(heldItem) && Permissions.skillEnabled(player, SkillType.MINING) && !mcMMO.placeStore.isTrue(blockState)) {
|
else if (BlockUtils.affectedBySuperBreaker(blockState) && ItemUtils.isPickaxe(heldItem) && Permissions.skillEnabled(player, SkillType.MINING) && !mcMMO.placeStore.isTrue(blockState)) {
|
||||||
MiningManager miningManager = UserManager.getPlayer(player).getMiningManager();
|
MiningManager miningManager = mcMMOPlayer.getMiningManager();
|
||||||
miningManager.miningBlockCheck(blockState);
|
miningManager.miningBlockCheck(blockState);
|
||||||
|
|
||||||
if (mcMMOPlayer.getAbilityMode(AbilityType.SUPER_BREAKER)) {
|
if (mcMMOPlayer.getAbilityMode(AbilityType.SUPER_BREAKER)) {
|
||||||
@ -189,7 +189,7 @@ public class BlockListener implements Listener {
|
|||||||
|
|
||||||
/* EXCAVATION */
|
/* EXCAVATION */
|
||||||
else if (BlockUtils.affectedByGigaDrillBreaker(blockState) && ItemUtils.isShovel(heldItem) && Permissions.skillEnabled(player, SkillType.EXCAVATION) && !mcMMO.placeStore.isTrue(blockState)) {
|
else if (BlockUtils.affectedByGigaDrillBreaker(blockState) && ItemUtils.isShovel(heldItem) && Permissions.skillEnabled(player, SkillType.EXCAVATION) && !mcMMO.placeStore.isTrue(blockState)) {
|
||||||
ExcavationManager excavationManager = UserManager.getPlayer(player).getExcavationManager();
|
ExcavationManager excavationManager = mcMMOPlayer.getExcavationManager();
|
||||||
excavationManager.excavationBlockCheck(blockState);
|
excavationManager.excavationBlockCheck(blockState);
|
||||||
|
|
||||||
if (mcMMOPlayer.getAbilityMode(AbilityType.GIGA_DRILL_BREAKER)) {
|
if (mcMMOPlayer.getAbilityMode(AbilityType.GIGA_DRILL_BREAKER)) {
|
||||||
@ -361,7 +361,7 @@ public class BlockListener implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (BlockUtils.isLeaves(blockState)) {
|
else if (BlockUtils.isLeaves(blockState)) {
|
||||||
if (UserManager.getPlayer(player).getWoodcuttingManager().canUseLeafBlower(heldItem) && SkillUtils.blockBreakSimulate(block, player, true)) {
|
if (mcMMOPlayer.getWoodcuttingManager().canUseLeafBlower(heldItem) && SkillUtils.blockBreakSimulate(block, player, true)) {
|
||||||
event.setInstaBreak(true);
|
event.setInstaBreak(true);
|
||||||
player.playSound(blockState.getLocation(), Sound.ITEM_PICKUP, Misc.POP_VOLUME, Misc.POP_PITCH);
|
player.playSound(blockState.getLocation(), Sound.ITEM_PICKUP, Misc.POP_VOLUME, Misc.POP_PITCH);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user