Better use of StringBuilder

This commit is contained in:
Draycia 2019-06-10 11:10:14 -07:00
parent 4860e3f8bf
commit 64a6389ebf
No known key found for this signature in database
GPG Key ID: 22737D719CBB43C8

View File

@ -40,7 +40,7 @@ import static me.clip.placeholderapi.util.Msg.msg;
public class ExpansionCloudCommands implements CommandExecutor { public class ExpansionCloudCommands implements CommandExecutor {
private PlaceholderAPIPlugin plugin; private final PlaceholderAPIPlugin plugin;
public ExpansionCloudCommands(PlaceholderAPIPlugin instance) { public ExpansionCloudCommands(PlaceholderAPIPlugin instance) {
plugin = instance; plugin = instance;
@ -387,11 +387,11 @@ public class ExpansionCloudCommands implements CommandExecutor {
sb.append("&aYou have the latest version of this expansion\n\n"); sb.append("&aYou have the latest version of this expansion\n\n");
} }
sb.append("&bAuthor&7: &f" + expansion.getAuthor() + "\n"); sb.append("&bAuthor&7: &f").append(expansion.getAuthor()).append("\n");
sb.append("&bVerified&7: &f" + expansion.isVerified() + "\n"); sb.append("&bVerified&7: &f").append(expansion.isVerified()).append("\n");
sb.append("&bLatest version&7: &f" + expansion.getVersion().getVersion() + "\n"); sb.append("&bLatest version&7: &f").append(expansion.getVersion().getVersion()).append("\n");
sb.append("&bLast updated&7: &f" + expansion.getTimeSinceLastUpdate() + " ago\n"); sb.append("&bLast updated&7: &f").append(expansion.getTimeSinceLastUpdate()).append(" ago\n");
sb.append("\n" + expansion.getDescription()); sb.append("\n").append(expansion.getDescription());
String msg = color( String msg = color(
"&b" + (i + 1) + "&7: " + (expansion.shouldUpdate() ? "&6" "&b" + (i + 1) + "&7: " + (expansion.shouldUpdate() ? "&6"