Add the admininfo command info TFM

This commit is contained in:
ZeroEpoch1969 2018-07-26 00:10:54 -07:00
parent 551a0b2317
commit 7a2b7ec78b
No known key found for this signature in database
GPG key ID: A7BAB4E14F089CF3
3 changed files with 45 additions and 0 deletions

View file

@ -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;
}
}

View file

@ -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"),

View file

@ -283,6 +283,15 @@ announcer:
- 'Racism, nazism, and sexism are strictly forbidden!'
- 'Join our Discord server! Link: https://discordapp.com/invite/XXjmAmV/'
# What to display in the admininfo command.
admininfo:
- '&bHow to apply for admin on the TotalFreedom Server:'
- ' &6- Do not ask for admin in game'
- ' &2- Be helpful within the server'
- ' &6- Report those breaking the rules'
- ' &2- And apply on our forums at the link:'
- ' &9www.totalfreedom.boards.net'
# Famous players - cannot be banned by username
famous_players:
- honeydew