attempt to fix resetplayer breaking if you dont enter an argument
(I dont know if this works, I straight up copied and pasted code lol)
This commit is contained in:
parent
5df6d4cfed
commit
8217d9be33
|
@ -16,7 +16,10 @@ public class Command_resetplayer extends FreedomCommand {
|
|||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole) {
|
||||
OfflinePlayer target = null;
|
||||
String searchString = args[0];
|
||||
|
||||
if (args.length == 0)
|
||||
{
|
||||
throw new FormatException("Invalid number of arguments.");
|
||||
}
|
||||
for (OfflinePlayer offlinePlayer : Bukkit.getOfflinePlayers()) {
|
||||
if(offlinePlayer.getName().equalsIgnoreCase(searchString)) {
|
||||
target = offlinePlayer;
|
||||
|
|
Loading…
Reference in New Issue