mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-30 02:05:41 +00:00
Add the admininfo command info TFM
This commit is contained in:
parent
551a0b2317
commit
7a2b7ec78b
@ -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"),
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user