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-08-15 06:44:57 +00:00
|
|
|
@CommandParameters(description = "Information on how to apply for admin.", usage = "/<command>", aliases = "si")
|
|
|
|
public class Command_staffinfo 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-08-15 06:44:57 +00:00
|
|
|
List<String> staffInfo = ConfigEntry.STAFF_INFO.getStringList();
|
2018-07-26 07:10:54 +00:00
|
|
|
|
2020-08-15 06:44:57 +00:00
|
|
|
if (staffInfo.isEmpty())
|
2018-07-26 07:10:54 +00:00
|
|
|
{
|
2020-08-15 06:44:57 +00:00
|
|
|
msg("The staff information section of the config.yml file has not been configured.", ChatColor.RED);
|
2018-07-26 07:10:54 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2020-08-15 06:44:57 +00:00
|
|
|
msg(FUtil.colorize(StringUtils.join(staffInfo, "\n")));
|
2018-07-26 07:10:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|