From f66d8f9511a84b82f01501e9635c784bdda2c819 Mon Sep 17 00:00:00 2001 From: Sn0wStorm Date: Tue, 15 Jun 2021 16:45:41 +0200 Subject: [PATCH] Small oversights --- README.md | 4 ++-- src/com/dre/brewery/BPlayer.java | 4 ++-- src/com/dre/brewery/BSealer.java | 3 ++- src/com/dre/brewery/P.java | 3 ++- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 4d4552af..9d4a5e38 100644 --- a/README.md +++ b/README.md @@ -6,9 +6,9 @@ *** -###Find the Project Page on [Spigot](https://www.spigotmc.org/resources/brewery.3082/) or [Bukkit](https://dev.bukkit.org/projects/brewery) +#### Find the Project Page on [Spigot](https://www.spigotmc.org/resources/brewery.3082/) or [Bukkit](https://dev.bukkit.org/projects/brewery) -###Also see [Wiki](https://github.com/DieReicheErethons/Brewery/wiki) | [Releases](https://github.com/DieReicheErethons/Brewery/releases) | [Changelog](https://github.com/DieReicheErethons/Brewery/wiki/changelog) | [Commits](https://github.com/DieReicheErethons/Brewery/commits/master) +#### Also see [Wiki](https://github.com/DieReicheErethons/Brewery/wiki) | [Releases](https://github.com/DieReicheErethons/Brewery/releases) | [Changelog](https://github.com/DieReicheErethons/Brewery/wiki/changelog) | [Commits](https://github.com/DieReicheErethons/Brewery/commits/master) *** diff --git a/src/com/dre/brewery/BPlayer.java b/src/com/dre/brewery/BPlayer.java index 053e4095..3cf379f9 100644 --- a/src/com/dre/brewery/BPlayer.java +++ b/src/com/dre/brewery/BPlayer.java @@ -303,7 +303,7 @@ public boolean sendDrunkenessMessage(Player player) { } b.append("§7]"); final String text = b.toString(); - if (hangover) { + if (hangover && P.use1_11) { P.p.getServer().getScheduler().scheduleSyncDelayedTask(P.p, () -> player.sendTitle("", text, 30, 100, 90), 160); return false; } @@ -615,7 +615,7 @@ public static void puke(Player player) { Item item = player.getWorld().dropItem(loc, new ItemStack(BConfig.pukeItem)); item.setVelocity(direction); item.setPickupDelay(32767); // Item can never be picked up when pickup delay is 32767 - item.setMetadata("brewery_puke", new FixedMetadataValue(P.getInstance(), true)); + item.setMetadata("brewery_puke", new FixedMetadataValue(P.p, true)); if (P.use1_14) item.setPersistent(false); // No need to save Puke items int pukeDespawntime = BConfig.pukeDespawntime; diff --git a/src/com/dre/brewery/BSealer.java b/src/com/dre/brewery/BSealer.java index 7bba58aa..7ab15f9f 100644 --- a/src/com/dre/brewery/BSealer.java +++ b/src/com/dre/brewery/BSealer.java @@ -109,8 +109,9 @@ public static boolean isBSealer(Block block) { if (smoker.getCustomName() != null) { if (smoker.getCustomName().equals("§e" + P.p.languageReader.get("Etc_SealingTable"))) { return true; - } else + } else { return smoker.getPersistentDataContainer().has(TAG_KEY, PersistentDataType.BYTE); + } } } return false; diff --git a/src/com/dre/brewery/P.java b/src/com/dre/brewery/P.java index 773216fe..93b8fa32 100644 --- a/src/com/dre/brewery/P.java +++ b/src/com/dre/brewery/P.java @@ -174,7 +174,8 @@ public void onEnable() { p.getServer().getScheduler().runTaskTimer(p, new CauldronParticles(), 1, 1); } - if (BConfig.updateCheck) { + // Disable Update Check for older mc versions + if (use1_14 && BConfig.updateCheck) { try { p.getServer().getScheduler().runTaskLaterAsynchronously(p, new UpdateChecker(), 135); } catch (Exception e) {