mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-25 02:04:44 +02:00
@ -0,0 +1,11 @@
|
||||
package com.gmail.nossr50.events.fake;
|
||||
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.event.inventory.BrewEvent;
|
||||
import org.bukkit.inventory.BrewerInventory;
|
||||
|
||||
public class FakeBrewEvent extends BrewEvent {
|
||||
public FakeBrewEvent(Block brewer, BrewerInventory contents) {
|
||||
super(brewer, contents);
|
||||
}
|
||||
}
|
@ -17,6 +17,7 @@ import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.config.skills.alchemy.PotionConfig;
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
|
||||
import com.gmail.nossr50.datatypes.skills.alchemy.AlchemyPotion;
|
||||
import com.gmail.nossr50.events.fake.FakeBrewEvent;
|
||||
import com.gmail.nossr50.runnables.player.PlayerUpdateInventoryTask;
|
||||
import com.gmail.nossr50.runnables.skills.AlchemyBrewCheckTask;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
@ -100,6 +101,13 @@ public final class AlchemyPotionBrewer {
|
||||
return;
|
||||
}
|
||||
|
||||
FakeBrewEvent event = new FakeBrewEvent(brewingStand.getBlock(), inventory);
|
||||
mcMMO.p.getServer().getPluginManager().callEvent(event);
|
||||
|
||||
if (event.isCancelled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
ItemStack item = inventory.getItem(i);
|
||||
|
||||
|
Reference in New Issue
Block a user