mirror of
https://github.com/TheDeus-Group/TFM-4.3-Reloaded.git
synced 2024-05-15 04:11:17 +00:00
Fixed the issue with the tax syntax as per #1768 and removed the original hard coded blocked tag list and moved to the config file
This commit is contained in:
parent
a19f554838
commit
13ca59c7d5
|
@ -1,7 +1,9 @@
|
|||
package me.totalfreedom.totalfreedommod.command;
|
||||
|
||||
import java.util.Arrays;
|
||||
import com.google.common.collect.Lists;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
||||
import me.totalfreedom.totalfreedommod.player.FPlayer;
|
||||
import me.totalfreedom.totalfreedommod.rank.Rank;
|
||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||
|
@ -12,18 +14,17 @@ import org.bukkit.command.CommandSender;
|
|||
import org.bukkit.entity.Player;
|
||||
|
||||
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
|
||||
@CommandParameters(description = "Sets yourself a prefix", usage = "/<command> <set <tag..> | off | clear <player> | clearall>")
|
||||
@CommandParameters(description = "Sets yourself a prefix", usage = "/<command> <set <tag> | off | clear <player> | clearall | list>")
|
||||
public class Command_tag extends FreedomCommand
|
||||
{
|
||||
|
||||
public static final List<String> FORBIDDEN_WORDS = Arrays.asList(new String[]
|
||||
{
|
||||
"admin", "owner", "moderator", "developer", "console"
|
||||
});
|
||||
public static final List<String> FORBIDDEN_WORDS = Lists.newArrayList();
|
||||
|
||||
@Override
|
||||
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||
{
|
||||
FORBIDDEN_WORDS.addAll((Collection<? extends String>) ConfigEntry.BLOCKED_TAGS.getList());
|
||||
|
||||
if (args.length == 1)
|
||||
{
|
||||
if ("list".equalsIgnoreCase(args[0]))
|
||||
|
|
|
@ -83,6 +83,7 @@ public enum ConfigEntry
|
|||
FAMOUS_PLAYERS(List.class, "famous_players"),
|
||||
OVERLORD_IPS(List.class, "overlord_ips"),
|
||||
NOADMIN_IPS(List.class, "noadmin_ips"),
|
||||
BLOCKED_TAGS(List.class, "blocked_tags"),
|
||||
ADMIN_ONLY_MODE(Boolean.class, "admin_only_mode"),
|
||||
AUTO_ENTITY_WIPE(Boolean.class, "auto_wipe");
|
||||
//
|
||||
|
|
|
@ -336,4 +336,11 @@ overlord_ips:
|
|||
- 107.191.101.27
|
||||
- 178.62.117.94
|
||||
- 141.101.104.243
|
||||
|
||||
|
||||
# Tags that may not be set by players
|
||||
blocked_tags:
|
||||
- admin
|
||||
- moderator
|
||||
- owner
|
||||
- developer
|
||||
- console
|
Loading…
Reference in a new issue