mirror of
https://github.com/TotalFreedomMC/TFGuilds.git
synced 2024-06-28 00:30:36 +00:00
7bd956e55b
- add guildlist - fix invite guild issue where it says "your invitation has expired" even if you accepted the invitation
31 lines
1 KiB
Java
31 lines
1 KiB
Java
package me.totalfreedom.tfguilds.command;
|
|
|
|
import me.totalfreedom.tfguilds.util.GBase;
|
|
import me.totalfreedom.tfguilds.util.GUtil;
|
|
import org.apache.commons.lang.StringUtils;
|
|
import org.bukkit.ChatColor;
|
|
import org.bukkit.command.Command;
|
|
import org.bukkit.command.CommandExecutor;
|
|
import org.bukkit.command.CommandSender;
|
|
|
|
import java.util.List;
|
|
|
|
public class GuildListCommand extends GBase implements CommandExecutor
|
|
{
|
|
@Override
|
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args)
|
|
{
|
|
List<String> guilds = GUtil.getGuilds();
|
|
|
|
if (guilds.isEmpty())
|
|
{
|
|
sender.sendMessage(ChatColor.RED + "Nobody has made a guild yet.");
|
|
return true;
|
|
}
|
|
|
|
sender.sendMessage(GUtil.color("&2-=-=-=- &aGuild List (Total: " + guilds.size() + ") &2-=-=-=-"));
|
|
sender.sendMessage(GUtil.color("&2- &a" + StringUtils.join(guilds, ",\n&2- &a")));
|
|
sender.sendMessage(GUtil.color("&2-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-"));
|
|
return true;
|
|
}
|
|
} |