mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2025-06-11 13:33:54 +00:00
Add the admininfo command info TFM
This commit is contained in:
@ -0,0 +1,35 @@
|
||||
package me.totalfreedom.totalfreedommod.command;
|
||||
|
||||
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
||||
import me.totalfreedom.totalfreedommod.rank.Rank;
|
||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
|
||||
@CommandParameters(description = "Information on how to apply for admin.", usage = "/<command> [message...]", aliases = "ai")
|
||||
public class Command_admininfo extends FreedomCommand
|
||||
{
|
||||
|
||||
@Override
|
||||
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||
{
|
||||
List<String> adminInfo = ConfigEntry.ADMININFO.getStringList();
|
||||
|
||||
if (adminInfo.isEmpty())
|
||||
{
|
||||
msg("There is no admin information set in the config.", ChatColor.RED);
|
||||
}
|
||||
else
|
||||
{
|
||||
msg(FUtil.colorize(StringUtils.join(adminInfo, "\n")));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
@ -98,6 +98,7 @@ public enum ConfigEntry
|
||||
OVERLORD_IPS(List.class, "overlord_ips"),
|
||||
NOADMIN_IPS(List.class, "noadmin_ips"),
|
||||
ADMIN_ONLY_MODE(Boolean.class, "admin_only_mode"),
|
||||
ADMININFO(List.class, "admininfo"),
|
||||
AUTO_ENTITY_WIPE(Boolean.class, "auto_wipe"),
|
||||
//
|
||||
AMP_ENABLED(Boolean.class, "amp.enabled"),
|
||||
|
Reference in New Issue
Block a user