mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-07-16 04:24:43 +02:00
Fix ClassCastException with trying to use Woodcutting on Mushrooms.
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
package com.gmail.nossr50.skills.woodcutting;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.block.BlockState;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -61,7 +62,11 @@ public final class Woodcutting {
|
||||
int xp = getExperienceFromLog(blockState, ExperienceGainMethod.DEFAULT);
|
||||
|
||||
if (Permissions.doubleDrops(player, SkillType.WOODCUTTING)) {
|
||||
checkForDoubleDrop(player, blockState);
|
||||
Material blockType = blockState.getType();
|
||||
|
||||
if (blockType != Material.HUGE_MUSHROOM_1 && blockType != Material.HUGE_MUSHROOM_2) {
|
||||
checkForDoubleDrop(player, blockState);
|
||||
}
|
||||
}
|
||||
|
||||
Users.getPlayer(player).beginXpGain(SkillType.WOODCUTTING, xp);
|
||||
|
Reference in New Issue
Block a user