Changed some config settings and descriptions

This commit is contained in:
Sn0wStorm 2016-05-26 21:10:48 +02:00
parent d5296bdc8c
commit 85acdcdbb6
8 changed files with 283 additions and 51 deletions

View File

@ -13,24 +13,23 @@ enableHome: true
# Art des Nachhause-teleports: ['cmd: home']
# bed = Spieler wird zu seinem Spawn Bett teleportiert
# SamplePlugin = installiertes home plugin. Unterstützt: ManagerXL. Wenn dies nicht geht:
# 'cmd: home' = /home wird vom Spieler ausgelöst. Es sollte kein Verzögerungs, etc. plugin installiert sein!
# 'cmd: spawn' = /spawn wird vom Spieler ausgelöst
# 'cmd: whatever' = /whatever wird vom Spieler ausgelöst
homeType: 'cmd: home'
# Ob der Spieler nach etwas kürzerem Ausloggen an einem zufälligen Ort "aufwacht" (diese müssen durch '/br Wakeup add' von einem Admin festgelegt werden)
# Ob der Spieler nach etwas kürzerem Ausloggen an einem zufälligen Ort "aufwacht" (diese müssen durch '/brew Wakeup add' von einem Admin festgelegt werden)
# Der Spieler wacht an dem nähesten zweier zufälliger Orte aus seiner Welt auf. [true]
enableWake: true
# Ob der Spieler sich bei großer Trunkenheit teilweise nicht einloggen kann und kurz warten muss, da sein Charakter nicht reagiert [true]
# Ob der Spieler bei großer Trunkenheit mehrmals probieren muss sich einzuloggen, da sein Charakter kurz nicht reagiert [true]
enableLoginDisallow: true
# Ob der Spieler sich übertrinken kann und dann in Ohnmacht fällt (gekickt wird) und sich für einige Minuten nicht einloggen kann [true]
enableKickOnOverdrink: true
# Ob der Spieler kurz in Ohnmacht fällt (vom Server gekickt wird) wenn er die maximale Trunkenheit erreicht [false]
enableKickOnOverdrink: false
# Ob der Spieler sich bei großer Trunkenheit übergibt (unten definiertes Item aus dem Mund fallen lässt) [true]
# Das Item kann nicht aufgesammelt werden und bleibt bis zum Despawnen liegen. (Achtung: Kann nach Serverrestart aufgesammelt werden!)
# Das Item kann nicht aufgesammelt werden und bleibt bis zum Despawnen liegen.
enablePuke: true
# Item das beim Erbrechen mehrfach unaufsammelbar fallen gelassen wird [SOUL_SAND]
@ -44,9 +43,9 @@ drainItems:
# Zeit (in Tagen) die Trunkenheitsdaten nach offlinegehen eines Spielers im Speicher verbleiben, um z.B. Kater-Effekte anzuwenden. [7]
hangoverDays: 7
# Färben der Iteminformationen je nach Qualität während sie sich 1. im Fass und/oder 2. im Braustand befinden [true, false]
# Färben der Iteminformationen je nach Qualität während sie sich 1. im Fass und/oder 2. im Braustand befinden [true, true]
colorInBarrels: true
colorInBrewer: false
colorInBrewer: true
# Ob große Fässer an jedem Block geöffnet werden können, nicht nur an Zapfhahn und Schild. Bei kleinen Fässern geht dies immer. [true]
openLargeBarrelEverywhere: true
@ -55,14 +54,14 @@ openLargeBarrelEverywhere: true
logRealChat: false
# Aktiviert das Suchen nach Updates für Brewery mit der curseforge api [true]
# Wenn ein Update gefunden wurde, wird dies bei Serverstart im log angezeigt, sowie ops benachrichtigt
# Wenn ein Update gefunden wurde, wird dies bei Serverstart im log angezeigt, sowie OPs benachrichtigt
updateCheck: true
# Autosave Intervall in Minuten [3]
autosave: 3
# Config Version
version: '1.3.1'
version: '1.4'
# -- Rezepte für Getränke --
@ -70,8 +69,10 @@ version: '1.3.1'
# name: Verschiedene Namen für schlecht/mittel/gut (Farbcodes möglich: z.b. &6)
# ingredients: Auflistung von 'Material oder ID,Data/Anzahl'
# (Item-ids anstatt Material werden von Bukkit nicht mehr unterstützt und funktionieren möglicherweise in Zukunft nicht mehr!)
# Eine Liste von allen Materialien kann hier gefunden werden: http://jd.bukkit.org/beta/apidocs/org/bukkit/Material.html
# Es kann ein Data-Wert angegeben werden, weglassen ignoriert diesen beim hinzufügen einer Zutat
# Eine Liste von allen Materialien kann hier gefunden werden: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html
# Es kann ein Data-Wert (durability) angegeben werden, weglassen ignoriert diesen beim hinzufügen einer Zutat
# Wenn Vault installiert ist können normale englische Item Namen verwendet werden, anstatt Material, ID und Data!
# Vault erkennt Namen wie "Jungle Leaves" anstatt "LEAVES,3". Dies macht es viel einfacher!
# cookingtime: Zeit in Echtminuten die die Zutaten kochen müssen
# distillruns: Wie oft destilliert werden muss für vollen Alkoholgehalt (0=ohne Destillieren)
# wood: Holz des Fasses 0=alle Holzsorten 1=Birke 2=Eiche 3=Jungel 4=Fichte 5=Akazie 6=Schwarzeiche
@ -82,7 +83,8 @@ version: '1.3.1'
# alcohol: Alkoholgehalt 0-100 in absoluter Menge bei perfektem Getränk (wird dem Spieler hinzugefügt, bei 100 = tot)
# effects: Auflistung Effekt/Level/Dauer Besonderere Trank-Effekte beim Trinken, Dauer in sek.
# Ein 'X' an den Namen anhängen, um ihn zu verbergen. Bsp: 'POISONX/2/10' (WEAKNESS, INCREASE_DAMAGE, SLOW und SPEED sind immer verborgen.)
# Mögliche Effekte: http://jd.bukkit.org/rb/apidocs/org/bukkit/potion/PotionEffectType.html
# Effekte sind ab der 1.9 immer verborgen, wegen Änderungen an den Tränken.
# Mögliche Effekte: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/potion/PotionEffectType.html
# Minimale und Maximale Level/Dauer können durch "-" festgelegt werden, Bsp: 'SPEED/1-2/30-40' = Level 1 und 30 sek minimal, Level 2 und 40 sek maximal
# Diese Bereiche funktionieren auch umgekehrt, Bsp: 'POISON/3-1/20-5' für abschwächende Effekte bei guter Qualität
# Längste mögliche Effektdauer: 1638 sek. Es muss keine Dauer für Effekte mit sofortiger Wirkung angegeben werden.
@ -96,6 +98,9 @@ recipes:
- 264/1
- INK_SACK,3/20
- 5,1/8
- BEDROCK/1
# - Jungle Leaves/64 # Nur mit Vault
# - Green Dye/6 # Nur mit Vault
cookingtime: 3
distillruns: 2
wood: 4
@ -277,11 +282,13 @@ distortCommands:
- /whisper
- /reply
- /r
- /t
- /tell
# Geschriebenen Text auf Schildern bei Trunkenheit verändern [false]
distortSignText: false
# Text, der zwischen diesen Buchstaben steht, wird nicht verändert ("," als Trennung verwenden) (Liste) [- '[,]']
# Im Chat geschriebener Text, der zwischen diesen Buchstaben steht, wird nicht verändert ("," als Trennung verwenden) (Liste) [- '[,]']
distortBypass:
- '*,*'
- '[,]'

View File

@ -13,24 +13,23 @@ enableHome: true
# Type of the home-teleport: ['cmd: home']
# bed = Player will be teleported to his spawn bed
# SamplePlugin = installed home plugin. Supports: ManagerXL. If not available:
# 'cmd: home' = /home will be executed by the player. He has to have permissions for it without any delay!
# 'cmd: spawn' = /spawn will be executed by the player.
# 'cmd: whatever' = /whatever will be executed by the player.
homeType: 'cmd: home'
# If the player "wakes up" at a random place when offline for some time while drinking (the places have to be defined with '/br Wakeup add' through an admin)
# If the player "wakes up" at a random place when offline for some time while drinking (the places have to be defined with '/brew Wakeup add' through an admin)
# The Player wakes at the nearest of two random places of his world [true]
enableWake: true
# If the Player may get some logins denied, when his character is drunk [true]
# If the Player may have to try multiple times when logging in while extremely drunk [true]
enableLoginDisallow: true
# If the Player faints (gets kicked) for some minutes if he overdrinks [true]
enableKickOnOverdrink: true
# If the Player faints shortly (gets kicked from the server) if he drinks the max amount of alcohol possible [false]
enableKickOnOverdrink: false
# If the Player vomits on high drunkeness (drops item defined below) [true]
# The item can not be collected and stays on the ground until it despawns. (Warning: May be collected after Server restart!)
# The item can not be collected and stays on the ground until it despawns.
enablePuke: true
# Item that is dropped multiple times uncollectable when puking [SOUL_SAND]
@ -44,22 +43,22 @@ drainItems:
# Time (in days) that drunkeness-data stays in memory after a player goes offline, to apply hangover etc. [7]
hangoverDays: 7
# Color the Item information (lore) depending on quality while it is 1. in a barrel and/or 2. in a brewing stand [true, false]
# Color the Item information (lore) depending on quality while it is 1. in a barrel and/or 2. in a brewing stand [true, true]
colorInBarrels: true
colorInBrewer: false
colorInBrewer: true
# If a Large Barrel can be opened by clicking on any of its blocks, not just Spigot or Sign. This is always true for Small Barrels. [true]
openLargeBarrelEverywhere: true
# Enable checking for Updates, Checks the curseforge api for updates to Brewery [true]
# If an Update is found a Message is logged on Server-start and displayed to ops joining the game
# If an Update is found a Message is logged on Server-start and displayed to OPs joining the game
updateCheck: true
# Autosave interval in minutes [3]
autosave: 3
# Config Version
version: '1.3.1'
version: '1.4'
# -- Recipes for Potions --
@ -67,8 +66,10 @@ version: '1.3.1'
# name: Different names for bad/normal/good (Formatting codes possible: such as &6)
# ingredients: List of 'material or id,data/amount'
# (Item-ids instead of material are deprecated by bukkit and may not work in the future!)
# A list of materials can be found here: http://jd.bukkit.org/beta/apidocs/org/bukkit/Material.html
# You can specify a data value, omitting it will ignore the data value of the added ingredient
# A list of materials can be found here: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html
# You can specify a data (durability) value, omitting it will ignore the data value of the added ingredient
# If Vault is installed normal names can be used instead of material or id, so using Vault is highly recommended.
# Vault will recognize things like "Jungle Leaves" instead of "LEAVES,3"
# cookingtime: Time in real minutes ingredients have to boil
# distillruns: How often it has to be distilled for full alcohol (0=without distilling)
# wood: Wood of the barrel 0=any 1=Birch 2=Oak 3=Jungle 4=Spruce 5=Acacia 6=Dark Oak
@ -79,7 +80,8 @@ version: '1.3.1'
# alcohol: Absolute amount of alcohol 0-100 in a perfect potion (will be added directly to the player, where 100 means fainting)
# effects: List of effect/level/duration Special potion-effect when drinking, duration in sek.
# Suffix name with 'X' to hide effect from label. Sample: 'POISONX/2/10' (WEAKNESS, INCREASE_DAMAGE, SLOW and SPEED are always hidden.)
# Possible Effects: http://jd.bukkit.org/rb/apidocs/org/bukkit/potion/PotionEffectType.html
# Effects are always hidden in 1.9 and newer, because of changes in the potion mechanics.
# Possible Effects: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/potion/PotionEffectType.html
# Level or Duration ranges may be specified with a "-", ex. 'SPEED/1-2/30-40' = lvl 1 and 30 sec at worst and lvl 2 and 40 sec at best
# Ranges also work high-low, ex. 'POISON/3-1/20-5' for weaker effects at good quality.
# Highest possible Duration: 1638 sec. Instant Effects dont need any duration specified.
@ -93,6 +95,9 @@ recipes:
- 264/1
- INK_SACK,3/20
- 5,1/8
- BEDROCK/1
# - Jungle Leaves/64 # Only with Vault
# - Green Dye/6 # Only with Vault
cookingtime: 3
distillruns: 2
wood: 4
@ -278,11 +283,13 @@ distortCommands:
- /whisper
- /reply
- /r
- /t
- /tell
# Distort the Text written on a Sign while drunk [false]
distortSignText: false
# Enclose a text with these Letters to bypass Chat Distortion (Use "," as Separator) (list) [- '[,]']
# Enclose a Chat text with these Letters to bypass Chat Distortion (Use "," as Separator) (list) [- '[,]']
distortBypass:
- '*,*'
- '[,]'

View File

@ -13,24 +13,23 @@ enableHome: true
# Type de la téléportation /home: ['cmd: home']
# bed = Le joueur se téléportera à son lit de réapparition.
# SamplePlugin = Le plugin /home installé. Supporte: ManagerXL. Si non disponible:
# 'cmd: home' = /home sera exécuté par le joueur. Il devra avoir la permission sans le délai pour y parvenir!
# 'cmd: spawn' = /spawn sera exécuté par le joueur.
# 'cmd: whatever' = /whatever sera exécuté par le joueur. (Peu importe)
homeType: 'cmd: home'
# Si le joueur se "réveille" à un point aléatoire sur la carte à sa connexion, pendant un excès d'alccol (Les points de réveil doivent être ajoutés avec '/br Wakeup add' via un administrateur.)
# Si le joueur se "réveille" à un point aléatoire sur la carte à sa connexion, pendant un excès d'alccol (Les points de réveil doivent être ajoutés avec '/brew Wakeup add' via un administrateur.)
# Le joueur se réveillera aléatoirement parmis les deux points de "réveil" les plus proches de lui [true]
enableWake: true
# Si le joueur reçoit des connexions refusées au serveur s'il est ivre.[true]
enableLoginDisallow: false
# Si le joueur reçoit des connexions refusées au serveur s'il est ivre. [true]
enableLoginDisallow: true
# Si le joueur s'évanouit (il sera kické) lorsqu'il boit trop d'alcool[true]
# Si le joueur s'évanouit (il sera kické) lorsqu'il boit trop d'alcool [false]
enableKickOnOverdrink: false
# Si le joueur vomit en cas d'alcoolémie élevée (Le type d'objet "droppé" est configurable en dessous) [true]
# L'objet ne peut pas être collecté et reste sur le sol jusqu'à ce qu'il disparaisse (ATTENTION: Peut être collecté si le serveur redémarre!)
# L'objet ne peut pas être collecté et reste sur le sol jusqu'à ce qu'il disparaisse
enablePuke: true
# L'objet utilisé pour représenter le vomit [SOUL_SAND]
@ -44,22 +43,22 @@ drainItems:
# Temps (en jours) pour que les données d'ivresse restent sauvergardées lorsque le joueur est déconnecté, pour appliquer les effets. [7]
hangoverDays: 7
# Colorer les informations d'objets (lore) au dépend de la qualité dans un tonneau et/ou dans un stand de brassage (l'alambic) [true, false]
# Colorer les informations d'objets (lore) au dépend de la qualité dans un tonneau et/ou dans un stand de brassage (l'alambic) [true, true]
colorInBarrels: true
colorInBrewer: false
colorInBrewer: true
# Si le grand tonneau peut être ouvert en cliquant sur n'importe quel bloc, non seulement le robinet ou le panneau. Toujours "true" pour les petits tonneaux. [true]
openLargeBarrelEverywhere: true
# Enable checking for Updates, Checks the curseforge api for updates to Brewery [true]
# If an Update is found a Message is logged on Server-start and displayed to ops joining the game
# If an Update is found a Message is logged on Server-start and displayed to OPs joining the game
updateCheck: true
# Intervale de la sauvegarde automatique en minutes [3]
autosave: 3
# Version de configuration
version: '1.3.1'
version: '1.4'
# -- Recette pour les boissons --
@ -68,8 +67,10 @@ version: '1.3.1'
# ingredients: Liste des 'matériaux ou id,data/montant'
# (Les id d'objets à la place des matériaux sont obsolètes pour bukkit et pourraient ne pas fonctionner dans le futur!)
# Ex: 'SUGAR_CANE'
# Une liste des matériaux peuvent-être trouvés ici: http://jd.bukkit.org/beta/apidocs/org/bukkit/Material.html
# Vous pouvez spécifier une data (Ex: 5:3 -> Planche de bois de jungle), si vous ne le faites pas la data ne sera pas prise en compte (Ex : 5 -> Bois en général)
# Une liste des matériaux peuvent-être trouvés ici: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html
# Vous pouvez spécifier une data (Ex: 5,3 -> Planche de bois de jungle), si vous ne le faites pas la data ne sera pas prise en compte (Ex : 5 -> Bois en général)
# If Vault is installed normal names can be used instead of material or id, so using Vault is highly recommended.
# Vault will recognize things like "Jungle Leaves" instead of "5,3"
# cookingtime: Temps en minutes réelles durant lesquelles les ingrédients devront bouillir
# distillruns: Combien de fois le breuvage devra être distillé pour un alcool de qualité (0=Ne pas distiller)
# wood: Type de bois du baril 0=aucun 1=Bouleau 2=Chêne 3=Jungle 4=Pin 5=Acacia 6=Chêne Noir
@ -81,7 +82,8 @@ version: '1.3.1'
# effects: Liste des effets/durée en secondes lors de la consommation.
# Rajouter le suffixe 'X' pour le cacher du label. Exemple: POISONX/10
# (WEAKNESS, INCREASE_DAMAGE, SLOW et SPEED sont toujours cachés.)
# Effets posssible: http://jd.bukkit.org/rb/apidocs/org/bukkit/potion/PotionEffectType.html
# Effects are always hidden in 1.9 and newer, because of changes in the potion mechanics.
# Effets posssible: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/potion/PotionEffectType.html
# POUR LES EFFETS EN FONCTIONS DE LA QUALITE : Les Niveaux (I ou II) ou les Intervalles de durées d'effets doivent être spécifiés avec un "-".
# Ex: 'SPEED/1-2/30-40' => Vitesse niveau 1 et durée de 30 sec pour la pire qualité, et niveau 2 et durée de 40 sec pour la meilleure.
# Il est aussi possible de faire l'inverse, c'est à dire que le schéma "Meilleure qualité, meilleur effets" soit "Meilleure qualité, effets moins puissants.
@ -98,6 +100,9 @@ recipes:
- 264/1
- INK_SACK,3/20
- 5,1/8
- BEDROCK/1
# - Jungle Leaves/64 # Only with Vault
# - Green Dye/6 # Only with Vault
cookingtime: 3
distillruns: 2
wood: 4
@ -283,6 +288,8 @@ distortCommands:
- /whisper
- /reply
- /r
- /t
- /tell
# Distordre le texte sur les panneaux pendant l'ivresse [false]
distortSignText: false

View File

@ -159,11 +159,11 @@ public class BPlayer {
// Player has drunken too much
public void drinkCap(Player player) {
quality = getQuality() * 100;
drunkeness = 100;
if (overdrinkKick && !player.hasPermission("brewery.bypass.overdrink")) {
passOut(player);
} else {
quality = getQuality() * 100;
drunkeness = 100;
addPuke(player, 60 + (int) (Math.random() * 60.0));
P.p.msg(player, P.p.languageReader.get("Player_CantDrink"));
}
@ -416,7 +416,7 @@ public class BPlayer {
loc.add(direction);
Item item = player.getWorld().dropItem(loc, new ItemStack(pukeItem));
item.setVelocity(direction);
item.setPickupDelay(Integer.MAX_VALUE);
item.setPickupDelay(32767); // Item can never be picked up when pickup delay is 32767
}

View File

@ -63,6 +63,11 @@ public class BRecipe {
if (durability == -1 && vaultItem.getSubTypeId() != 0) {
durability = vaultItem.getSubTypeId();
}
if (mat == Material.LEAVES) {
if (durability > 3) {
durability -= 4; // Vault has leaves with higher durability
}
}
}
} catch (Exception e) {
P.p.errorLog("Could not check vault for Item Name");

View File

@ -35,7 +35,7 @@ import org.bukkit.plugin.java.JavaPlugin;
public class P extends JavaPlugin {
public static P p;
public static final String configVersion = "1.3.1";
public static final String configVersion = "1.4";
public static boolean debug;
public static boolean useUUID;
public static boolean use1_9;

View File

@ -125,7 +125,16 @@ public class ConfigUpdater {
fromVersion = "1.3.1";
}
if (!fromVersion.equals("1.3.1")) {
if (fromVersion.equals("1.3.1")) {
if (lang.equals("de")) {
update131de();
} else {
update131en();
}
fromVersion = "1.4";
}
if (!fromVersion.equals("1.4")) {
P.p.log(P.p.languageReader.get("Error_ConfigUpdate", fromVersion));
return;
}
@ -593,6 +602,7 @@ public class ConfigUpdater {
}
// Update de from 1.3 to 1.3.1
private void update13de() {
updateVersion("1.3.1");
@ -617,6 +627,8 @@ public class ConfigUpdater {
addLines(index, lines);
}
}
// Update en from 1.3 to 1.3.1
private void update13en() {
updateVersion("1.3.1");
@ -642,5 +654,202 @@ public class ConfigUpdater {
}
}
// Update de from 1.3.1 to 1.4
private void update131de() {
updateVersion("1.4");
int index = indexOfStart("# SamplePlugin = installiertes home plugin. Unterstützt: ManagerXL.");
if (index != -1) {
config.remove(index);
}
index = indexOfStart("# Ob der Spieler nach etwas kürzerem Ausloggen an einem zufälligen Ort \"aufwacht\" (diese müssen durch '/br Wakeup add");
if (index != -1) {
setLine(index, "# Ob der Spieler nach etwas kürzerem Ausloggen an einem zufälligen Ort \"aufwacht\" (diese müssen durch '/brew Wakeup add' von einem Admin festgelegt werden)");
}
index = indexOfStart("# Ob der Spieler sich bei großer Trunkenheit teilweise nicht einloggen kann und kurz warten muss, da sein Charakter nicht reagiert");
if (index != -1) {
setLine(index, "# Ob der Spieler bei großer Trunkenheit mehrmals probieren muss sich einzuloggen, da sein Charakter kurz nicht reagiert [true]");
}
index = indexOfStart("# Ob der Spieler sich übertrinken kann und dann in Ohnmacht fällt (gekickt wird)");
if (index != -1) {
setLine(index, "# Ob der Spieler kurz in Ohnmacht fällt (vom Server gekickt wird) wenn er die maximale Trunkenheit erreicht [false]");
}
index = indexOfStart("# Das Item kann nicht aufgesammelt werden und bleibt bis zum Despawnen liegen. (Achtung:");
if (index != -1) {
setLine(index, "# Das Item kann nicht aufgesammelt werden und bleibt bis zum Despawnen liegen.");
}
index = indexOfStart("# Färben der Iteminformationen je nach Qualität während sie sich 1. im Fass und/oder 2. im Braustand befinden [true, false]");
if (index != -1) {
setLine(index, "# Färben der Iteminformationen je nach Qualität während sie sich 1. im Fass und/oder 2. im Braustand befinden [true, true]");
}
index = indexOfStart("# Wenn ein Update gefunden wurde, wird dies bei Serverstart im log angezeigt, sowie ops benachrichtigt");
if (index != -1) {
setLine(index, "# Wenn ein Update gefunden wurde, wird dies bei Serverstart im log angezeigt, sowie OPs benachrichtigt");
}
index = indexOfStart("# Eine Liste von allen Materialien kann hier gefunden werden: http://jd.bukkit.org");
if (index != -1) {
setLine(index, "# Eine Liste von allen Materialien kann hier gefunden werden: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html");
}
String[] lines = new String[] { "# Wenn Vault installiert ist können normale englische Item Namen verwendet werden, anstatt Material, ID und Data!",
"# Vault erkennt Namen wie \"Jungle Leaves\" anstatt \"LEAVES,3\". Dies macht es viel einfacher!" };
index = indexOfStart("# Es kann ein Data-Wert angegeben werden, weglassen");
if (index != -1) {
setLine(index, "# Es kann ein Data-Wert (durability) angegeben werden, weglassen ignoriert diesen beim hinzufügen einer Zutat");
addLines(index + 1, lines);
} else {
index = indexOfStart("# Eine Liste von allen Materialien kann hier");
if (index == -1) {
index = indexOfStart("# cookingtime: ") - 1;
if (index == -2) {
index = indexOfStart("# ingredients: Auflistung von");
if (index == -1) {
index = indexOfStart("# -- Rezepte für Getränke --") + 1;
if (index == 0) {
index = indexOfStart("# -- Verschiedene Einstellungen --");
}
}
}
}
if (index == -1) {
appendLines(lines);
} else {
addLines(index + 1, lines);
}
}
lines = new String[] { "# Effekte sind ab der 1.9 immer verborgen, wegen Änderungen an den Tränken." };
index = indexOfStart("# Mögliche Effekte: http://jd.bukkit.org");
if (index != -1) {
setLine(index, "# Mögliche Effekte: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/potion/PotionEffectType.html");
addLines(index, lines);
} else {
index = indexOfStart("# Ein 'X' an den Namen anhängen, um");
if (index == -1) {
index = indexOfStart("# effects: ");
if (index == -1) {
index = indexOfStart("# -- Rezepte für Getränke --") + 1;
}
}
if (index == 0) {
appendLines(lines);
} else {
addLines(index + 1, lines);
}
}
index = indexOfStart("# Text, der zwischen diesen Buchstaben");
if (index != -1) {
setLine(index, "# Im Chat geschriebener Text, der zwischen diesen Buchstaben steht, wird nicht verändert (\",\" als Trennung verwenden) (Liste) [- '[,]']");
}
}
// Update en from 1.3.1 to 1.4
private void update131en() {
updateVersion("1.4");
int index = indexOfStart("# SamplePlugin = installed home plugin. Supports: ManagerXL.");
if (index != -1) {
config.remove(index);
}
index = indexOfStart("# If the player \"wakes up\" at a random place when offline for some time while drinking (the places have to be defined with '/br Wakeup add'");
if (index != -1) {
setLine(index, "# If the player \"wakes up\" at a random place when offline for some time while drinking (the places have to be defined with '/brew Wakeup add' through an admin)");
}
index = indexOfStart("# If the Player may get some logins denied, when his character is drunk");
if (index != -1) {
setLine(index, "# If the Player may have to try multiple times when logging in while extremely drunk [true]");
}
index = indexOfStart("# If the Player faints (gets kicked) for some minutes if he overdrinks");
if (index != -1) {
setLine(index, "# If the Player faints shortly (gets kicked from the server) if he drinks the max amount of alcohol possible [false]");
}
index = indexOfStart("# The item can not be collected and stays on the ground until it despawns. (Warning:");
if (index != -1) {
setLine(index, "# The item can not be collected and stays on the ground until it despawns.");
}
index = indexOfStart("# Color the Item information (lore) depending on quality while it is 1. in a barrel and/or 2. in a brewing stand [true, false]");
if (index != -1) {
setLine(index, "# Color the Item information (lore) depending on quality while it is 1. in a barrel and/or 2. in a brewing stand [true, true]");
}
index = indexOfStart("# If an Update is found a Message is logged on Server-start and displayed to ops joining the game");
if (index != -1) {
setLine(index, "# If an Update is found a Message is logged on Server-start and displayed to OPs joining the game");
}
index = indexOfStart("# A list of materials can be found here: http://jd.bukkit.org");
if (index != -1) {
setLine(index, "# A list of materials can be found here: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html");
}
String[] lines = new String[] { "# If Vault is installed normal names can be used instead of material or id, so using Vault is highly recommended.",
"# Vault will recognize things like \"Jungle Leaves\" instead of \"LEAVES,3\"" };
index = indexOfStart("# You can specify a data value, omitting");
if (index != -1) {
setLine(index, "# You can specify a data (durability) value, omitting it will ignore the data value of the added ingredient");
addLines(index + 1, lines);
} else {
index = indexOfStart("# A list of materials can be found");
if (index == -1) {
index = indexOfStart("# cookingtime: Time in real minutes") - 1;
if (index == -2) {
index = indexOfStart("# ingredients: ");
if (index == -1) {
index = indexOfStart("# -- Recipes for Potions --") + 1;
if (index == 0) {
index = indexOfStart("# -- Settings --");
}
}
}
}
if (index == -1) {
appendLines(lines);
} else {
addLines(index + 1, lines);
}
}
lines = new String[] { "# Effects are always hidden in 1.9 and newer, because of changes in the potion mechanics." };
index = indexOfStart("# Possible Effects: http://jd.bukkit.org");
if (index != -1) {
setLine(index, "# Possible Effects: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/potion/PotionEffectType.html");
addLines(index, lines);
} else {
index = indexOfStart("# Suffix name with");
if (index == -1) {
index = indexOfStart("# effects: ");
if (index == -1) {
index = indexOfStart("# -- Recipes for Potions --") + 1;
}
}
if (index == 0) {
appendLines(lines);
} else {
addLines(index + 1, lines);
}
}
index = indexOfStart("# Enclose a text with these Letters to bypass Chat Distortion");
if (index != -1) {
setLine(index, "# Enclose a Chat text with these Letters to bypass Chat Distortion (Use \",\" as Separator) (list) [- '[,]']");
}
}
}

View File

@ -1,9 +1,6 @@
package com.dre.brewery.listeners;
import com.dre.brewery.BRecipe;
import com.dre.brewery.Barrel;
import com.dre.brewery.Brew;
import com.dre.brewery.P;
import com.dre.brewery.*;
import com.dre.brewery.integration.LogBlockBarrel;
import org.bukkit.Bukkit;
import org.bukkit.Material;
@ -269,7 +266,7 @@ public class InventoryListener implements Listener {
// block the pickup of items where getPickupDelay is > 1000 (puke)
@EventHandler(ignoreCancelled = true)
public void onInventoryPickupItem(InventoryPickupItemEvent event){
if (event.getItem().getPickupDelay() > 1000) {
if (event.getItem().getPickupDelay() > 1000 && event.getItem().getItemStack().getType() == BPlayer.pukeItem) {
event.setCancelled(true);
}
}