mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 07:06:45 +01:00
We don't have to pass the event anymore.
This commit is contained in:
parent
b16cc87ffb
commit
593975a255
@ -160,10 +160,10 @@ public class BlockListener implements Listener {
|
|||||||
* Instead, we check it inside the drops handler.
|
* Instead, we check it inside the drops handler.
|
||||||
*/
|
*/
|
||||||
if (player.hasPermission("mcmmo.skills.herbalism")) {
|
if (player.hasPermission("mcmmo.skills.herbalism")) {
|
||||||
Herbalism.herbalismProcCheck(block, mcMMOPlayer, event, plugin); //Double drops
|
Herbalism.herbalismProcCheck(block, mcMMOPlayer, plugin); //Double drops
|
||||||
|
|
||||||
if (profile.getAbilityMode(AbilityType.GREEN_TERRA)) {
|
if (profile.getAbilityMode(AbilityType.GREEN_TERRA)) {
|
||||||
Herbalism.herbalismProcCheck(block, mcMMOPlayer, event, plugin); //Triple drops
|
Herbalism.herbalismProcCheck(block, mcMMOPlayer, plugin); //Triple drops
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -146,7 +146,7 @@ public class Herbalism {
|
|||||||
* @param event The event to use for Green Thumb
|
* @param event The event to use for Green Thumb
|
||||||
* @param plugin mcMMO plugin instance
|
* @param plugin mcMMO plugin instance
|
||||||
*/
|
*/
|
||||||
public static void herbalismProcCheck(final Block block, McMMOPlayer mcMMOPlayer, BlockBreakEvent event, mcMMO plugin) {
|
public static void herbalismProcCheck(final Block block, McMMOPlayer mcMMOPlayer, mcMMO plugin) {
|
||||||
Player player = mcMMOPlayer.getPlayer();
|
Player player = mcMMOPlayer.getPlayer();
|
||||||
|
|
||||||
if (Config.getInstance().getHerbalismAFKDisabled() && player.isInsideVehicle()) {
|
if (Config.getInstance().getHerbalismAFKDisabled() && player.isInsideVehicle()) {
|
||||||
@ -174,7 +174,7 @@ public class Herbalism {
|
|||||||
dropItem = herbalismBlock.getDropItem();
|
dropItem = herbalismBlock.getDropItem();
|
||||||
xp = herbalismBlock.getXpGain();
|
xp = herbalismBlock.getXpGain();
|
||||||
|
|
||||||
greenThumbWheat(block, player, event, plugin);
|
greenThumbWheat(block, player, plugin);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (!mcMMO.placeStore.isTrue(block)) {
|
if (!mcMMO.placeStore.isTrue(block)) {
|
||||||
@ -223,7 +223,7 @@ public class Herbalism {
|
|||||||
* @param event The event triggering the ability
|
* @param event The event triggering the ability
|
||||||
* @param plugin mcMMO plugin instance
|
* @param plugin mcMMO plugin instance
|
||||||
*/
|
*/
|
||||||
private static void greenThumbWheat(Block block, Player player, BlockBreakEvent event, mcMMO plugin) {
|
private static void greenThumbWheat(Block block, Player player, mcMMO plugin) {
|
||||||
PlayerProfile profile = Users.getPlayer(player).getProfile();
|
PlayerProfile profile = Users.getPlayer(player).getProfile();
|
||||||
int herbLevel = profile.getSkillLevel(SkillType.HERBALISM);
|
int herbLevel = profile.getSkillLevel(SkillType.HERBALISM);
|
||||||
PlayerInventory inventory = player.getInventory();
|
PlayerInventory inventory = player.getInventory();
|
||||||
|
Loading…
Reference in New Issue
Block a user