mirror of
https://github.com/exituser/Brewery.git
synced 2026-09-17 07:49:03 +00:00
ShowStatusOnDrink config option
This commit is contained in:
@@ -200,7 +200,9 @@ public class BPlayer {
|
||||
bPlayer.drinkCap(player);
|
||||
}
|
||||
bPlayer.syncToSQL(false);
|
||||
bPlayer.showDrunkeness(player);
|
||||
if (BConfig.showStatusOnDrink) {
|
||||
bPlayer.showDrunkeness(player);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -68,6 +68,7 @@ public class BConfig {
|
||||
//BPlayer
|
||||
public static Map<Material, Integer> drainItems = new HashMap<>();// DrainItem Material and Strength
|
||||
public static Material pukeItem;
|
||||
public static boolean showStatusOnDrink;
|
||||
public static int pukeDespawntime;
|
||||
public static int hangoverTime;
|
||||
public static boolean overdrinkKick;
|
||||
@@ -235,6 +236,7 @@ public class BConfig {
|
||||
enableLoginDisallow = config.getBoolean("enableLoginDisallow", false);
|
||||
enablePuke = config.getBoolean("enablePuke", false);
|
||||
pukeDespawntime = config.getInt("pukeDespawntime", 60) * 20;
|
||||
showStatusOnDrink = config.getBoolean("showStatusOnDrink", false);
|
||||
homeType = config.getString("homeType", null);
|
||||
craftSealingTable = config.getBoolean("craftSealingTable", false);
|
||||
enableSealingTable = config.getBoolean("enableSealingTable", false);
|
||||
|
||||
@@ -331,7 +331,9 @@ public class CommandListener implements CommandExecutor {
|
||||
bPlayer.remove();
|
||||
} else {
|
||||
bPlayer.setData(drunkeness, quality);
|
||||
bPlayer.showDrunkeness(player);
|
||||
if (BConfig.showStatusOnDrink) {
|
||||
bPlayer.showDrunkeness(player);
|
||||
}
|
||||
}
|
||||
|
||||
if (drunkeness > 100) {
|
||||
|
||||
@@ -167,7 +167,9 @@ public class PlayerListener implements Listener {
|
||||
BPlayer bplayer = BPlayer.get(player);
|
||||
if (bplayer != null) {
|
||||
bplayer.drainByItem(player, item.getType());
|
||||
bplayer.showDrunkeness(player);
|
||||
if (BConfig.showStatusOnDrink) {
|
||||
bplayer.showDrunkeness(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user