mirror of
https://github.com/DieReicheErethons/Brewery.git
synced 2024-11-25 12:05:16 +01:00
parent
0815caf553
commit
53ecc5c3c0
@ -728,7 +728,7 @@ public class Brew {
|
||||
public void colorBrew(PotionMeta meta, ItemStack potion, boolean destillable) {
|
||||
if (P.use1_9) {
|
||||
meta.addItemFlags(ItemFlag.HIDE_POTION_EFFECTS);
|
||||
if (P.use1_12) {
|
||||
if (P.use1_11) {
|
||||
// BasePotionData was only used for the Color, so starting with 1.12 we can use setColor instead
|
||||
meta.setColor(getColor());
|
||||
} else {
|
||||
|
@ -42,7 +42,7 @@ public class P extends JavaPlugin {
|
||||
public static boolean debug;
|
||||
public static boolean useUUID;
|
||||
public static boolean use1_9;
|
||||
public static boolean use1_12;
|
||||
public static boolean use1_11;
|
||||
public static boolean use1_13;
|
||||
public static boolean updateCheck;
|
||||
|
||||
@ -76,7 +76,7 @@ public class P extends JavaPlugin {
|
||||
String v = Bukkit.getBukkitVersion();
|
||||
useUUID = !v.matches("(^|.*[^.\\d])1\\.[0-6]([^\\d].*|$)") && !v.matches("(^|.*[^.\\d])1\\.7\\.[0-5]([^\\d].*|$)");
|
||||
use1_9 = !v.matches("(^|.*[^.\\d])1\\.[0-8]([^\\d].*|$)");
|
||||
use1_12 = !v.matches("(^|.*[^.\\d])1\\.1[0-1]([^\\d].*|$)") && !v.matches("(^|.*[^.\\d])1\\.[0-9]([^\\d].*|$)");
|
||||
use1_11 = !v.matches("(^|.*[^.\\d])1\\.10([^\\d].*|$)") && !v.matches("(^|.*[^.\\d])1\\.[0-9]([^\\d].*|$)");
|
||||
use1_13 = !v.matches("(^|.*[^.\\d])1\\.1[0-2]([^\\d].*|$)") && !v.matches("(^|.*[^.\\d])1\\.[0-9]([^\\d].*|$)");
|
||||
|
||||
// load the Config
|
||||
|
@ -124,8 +124,8 @@ public class InventoryListener implements Listener {
|
||||
case 1:
|
||||
// Custom potion but not for distilling. Stop any brewing and cancel this task
|
||||
if (stand.getBrewingTime() > 0) {
|
||||
if (P.use1_12) {
|
||||
// The trick below doesnt work in 1.12, but we dont need it anymore
|
||||
if (P.use1_11) {
|
||||
// The trick below doesnt work in 1.11, but we dont need it anymore
|
||||
// This should only happen with older Brews that have been made with the old Potion Color System
|
||||
stand.setBrewingTime(Short.MAX_VALUE);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user