mirror of
https://github.com/exituser/Brewery.git
synced 2026-09-17 05:28:59 +00:00
Fix Lore order when converting & 1.8 Regeneration
This commit is contained in:
@@ -97,11 +97,6 @@
|
|||||||
<id>brewery-repo</id>
|
<id>brewery-repo</id>
|
||||||
<url>https://zebradrive.de/maven/</url>
|
<url>https://zebradrive.de/maven/</url>
|
||||||
</repository>
|
</repository>
|
||||||
<repository>
|
|
||||||
<!-- Citadel -->
|
|
||||||
<id>devoted-repo</id>
|
|
||||||
<url>https://build.devotedmc.com/plugin/repository/everything/</url>
|
|
||||||
</repository>
|
|
||||||
<repository>
|
<repository>
|
||||||
<!-- bStats -->
|
<!-- bStats -->
|
||||||
<id>CodeMC</id>
|
<id>CodeMC</id>
|
||||||
@@ -113,7 +108,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.bukkit</groupId>
|
<groupId>org.bukkit</groupId>
|
||||||
<artifactId>bukkit</artifactId>
|
<artifactId>bukkit</artifactId>
|
||||||
<version>1.14.4-R0.1-SNAPSHOT</version>
|
<version>1.15-R0.1-SNAPSHOT</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
@@ -132,30 +127,6 @@
|
|||||||
<version>1.6</version>
|
<version>1.6</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>vg.civcraft.mc.citadel</groupId>
|
|
||||||
<artifactId>Citadel</artifactId>
|
|
||||||
<version>3.9.1</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<artifactId>*</artifactId>
|
|
||||||
<groupId>*</groupId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>vg.civcraft.mc.civmodcore</groupId>
|
|
||||||
<artifactId>CivModCore</artifactId>
|
|
||||||
<version>1.6.0</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<artifactId>*</artifactId>
|
|
||||||
<groupId>*</groupId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.sk89q</groupId>
|
<groupId>com.sk89q</groupId>
|
||||||
<artifactId>worldguard</artifactId>
|
<artifactId>worldguard</artifactId>
|
||||||
|
|||||||
@@ -510,6 +510,7 @@ recipes:
|
|||||||
alcohol: 14
|
alcohol: 14
|
||||||
lore:
|
lore:
|
||||||
- + &8Viel zu sauer
|
- + &8Viel zu sauer
|
||||||
|
- +++ Guter Apfelschnaps
|
||||||
|
|
||||||
whiskey:
|
whiskey:
|
||||||
name: Unschöner Whiskey/Whiskey/Scotch Whiskey
|
name: Unschöner Whiskey/Whiskey/Scotch Whiskey
|
||||||
|
|||||||
@@ -509,6 +509,7 @@ recipes:
|
|||||||
alcohol: 14
|
alcohol: 14
|
||||||
lore:
|
lore:
|
||||||
- +Sour like Acid
|
- +Sour like Acid
|
||||||
|
- +++ Good Apple Liquor
|
||||||
|
|
||||||
whiskey:
|
whiskey:
|
||||||
name: Unsightly Whiskey/Whiskey/Scotch Whiskey
|
name: Unsightly Whiskey/Whiskey/Scotch Whiskey
|
||||||
|
|||||||
@@ -516,6 +516,7 @@ recipes:
|
|||||||
alcohol: 14
|
alcohol: 14
|
||||||
lore:
|
lore:
|
||||||
- +Sour like Acid
|
- +Sour like Acid
|
||||||
|
- +++ Good Apple Liquor
|
||||||
|
|
||||||
whiskey:
|
whiskey:
|
||||||
name: Whisky disgracieux/Whiskey/Scotch Whiskey
|
name: Whisky disgracieux/Whiskey/Scotch Whiskey
|
||||||
|
|||||||
@@ -509,6 +509,7 @@ recipes:
|
|||||||
alcohol: 14
|
alcohol: 14
|
||||||
lore:
|
lore:
|
||||||
- +Sour like Acid
|
- +Sour like Acid
|
||||||
|
- +++ Good Apple Liquor
|
||||||
|
|
||||||
whiskey:
|
whiskey:
|
||||||
name: Unsightly Whiskey/Whiskey/Scotch Whiskey
|
name: Unsightly Whiskey/Whiskey/Scotch Whiskey
|
||||||
|
|||||||
@@ -513,6 +513,7 @@ recipes:
|
|||||||
alcohol: 14
|
alcohol: 14
|
||||||
lore:
|
lore:
|
||||||
- +Sour like Acid
|
- +Sour like Acid
|
||||||
|
- +++ Good Apple Liquor
|
||||||
|
|
||||||
whiskey:
|
whiskey:
|
||||||
name: Unsightly Whiskey/Whiskey/Scotch Whiskey
|
name: Unsightly Whiskey/Whiskey/Scotch Whiskey
|
||||||
|
|||||||
@@ -304,15 +304,17 @@ public class BrewLore {
|
|||||||
*/
|
*/
|
||||||
public int addOrReplaceLore(Type type, String prefix, String line) {
|
public int addOrReplaceLore(Type type, String prefix, String line) {
|
||||||
int index = type.findInLore(lore);
|
int index = type.findInLore(lore);
|
||||||
if (index == -1) {
|
|
||||||
index = BUtil.indexOfSubstring(lore, line);
|
|
||||||
}
|
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
lore.set(index, type.id + prefix + line);
|
lore.set(index, type.id + prefix + line);
|
||||||
return index;
|
return index;
|
||||||
} else {
|
|
||||||
return addLore(type, prefix, line);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Could not find Lore by type, find and replace by substring
|
||||||
|
index = BUtil.indexOfSubstring(lore, line);
|
||||||
|
if (index > -1) {
|
||||||
|
lore.remove(index);
|
||||||
|
}
|
||||||
|
return addLore(type, prefix, line);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import org.bukkit.inventory.ItemFlag;
|
|||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.inventory.meta.PotionMeta;
|
import org.bukkit.inventory.meta.PotionMeta;
|
||||||
import org.bukkit.potion.PotionData;
|
import org.bukkit.potion.PotionData;
|
||||||
|
import org.bukkit.potion.PotionEffectType;
|
||||||
import org.bukkit.potion.PotionType;
|
import org.bukkit.potion.PotionType;
|
||||||
|
|
||||||
public class PotionColor {
|
public class PotionColor {
|
||||||
@@ -75,6 +76,8 @@ public class PotionColor {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
potion.setDurability(getColorId(destillable));
|
potion.setDurability(getColorId(destillable));
|
||||||
|
// To stop 1.8 from showing the potioneffect for the color id, add a dummy Effect
|
||||||
|
meta.addCustomEffect(PotionEffectType.REGENERATION.createEffect(0, 0), true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user