TotalFreedomMod/src/main/java/me/totalfreedom/totalfreedommod/command/Command_staffinfo.java

35 lines
1.2 KiB
Java
Raw Normal View History

2018-07-26 07:10:54 +00:00
package me.totalfreedom.totalfreedommod.command;
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;
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)
@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)
{
List<String> staffInfo = ConfigEntry.STAFF_INFO.getStringList();
2018-07-26 07:10:54 +00:00
if (staffInfo.isEmpty())
2018-07-26 07:10:54 +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
{
msg(FUtil.colorize(StringUtils.join(staffInfo, "\n")));
2018-07-26 07:10:54 +00:00
}
return true;
}
}