diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdDeinvite.java b/src/main/java/com/massivecraft/factions/cmd/CmdDeinvite.java index cc269337..3aaed668 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdDeinvite.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdDeinvite.java @@ -31,9 +31,11 @@ public class CmdDeinvite extends FCommand { // Check if arg 0 == null do you don't have // `No player "null" could be found.` message. + if (context.args.get(0) == null) { FancyMessage msg = new FancyMessage(TL.COMMAND_DEINVITE_CANDEINVITE.toString()).color(ChatColor.GOLD); for (String id : context.faction.getInvites()) { + if(context.faction.getInvites().isEmpty()) return; FPlayer fp = FPlayers.getInstance().getById(id); String name = fp != null ? fp.getName() : id; msg.then(name + " ").color(ChatColor.WHITE).tooltip(TL.COMMAND_DEINVITE_CLICKTODEINVITE.format(name)).command("/" + Conf.baseCommandAliases.get(0) + " deinvite " + name); @@ -54,6 +56,7 @@ public class CmdDeinvite extends FCommand { if (you == null) { FancyMessage msg = new FancyMessage(TL.COMMAND_DEINVITE_CANDEINVITE.toString()).color(ChatColor.GOLD); for (String id : context.faction.getInvites()) { + if(context.faction.getInvites().isEmpty()) return; FPlayer fp = FPlayers.getInstance().getById(id); String name = fp != null ? fp.getName() : id; msg.then(name + " ").color(ChatColor.WHITE).tooltip(TL.COMMAND_DEINVITE_CLICKTODEINVITE.format(name)).command("/" + Conf.baseCommandAliases.get(0) + " deinvite " + name);