From 81850daa0d0646c158e8d8c866866c8cbbd77a7b Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Tue, 29 Aug 2017 22:43:00 +1000 Subject: [PATCH] Remove title fade in + minor texture fix --- .../java/com/boydti/fawe/bukkit/BukkitPlayer.java | 12 +++++++++--- .../main/java/com/boydti/fawe/util/TextureUtil.java | 9 +++++++-- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/bukkit/src/main/java/com/boydti/fawe/bukkit/BukkitPlayer.java b/bukkit/src/main/java/com/boydti/fawe/bukkit/BukkitPlayer.java index e83c4c2c..1ee8524b 100644 --- a/bukkit/src/main/java/com/boydti/fawe/bukkit/BukkitPlayer.java +++ b/bukkit/src/main/java/com/boydti/fawe/bukkit/BukkitPlayer.java @@ -62,10 +62,16 @@ public class BukkitPlayer extends FawePlayer { public void sendTitle(String title, String sub) { try { - Method methodSendTitle = Player.class.getDeclaredMethod("sendTitle", String.class, String.class); - methodSendTitle.invoke(parent, ChatColor.GOLD + title, ChatColor.GOLD + sub); + Method methodSendTitle = Player.class.getDeclaredMethod("sendTitle", String.class, String.class, int.class, int.class); + methodSendTitle.invoke(parent, ChatColor.GOLD + title, ChatColor.GOLD + sub, 0, 70, 20); return; - } catch (Throwable ignore) {} + } catch (Throwable ignore) { + try { + Method methodSendTitle = Player.class.getDeclaredMethod("sendTitle", String.class, String.class); + methodSendTitle.invoke(parent, ChatColor.GOLD + title, ChatColor.GOLD + sub); + return; + } catch (Throwable ignore2) {} + } if (console == null) { console = Bukkit.getConsoleSender(); Bukkit.getServer().dispatchCommand(console, "gamerule sendCommandFeedback false"); diff --git a/core/src/main/java/com/boydti/fawe/util/TextureUtil.java b/core/src/main/java/com/boydti/fawe/util/TextureUtil.java index 150ce1d1..05cc4f75 100644 --- a/core/src/main/java/com/boydti/fawe/util/TextureUtil.java +++ b/core/src/main/java/com/boydti/fawe/util/TextureUtil.java @@ -502,12 +502,17 @@ public class TextureUtil { Gson gson = new Gson(); if (folder.exists()) { // Get all the jar files - for (File file : folder.listFiles(new FilenameFilter() { + File[] files = folder.listFiles(new FilenameFilter() { @Override public boolean accept(File dir, String name) { return name.endsWith(".jar"); } - })) { + }); + if (files.length == 0) { + throw new FileNotFoundException("Please create a `FastAsyncWorldEdit/textures` folder with `.minecraft/versions` jar or mods in it." + + "If the file exists, please make sure the server has read access to the directory"); + } + for (File file : files) { ZipFile zipFile = new ZipFile(file); BundledBlockData bundled = BundledBlockData.getInstance();