From 784d7dd273af9fc1367aeb16ed9b2087146e8244 Mon Sep 17 00:00:00 2001 From: aBooDyy <35378106+aBooDyy@users.noreply.github.com> Date: Thu, 9 Apr 2020 18:43:21 +0300 Subject: [PATCH] Fixes ecloud placeholders command (#201) * fix parsing placeholders on ecloud placeholders command * try catch on registering expansions Co-authored-by: aBo0oDyy <35378106+aBo0oDyy@users.noreply.github.com> --- .../placeholderapi/commands/ExpansionCloudCommands.java | 6 +++++- .../me/clip/placeholderapi/expansion/ExpansionManager.java | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/main/java/me/clip/placeholderapi/commands/ExpansionCloudCommands.java b/src/main/java/me/clip/placeholderapi/commands/ExpansionCloudCommands.java index dc519d4..a10e8fa 100644 --- a/src/main/java/me/clip/placeholderapi/commands/ExpansionCloudCommands.java +++ b/src/main/java/me/clip/placeholderapi/commands/ExpansionCloudCommands.java @@ -241,7 +241,11 @@ public class ExpansionCloudCommands implements CommandExecutor { } else { message.then(color(placeholders.get(i) + "&b, &f")); } - message.tooltip(PlaceholderAPI.setPlaceholders(p, placeholders.get(i))); + try { + message.tooltip(PlaceholderAPI.setPlaceholders(p, placeholders.get(i))); + } catch (Exception e) { + + } } message.send(p); diff --git a/src/main/java/me/clip/placeholderapi/expansion/ExpansionManager.java b/src/main/java/me/clip/placeholderapi/expansion/ExpansionManager.java index 3c82471..b679c83 100644 --- a/src/main/java/me/clip/placeholderapi/expansion/ExpansionManager.java +++ b/src/main/java/me/clip/placeholderapi/expansion/ExpansionManager.java @@ -170,7 +170,12 @@ public final class ExpansionManager { for (Class klass : subs) { PlaceholderExpansion ex = createInstance(klass); if (ex != null) { - registerExpansion(ex); + try { + registerExpansion(ex); + } catch (Exception e) { + plugin.getLogger().info("Couldn't register " + ex.getIdentifier() + " expansion"); + e.printStackTrace(); + } } } }