mirror of
https://github.com/exituser/Brewery.git
synced 2026-09-17 07:49:03 +00:00
Brew Drink command to simulate drinking a brew
This commit is contained in:
@@ -161,12 +161,14 @@ public class BPlayer {
|
||||
bPlayer = addPlayer(player);
|
||||
}
|
||||
BrewDrinkEvent drinkEvent = new BrewDrinkEvent(brew, meta, player, bPlayer);
|
||||
P.p.getServer().getPluginManager().callEvent(drinkEvent);
|
||||
if (drinkEvent.isCancelled()) {
|
||||
if (bPlayer.drunkeness <= 0) {
|
||||
bPlayer.remove();
|
||||
if (meta != null) {
|
||||
P.p.getServer().getPluginManager().callEvent(drinkEvent);
|
||||
if (drinkEvent.isCancelled()) {
|
||||
if (bPlayer.drunkeness <= 0) {
|
||||
bPlayer.remove();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
if (brew.hasRecipe()) {
|
||||
|
||||
Reference in New Issue
Block a user