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>
This commit is contained in:
aBooDyy 2020-04-09 18:43:21 +03:00 committed by GitHub
parent d26561eaeb
commit 784d7dd273
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 2 deletions

View File

@ -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);

View File

@ -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();
}
}
}
}