Okay I've been up for two days, I'm going to bed

This commit is contained in:
ZeroEpoch1969 2018-07-31 01:03:12 -07:00
parent da06ff50cb
commit 0657d01059
No known key found for this signature in database
GPG Key ID: A7BAB4E14F089CF3
4 changed files with 24 additions and 13 deletions

View File

@ -185,7 +185,7 @@ public class Command_mbconfig extends FreedomCommand
if (masterBuilder == null)
{
msg("Matser Builder not found: " + args[1]);
msg("Master Builder not found: " + args[1]);
return true;
}

View File

@ -66,7 +66,14 @@ public class Command_playerverify extends FreedomCommand
}
data.setEnabled(true);
plugin.pv.saveVerificationData(data);
msg("Enabled Discord verification. Please type /linkdiscord to link a Discord account.", ChatColor.GREEN);
if (data.getDiscordId() != null)
{
msg("Re-enabled Discord verification.", ChatColor.GREEN);
}
else
{
msg("Enabled Discord verification. Please type /linkdiscord to link a Discord account.", ChatColor.GREEN);
}
return true;
case "disable":

View File

@ -23,12 +23,23 @@ public class Command_tag extends FreedomCommand
public static final List<String> FORBIDDEN_WORDS = Arrays.asList(
"admin", "owner", "moderator", "developer", "console", "dev", "staff", "mod", "sra", "tca", "sta", "sa");
public boolean save = false;
@Override
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
{
boolean save = false;
if (args.length < 1)
{
return false;
}
if (args[0].equals("-s") || args[0].equals("-save"))
{
if (!plugin.al.isAdmin(playerSender) && !plugin.mbl.isMasterBuilder(playerSender) && !plugin.pv.getVerificationPlayer(playerSender).getEnabled())
{
msg("Only admins, Master Builders, and players with verification enabled can save their tags.", ChatColor.RED);
return true;
}
save = true;
args = ArrayUtils.remove(args, 0);
}
@ -163,7 +174,7 @@ public class Command_tag extends FreedomCommand
plugin.pl.getPlayer(playerSender).setTag(outputTag);
if (save)
{
save(playerSender, null);
save(playerSender, outputTag);
}
msg("Tag set to '" + outputTag + ChatColor.GRAY + "'." + (save ? " (Saved)" : ""));
@ -182,14 +193,14 @@ public class Command_tag extends FreedomCommand
public void save(Player player, String tag)
{
if (plugin.al.isAdmin(playerSender))
if (plugin.al.isAdmin(player))
{
Admin admin = plugin.al.getAdmin(player);
admin.setTag(tag);
plugin.al.save();
plugin.al.updateTables();
}
else if (plugin.mbl.isMasterBuilder(playerSender))
else if (plugin.mbl.isMasterBuilder(player))
{
MasterBuilder masterBuilder = plugin.mbl.getMasterBuilder(player);
masterBuilder.setTag(tag);

View File

@ -1,7 +1,5 @@
package me.totalfreedom.totalfreedommod.command;
import java.util.Arrays;
import java.util.List;
import me.totalfreedom.totalfreedommod.player.FPlayer;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FUtil;
@ -16,11 +14,6 @@ import org.bukkit.entity.Player;
public class Command_tagnyan extends FreedomCommand
{
public static final List<String> FORBIDDEN_WORDS = Arrays.asList(new String[]
{
"admin", "owner", "moderator", "developer", "console", "SRA", "TCA", "SA"
});
@Override
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
{