2018-07-26 07:10:54 +00:00
|
|
|
package me.totalfreedom.totalfreedommod.command;
|
|
|
|
|
2018-07-31 07:01:29 +00:00
|
|
|
import java.util.List;
|
2018-07-26 07:10:54 +00:00
|
|
|
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
|
|
|
import me.totalfreedom.totalfreedommod.rank.Rank;
|
|
|
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
2019-07-28 06:04:16 +00:00
|
|
|
import org.apache.commons.lang.StringUtils;
|
2018-07-26 07:10:54 +00:00
|
|
|
import org.bukkit.ChatColor;
|
|
|
|
import org.bukkit.command.Command;
|
|
|
|
import org.bukkit.command.CommandSender;
|
|
|
|
import org.bukkit.entity.Player;
|
|
|
|
|
|
|
|
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
|
2020-12-04 00:28:53 +00:00
|
|
|
@CommandParameters(description = "Information on how to apply for admin.", usage = "/<command>", aliases = "si,ai,staffinfo")
|
|
|
|
public class Command_admininfo extends FreedomCommand
|
2018-07-26 07:10:54 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
|
|
|
{
|
2020-12-04 00:28:53 +00:00
|
|
|
List<String> adminInfo = ConfigEntry.ADMIN_INFO.getStringList();
|
2018-07-26 07:10:54 +00:00
|
|
|
|
2020-12-04 00:28:53 +00:00
|
|
|
if (adminInfo.isEmpty())
|
2018-07-26 07:10:54 +00:00
|
|
|
{
|
2020-12-04 00:28:53 +00:00
|
|
|
msg("The admin information section of the config.yml file has not been configured.", ChatColor.RED);
|
2018-07-26 07:10:54 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2020-12-04 00:28:53 +00:00
|
|
|
msg(FUtil.colorize(StringUtils.join(adminInfo, "\n")));
|
2018-07-26 07:10:54 +00:00
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
2020-12-04 00:28:53 +00:00
|
|
|
}
|