mirror of
https://github.com/exituser/Brewery.git
synced 2026-09-17 05:28:59 +00:00
Revert away drainAndRemove
This commit is contained in:
@@ -182,7 +182,7 @@ public class BPlayer {
|
|||||||
|
|
||||||
applyEffects(effects, player, PlayerEffectEvent.EffectType.DRINK);
|
applyEffects(effects, player, PlayerEffectEvent.EffectType.DRINK);
|
||||||
if (brewAlc < 0) {
|
if (brewAlc < 0) {
|
||||||
bPlayer.drainAndRemove(player, -brewAlc);
|
bPlayer.drain(player, -brewAlc);
|
||||||
} else if (brewAlc > 0) {
|
} else if (brewAlc > 0) {
|
||||||
bPlayer.drunkeness += brewAlc;
|
bPlayer.drunkeness += brewAlc;
|
||||||
if (quality > 0) {
|
if (quality > 0) {
|
||||||
@@ -337,11 +337,7 @@ public class BPlayer {
|
|||||||
// Eat something to drain the drunkeness
|
// Eat something to drain the drunkeness
|
||||||
public void drainByItem(Player player, Material mat) {
|
public void drainByItem(Player player, Material mat) {
|
||||||
int strength = BConfig.drainItems.get(mat);
|
int strength = BConfig.drainItems.get(mat);
|
||||||
drainAndRemove(player, strength);
|
if (drain(player, strength)) {
|
||||||
}
|
|
||||||
|
|
||||||
public void drainAndRemove(Player player, int amount) {
|
|
||||||
if (drain(player, amount)) {
|
|
||||||
remove(player);
|
remove(player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user