mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 01:05:38 +00:00
Okay I've been up for two days, I'm going to bed
This commit is contained in:
parent
da06ff50cb
commit
0657d01059
@ -185,7 +185,7 @@ public class Command_mbconfig extends FreedomCommand
|
|||||||
|
|
||||||
if (masterBuilder == null)
|
if (masterBuilder == null)
|
||||||
{
|
{
|
||||||
msg("Matser Builder not found: " + args[1]);
|
msg("Master Builder not found: " + args[1]);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,7 +66,14 @@ public class Command_playerverify extends FreedomCommand
|
|||||||
}
|
}
|
||||||
data.setEnabled(true);
|
data.setEnabled(true);
|
||||||
plugin.pv.saveVerificationData(data);
|
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;
|
return true;
|
||||||
|
|
||||||
case "disable":
|
case "disable":
|
||||||
|
@ -23,12 +23,23 @@ public class Command_tag extends FreedomCommand
|
|||||||
public static final List<String> FORBIDDEN_WORDS = Arrays.asList(
|
public static final List<String> FORBIDDEN_WORDS = Arrays.asList(
|
||||||
"admin", "owner", "moderator", "developer", "console", "dev", "staff", "mod", "sra", "tca", "sta", "sa");
|
"admin", "owner", "moderator", "developer", "console", "dev", "staff", "mod", "sra", "tca", "sta", "sa");
|
||||||
|
|
||||||
|
public boolean save = false;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
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 (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;
|
save = true;
|
||||||
args = ArrayUtils.remove(args, 0);
|
args = ArrayUtils.remove(args, 0);
|
||||||
}
|
}
|
||||||
@ -163,7 +174,7 @@ public class Command_tag extends FreedomCommand
|
|||||||
plugin.pl.getPlayer(playerSender).setTag(outputTag);
|
plugin.pl.getPlayer(playerSender).setTag(outputTag);
|
||||||
if (save)
|
if (save)
|
||||||
{
|
{
|
||||||
save(playerSender, null);
|
save(playerSender, outputTag);
|
||||||
}
|
}
|
||||||
msg("Tag set to '" + outputTag + ChatColor.GRAY + "'." + (save ? " (Saved)" : ""));
|
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)
|
public void save(Player player, String tag)
|
||||||
{
|
{
|
||||||
if (plugin.al.isAdmin(playerSender))
|
if (plugin.al.isAdmin(player))
|
||||||
{
|
{
|
||||||
Admin admin = plugin.al.getAdmin(player);
|
Admin admin = plugin.al.getAdmin(player);
|
||||||
admin.setTag(tag);
|
admin.setTag(tag);
|
||||||
plugin.al.save();
|
plugin.al.save();
|
||||||
plugin.al.updateTables();
|
plugin.al.updateTables();
|
||||||
}
|
}
|
||||||
else if (plugin.mbl.isMasterBuilder(playerSender))
|
else if (plugin.mbl.isMasterBuilder(player))
|
||||||
{
|
{
|
||||||
MasterBuilder masterBuilder = plugin.mbl.getMasterBuilder(player);
|
MasterBuilder masterBuilder = plugin.mbl.getMasterBuilder(player);
|
||||||
masterBuilder.setTag(tag);
|
masterBuilder.setTag(tag);
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
|
||||||
import me.totalfreedom.totalfreedommod.player.FPlayer;
|
import me.totalfreedom.totalfreedommod.player.FPlayer;
|
||||||
import me.totalfreedom.totalfreedommod.rank.Rank;
|
import me.totalfreedom.totalfreedommod.rank.Rank;
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
@ -16,11 +14,6 @@ import org.bukkit.entity.Player;
|
|||||||
public class Command_tagnyan extends FreedomCommand
|
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
|
@Override
|
||||||
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user