mirror of
https://github.com/DieReicheErethons/Brewery.git
synced 2025-01-25 21:41:19 +01:00
ShowStatusOnDrink config option
This commit is contained in:
parent
ec624ab3c7
commit
c8a7a56ab9
@ -38,6 +38,9 @@ pukeItem: SOUL_SAND
|
|||||||
# Wurde die item Despawnzeit in der spigot.yml verändert, verändert sich auch die pukeDespawnzeit in Abhängigkeit.
|
# Wurde die item Despawnzeit in der spigot.yml verändert, verändert sich auch die pukeDespawnzeit in Abhängigkeit.
|
||||||
pukeDespawntime: 60
|
pukeDespawntime: 60
|
||||||
|
|
||||||
|
# Ob seine Betrunkenheit dem Spieler kurz angezeigt werden soll wenn er etwas trinkt oder ein drainItem isst. [true]
|
||||||
|
showStatusOnDrink: true
|
||||||
|
|
||||||
# Konsumierbares Item/Stärke. Senkt den Alkoholpegel um <Stärke> wenn konsumiert.
|
# Konsumierbares Item/Stärke. Senkt den Alkoholpegel um <Stärke> wenn konsumiert.
|
||||||
drainItems:
|
drainItems:
|
||||||
- BREAD/4
|
- BREAD/4
|
||||||
|
@ -38,6 +38,9 @@ pukeItem: SOUL_SAND
|
|||||||
# If the item despawn time was changed in the spigot.yml, the pukeDespawntime changes as well.
|
# If the item despawn time was changed in the spigot.yml, the pukeDespawntime changes as well.
|
||||||
pukeDespawntime: 60
|
pukeDespawntime: 60
|
||||||
|
|
||||||
|
# Display his drunkeness to the player when he drinks a brew or eats a drainItem [true]
|
||||||
|
showStatusOnDrink: true
|
||||||
|
|
||||||
# Consumable Item/strength. Decreases the alcohol level by <strength> when consumed. (list)
|
# Consumable Item/strength. Decreases the alcohol level by <strength> when consumed. (list)
|
||||||
drainItems:
|
drainItems:
|
||||||
- BREAD/4
|
- BREAD/4
|
||||||
|
@ -39,6 +39,9 @@ pukeItem: SOUL_SAND
|
|||||||
# If the item despawn time was changed in the spigot.yml, the pukeDespawntime changes as well.
|
# If the item despawn time was changed in the spigot.yml, the pukeDespawntime changes as well.
|
||||||
pukeDespawntime: 60
|
pukeDespawntime: 60
|
||||||
|
|
||||||
|
# Display his drunkeness to the player when he drinks a brew or eats a drainItem [true]
|
||||||
|
showStatusOnDrink: true
|
||||||
|
|
||||||
# Consommables Objet/Force. Réduit le montant d'alcool par <Force> lors de la consommation. (list)
|
# Consommables Objet/Force. Réduit le montant d'alcool par <Force> lors de la consommation. (list)
|
||||||
drainItems:
|
drainItems:
|
||||||
- BREAD/4
|
- BREAD/4
|
||||||
|
@ -38,6 +38,9 @@ pukeItem: SOUL_SAND
|
|||||||
# Se il tempo di scomparsa viene cambiato in spigot.yml anche pukeDespawntime cambia.
|
# Se il tempo di scomparsa viene cambiato in spigot.yml anche pukeDespawntime cambia.
|
||||||
pukeDespawntime: 60
|
pukeDespawntime: 60
|
||||||
|
|
||||||
|
# Display his drunkeness to the player when he drinks a brew or eats a drainItem [true]
|
||||||
|
showStatusOnDrink: true
|
||||||
|
|
||||||
# Oggetto consumabile/forza. Questi oggetti se consumati calano il livello di alcool (della "forza" che avevi impsotato) (list)
|
# Oggetto consumabile/forza. Questi oggetti se consumati calano il livello di alcool (della "forza" che avevi impsotato) (list)
|
||||||
drainItems:
|
drainItems:
|
||||||
- BREAD/4
|
- BREAD/4
|
||||||
|
@ -38,6 +38,9 @@ pukeItem: Soul_Sand
|
|||||||
# Wurde die item Despawnzeit in der spigot.yml verändert, verändert sich auch die pukeDespawnzeit in Abhängigkeit.
|
# Wurde die item Despawnzeit in der spigot.yml verändert, verändert sich auch die pukeDespawnzeit in Abhängigkeit.
|
||||||
pukeDespawntime: 60
|
pukeDespawntime: 60
|
||||||
|
|
||||||
|
# Ob seine Betrunkenheit dem Spieler kurz angezeigt werden soll wenn er etwas trinkt oder ein drainItem isst. [true]
|
||||||
|
showStatusOnDrink: true
|
||||||
|
|
||||||
# Konsumierbares Item/Stärke. Senkt den Alkoholpegel um <Stärke> wenn konsumiert.
|
# Konsumierbares Item/Stärke. Senkt den Alkoholpegel um <Stärke> wenn konsumiert.
|
||||||
drainItems:
|
drainItems:
|
||||||
- Bread/4
|
- Bread/4
|
||||||
|
@ -38,6 +38,9 @@ pukeItem: Soul_Sand
|
|||||||
# If the item despawn time was changed in the spigot.yml, the pukeDespawntime changes as well.
|
# If the item despawn time was changed in the spigot.yml, the pukeDespawntime changes as well.
|
||||||
pukeDespawntime: 60
|
pukeDespawntime: 60
|
||||||
|
|
||||||
|
# Display his drunkeness to the player when he drinks a brew or eats a drainItem [true]
|
||||||
|
showStatusOnDrink: true
|
||||||
|
|
||||||
# Consumable Item/strength. Decreases the alcohol level by <strength> when consumed. (list)
|
# Consumable Item/strength. Decreases the alcohol level by <strength> when consumed. (list)
|
||||||
drainItems:
|
drainItems:
|
||||||
- Bread/4
|
- Bread/4
|
||||||
|
@ -38,6 +38,9 @@ pukeItem: Soul_Sand
|
|||||||
# If the item despawn time was changed in the spigot.yml, the pukeDespawntime changes as well.
|
# If the item despawn time was changed in the spigot.yml, the pukeDespawntime changes as well.
|
||||||
pukeDespawntime: 60
|
pukeDespawntime: 60
|
||||||
|
|
||||||
|
# Display his drunkeness to the player when he drinks a brew or eats a drainItem [true]
|
||||||
|
showStatusOnDrink: true
|
||||||
|
|
||||||
# Consumable Item/strength. Decreases the alcohol level by <strength> when consumed. (list)
|
# Consumable Item/strength. Decreases the alcohol level by <strength> when consumed. (list)
|
||||||
drainItems:
|
drainItems:
|
||||||
- Bread/4
|
- Bread/4
|
||||||
|
@ -39,6 +39,9 @@ pukeItem: Soul_Sand
|
|||||||
# If the item despawn time was changed in the spigot.yml, the pukeDespawntime changes as well.
|
# If the item despawn time was changed in the spigot.yml, the pukeDespawntime changes as well.
|
||||||
pukeDespawntime: 60
|
pukeDespawntime: 60
|
||||||
|
|
||||||
|
# Display his drunkeness to the player when he drinks a brew or eats a drainItem [true]
|
||||||
|
showStatusOnDrink: true
|
||||||
|
|
||||||
# Consommables Objet/Force. Réduit le montant d'alcool par <Force> lors de la consommation. (list)
|
# Consommables Objet/Force. Réduit le montant d'alcool par <Force> lors de la consommation. (list)
|
||||||
drainItems:
|
drainItems:
|
||||||
- Bread/4
|
- Bread/4
|
||||||
|
@ -38,6 +38,9 @@ pukeItem: Soul_Sand
|
|||||||
# Se il tempo di scomparsa viene cambiato in spigot.yml anche pukeDespawntime cambia.
|
# Se il tempo di scomparsa viene cambiato in spigot.yml anche pukeDespawntime cambia.
|
||||||
pukeDespawntime: 60
|
pukeDespawntime: 60
|
||||||
|
|
||||||
|
# Display his drunkeness to the player when he drinks a brew or eats a drainItem [true]
|
||||||
|
showStatusOnDrink: true
|
||||||
|
|
||||||
# Oggetto consumabile/forza. Questi oggetti se consumati calano il livello di alcool (della "forza" che avevi impsotato) (list)
|
# Oggetto consumabile/forza. Questi oggetti se consumati calano il livello di alcool (della "forza" che avevi impsotato) (list)
|
||||||
drainItems:
|
drainItems:
|
||||||
- Bread/4
|
- Bread/4
|
||||||
|
@ -40,6 +40,9 @@ pukeItem: Soul_Sand
|
|||||||
# 如果spigot.yml中的物品消失时间被变更, 此处也会变更.
|
# 如果spigot.yml中的物品消失时间被变更, 此处也会变更.
|
||||||
pukeDespawntime: 60
|
pukeDespawntime: 60
|
||||||
|
|
||||||
|
# Display his drunkeness to the player when he drinks a brew or eats a drainItem [true]
|
||||||
|
showStatusOnDrink: true
|
||||||
|
|
||||||
# 解酒物/解酒强度. 降低玩家一定程度的醉酒程度, 解救强度为百分数.(下列)
|
# 解酒物/解酒强度. 降低玩家一定程度的醉酒程度, 解救强度为百分数.(下列)
|
||||||
drainItems:
|
drainItems:
|
||||||
- Bread/4
|
- Bread/4
|
||||||
|
@ -200,7 +200,9 @@ public class BPlayer {
|
|||||||
bPlayer.drinkCap(player);
|
bPlayer.drinkCap(player);
|
||||||
}
|
}
|
||||||
bPlayer.syncToSQL(false);
|
bPlayer.syncToSQL(false);
|
||||||
bPlayer.showDrunkeness(player);
|
if (BConfig.showStatusOnDrink) {
|
||||||
|
bPlayer.showDrunkeness(player);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,6 +68,7 @@ public class BConfig {
|
|||||||
//BPlayer
|
//BPlayer
|
||||||
public static Map<Material, Integer> drainItems = new HashMap<>();// DrainItem Material and Strength
|
public static Map<Material, Integer> drainItems = new HashMap<>();// DrainItem Material and Strength
|
||||||
public static Material pukeItem;
|
public static Material pukeItem;
|
||||||
|
public static boolean showStatusOnDrink;
|
||||||
public static int pukeDespawntime;
|
public static int pukeDespawntime;
|
||||||
public static int hangoverTime;
|
public static int hangoverTime;
|
||||||
public static boolean overdrinkKick;
|
public static boolean overdrinkKick;
|
||||||
@ -235,6 +236,7 @@ public class BConfig {
|
|||||||
enableLoginDisallow = config.getBoolean("enableLoginDisallow", false);
|
enableLoginDisallow = config.getBoolean("enableLoginDisallow", false);
|
||||||
enablePuke = config.getBoolean("enablePuke", false);
|
enablePuke = config.getBoolean("enablePuke", false);
|
||||||
pukeDespawntime = config.getInt("pukeDespawntime", 60) * 20;
|
pukeDespawntime = config.getInt("pukeDespawntime", 60) * 20;
|
||||||
|
showStatusOnDrink = config.getBoolean("showStatusOnDrink", false);
|
||||||
homeType = config.getString("homeType", null);
|
homeType = config.getString("homeType", null);
|
||||||
craftSealingTable = config.getBoolean("craftSealingTable", false);
|
craftSealingTable = config.getBoolean("craftSealingTable", false);
|
||||||
enableSealingTable = config.getBoolean("enableSealingTable", false);
|
enableSealingTable = config.getBoolean("enableSealingTable", false);
|
||||||
|
@ -331,7 +331,9 @@ public class CommandListener implements CommandExecutor {
|
|||||||
bPlayer.remove();
|
bPlayer.remove();
|
||||||
} else {
|
} else {
|
||||||
bPlayer.setData(drunkeness, quality);
|
bPlayer.setData(drunkeness, quality);
|
||||||
bPlayer.showDrunkeness(player);
|
if (BConfig.showStatusOnDrink) {
|
||||||
|
bPlayer.showDrunkeness(player);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (drunkeness > 100) {
|
if (drunkeness > 100) {
|
||||||
|
@ -167,7 +167,9 @@ public class PlayerListener implements Listener {
|
|||||||
BPlayer bplayer = BPlayer.get(player);
|
BPlayer bplayer = BPlayer.get(player);
|
||||||
if (bplayer != null) {
|
if (bplayer != null) {
|
||||||
bplayer.drainByItem(player, item.getType());
|
bplayer.drainByItem(player, item.getType());
|
||||||
bplayer.showDrunkeness(player);
|
if (BConfig.showStatusOnDrink) {
|
||||||
|
bplayer.showDrunkeness(player);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user