mirror of
https://github.com/TheDeus-Group/TFM-4.3-Reloaded.git
synced 2024-12-23 07:34:56 +00:00
Allow developers to have "developers" in set tags
This commit is contained in:
parent
35bee2d9e8
commit
952070827a
1 changed files with 15 additions and 9 deletions
|
@ -9,13 +9,8 @@ import org.bukkit.ChatColor;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.permissions.Permission;
|
|
||||||
import org.bukkit.permissions.PermissionAttachment;
|
|
||||||
import org.bukkit.permissions.PermissionAttachmentInfo;
|
|
||||||
|
|
||||||
import javax.swing.text.html.HTML;
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@CommandPermissions(level = AdminLevel.OP, source = SourceType.BOTH)
|
@CommandPermissions(level = AdminLevel.OP, source = SourceType.BOTH)
|
||||||
|
@ -149,11 +144,17 @@ public class Command_tag extends FreedomCommand {
|
||||||
{
|
{
|
||||||
if (rawTag.contains(word))
|
if (rawTag.contains(word))
|
||||||
{
|
{
|
||||||
|
{
|
||||||
|
if(word.equals("developer") && Utilities.DEVELOPERS.contains(sender_p.getName())) {
|
||||||
|
PlayerData.getPlayerData(sender_p).setTag(outputTag);
|
||||||
|
playerMsg("Tag set to '" + outputTag + ChatColor.GRAY + "'.");
|
||||||
|
} else
|
||||||
playerMsg("That tag contains a forbidden word.");
|
playerMsg("That tag contains a forbidden word.");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
PlayerData.getPlayerData(sender_p).setTag(outputTag);
|
PlayerData.getPlayerData(sender_p).setTag(outputTag);
|
||||||
playerMsg("Tag set to '" + outputTag + ChatColor.GRAY + "'.");
|
playerMsg("Tag set to '" + outputTag + ChatColor.GRAY + "'.");
|
||||||
|
@ -187,6 +188,11 @@ public class Command_tag extends FreedomCommand {
|
||||||
{
|
{
|
||||||
if (rawTag.contains(word))
|
if (rawTag.contains(word))
|
||||||
{
|
{
|
||||||
|
if(word.equals("developer") && Utilities.DEVELOPERS.contains(sender_p.getName())) {
|
||||||
|
PlayerData.getPlayerData(sender_p).setTag(outputTag);
|
||||||
|
TagConfiguration.saveTag(sender_p.getUniqueId().toString(), outputTag);
|
||||||
|
playerMsg("Tag set to '" + outputTag + ChatColor.GRAY + "'. (saved)");
|
||||||
|
} else
|
||||||
playerMsg("That tag contains a forbidden word.");
|
playerMsg("That tag contains a forbidden word.");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue