|
1 | 1 | package com.jaimemartz.playerbalancer.commands; |
2 | 2 |
|
| 3 | +import com.google.common.base.Strings; |
3 | 4 | import com.jaimemartz.playerbalancer.PlayerBalancer; |
4 | 5 | import com.jaimemartz.playerbalancer.configuration.ConfigEntries; |
5 | 6 | import com.jaimemartz.playerbalancer.connection.ConnectionIntent; |
|
13 | 14 | import net.md_5.bungee.api.chat.HoverEvent; |
14 | 15 | import net.md_5.bungee.api.connection.ProxiedPlayer; |
15 | 16 | import net.md_5.bungee.api.plugin.Command; |
16 | | -import org.apache.commons.lang3.StringUtils; |
17 | 17 |
|
18 | 18 | import java.util.Arrays; |
19 | 19 | import java.util.Map; |
@@ -64,7 +64,7 @@ public void execute(CommandSender sender, String[] args) { |
64 | 64 | String input = args[1]; |
65 | 65 | ServerSection section = plugin.getSectionManager().getByName(input); |
66 | 66 | if (section != null) { |
67 | | - sender.sendMessage(new ComponentBuilder(StringUtils.repeat('-', 53)).strikethrough(true).color(ChatColor.GRAY).create()); |
| 67 | + sender.sendMessage(new ComponentBuilder(Strings.repeat("-", 53)).strikethrough(true).color(ChatColor.GRAY).create()); |
68 | 68 |
|
69 | 69 | sender.sendMessage(new ComponentBuilder("Information of section: ") |
70 | 70 | .color(ChatColor.GRAY) |
@@ -201,7 +201,7 @@ public void execute(CommandSender sender, String[] args) { |
201 | 201 | ); |
202 | 202 | } |
203 | 203 |
|
204 | | - sender.sendMessage(new ComponentBuilder(StringUtils.repeat('-', 53)).strikethrough(true).color(ChatColor.GRAY).create()); |
| 204 | + sender.sendMessage(new ComponentBuilder(Strings.repeat("-", 53)).strikethrough(true).color(ChatColor.GRAY).create()); |
205 | 205 | } else { |
206 | 206 | MessageUtils.send(sender, ConfigEntries.UNKNOWN_SECTION_MESSAGE.get()); |
207 | 207 | } |
@@ -238,13 +238,13 @@ public void execute(CommandSender sender, String[] args) { |
238 | 238 | } |
239 | 239 | } |
240 | 240 | } else { |
241 | | - sender.sendMessage(new ComponentBuilder(StringUtils.repeat('-', 53)).strikethrough(true).color(ChatColor.GRAY).create()); |
| 241 | + sender.sendMessage(new ComponentBuilder(Strings.repeat("-", 53)).strikethrough(true).color(ChatColor.GRAY).create()); |
242 | 242 | sender.sendMessage(new ComponentBuilder("Available commands:").color(ChatColor.GRAY).create()); |
243 | 243 | sender.sendMessage(new ComponentBuilder("/section").color(ChatColor.AQUA).append(" - ").color(ChatColor.GRAY).append("Shows you this message").color(ChatColor.RED).create()); |
244 | 244 | sender.sendMessage(new ComponentBuilder("/section list").color(ChatColor.AQUA).append(" - ").color(ChatColor.GRAY).append("Tells you which sections are configured in the plugin").color(ChatColor.RED).create()); |
245 | 245 | sender.sendMessage(new ComponentBuilder("/section info <section>").color(ChatColor.AQUA).append(" - ").color(ChatColor.GRAY).append("Tells you info about the specified section").color(ChatColor.RED).create()); |
246 | 246 | sender.sendMessage(new ComponentBuilder("/section connect <section> [player]").color(ChatColor.AQUA).append(" - ").color(ChatColor.GRAY).append("Connects you or the specified player to that section").color(ChatColor.RED).create()); |
247 | | - sender.sendMessage(new ComponentBuilder(StringUtils.repeat('-', 53)).strikethrough(true).color(ChatColor.GRAY).create()); |
| 247 | + sender.sendMessage(new ComponentBuilder(Strings.repeat("-", 53)).strikethrough(true).color(ChatColor.GRAY).create()); |
248 | 248 | } |
249 | 249 | } else { |
250 | 250 | sender.sendMessage(new ComponentBuilder("You do not have permission to execute this command!").color(ChatColor.RED).create()); |
|
0 commit comments