mirror of
https://github.com/TheDeus-Group/TFM-4.3-Reloaded.git
synced 2024-05-15 03:01:18 +00:00
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 a new issue