ShowStatusOnDrink config option

This commit is contained in:
Sn0wStorm 2020-11-04 16:56:11 +01:00
parent ec624ab3c7
commit c8a7a56ab9
14 changed files with 41 additions and 3 deletions

View File

@ -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.
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.
drainItems:
- BREAD/4

View File

@ -38,6 +38,9 @@ pukeItem: SOUL_SAND
# If the item despawn time was changed in the spigot.yml, the pukeDespawntime changes as well.
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)
drainItems:
- BREAD/4

View File

@ -39,6 +39,9 @@ pukeItem: SOUL_SAND
# If the item despawn time was changed in the spigot.yml, the pukeDespawntime changes as well.
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)
drainItems:
- BREAD/4

View File

@ -38,6 +38,9 @@ pukeItem: SOUL_SAND
# Se il tempo di scomparsa viene cambiato in spigot.yml anche pukeDespawntime cambia.
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)
drainItems:
- BREAD/4

View File

@ -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.
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.
drainItems:
- Bread/4

View File

@ -38,6 +38,9 @@ pukeItem: Soul_Sand
# If the item despawn time was changed in the spigot.yml, the pukeDespawntime changes as well.
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)
drainItems:
- Bread/4

View File

@ -38,6 +38,9 @@ pukeItem: Soul_Sand
# If the item despawn time was changed in the spigot.yml, the pukeDespawntime changes as well.
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)
drainItems:
- Bread/4

View File

@ -39,6 +39,9 @@ pukeItem: Soul_Sand
# If the item despawn time was changed in the spigot.yml, the pukeDespawntime changes as well.
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)
drainItems:
- Bread/4

View File

@ -38,6 +38,9 @@ pukeItem: Soul_Sand
# Se il tempo di scomparsa viene cambiato in spigot.yml anche pukeDespawntime cambia.
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)
drainItems:
- Bread/4

View File

@ -40,6 +40,9 @@ pukeItem: Soul_Sand
# 如果spigot.yml中的物品消失时间被变更, 此处也会变更.
pukeDespawntime: 60
# Display his drunkeness to the player when he drinks a brew or eats a drainItem [true]
showStatusOnDrink: true
# 解酒物/解酒强度. 降低玩家一定程度的醉酒程度, 解救强度为百分数.(下列)
drainItems:
- Bread/4

View File

@ -200,7 +200,9 @@ public class BPlayer {
bPlayer.drinkCap(player);
}
bPlayer.syncToSQL(false);
bPlayer.showDrunkeness(player);
if (BConfig.showStatusOnDrink) {
bPlayer.showDrunkeness(player);
}
return true;
}

View File

@ -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);

View File

@ -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) {

View File

@ -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);
}
}
}
}