mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2026-06-05 02:46:54 +00:00
yay done
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
package me.totalfreedom.totalfreedommod.command;
|
||||
|
||||
import me.totalfreedom.libsdisguise.DisallowedDisguises;
|
||||
import me.totalfreedom.disguise.DisguiseBlocker;
|
||||
import me.totalfreedom.totalfreedommod.rank.Rank;
|
||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||
import org.bukkit.command.Command;
|
||||
@@ -21,8 +21,7 @@ public class Command_disguisetoggle extends FreedomCommand
|
||||
return true;
|
||||
}
|
||||
|
||||
FUtil.adminAction(sender.getName(), (DisallowedDisguises.disabled ? "Enabling" : "Disabling")
|
||||
+ " disguises", false);
|
||||
FUtil.adminAction(sender.getName(), (DisguiseBlocker.enabled ? "Disabling" : "Enabling") + " disguises", false);
|
||||
|
||||
if (plugin.ldb.isDisguisesEnabled())
|
||||
{
|
||||
@@ -34,7 +33,7 @@ public class Command_disguisetoggle extends FreedomCommand
|
||||
plugin.ldb.setDisguisesEnabled(true);
|
||||
}
|
||||
|
||||
msg("Disguises are now " + (!DisallowedDisguises.disabled ? "enabled." : "disabled."));
|
||||
msg("Disguises are now " + (DisguiseBlocker.enabled ? "enabled." : "disabled."));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -14,12 +14,12 @@ public class Command_setlimit extends FreedomCommand
|
||||
@Override
|
||||
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||
{
|
||||
int amount = 100000;
|
||||
int amount = plugin.web.getDefaultLimit();
|
||||
if (args.length > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
amount = Math.max(1, Math.min(200000, Integer.parseInt(args[0])));
|
||||
amount = Math.max(1, Math.min(plugin.web.getMaxLimit(), Integer.parseInt(args[0])));
|
||||
}
|
||||
catch (NumberFormatException ex)
|
||||
{
|
||||
|
||||
@@ -151,16 +151,18 @@ public class Command_tag extends FreedomCommand
|
||||
});
|
||||
final String outputTag = FUtil.colorize(strippedTag);
|
||||
|
||||
int tagLimit = (plugin.al.isAdmin(sender) ? 30 : 20);
|
||||
|
||||
final String rawTag = ChatColor.stripColor(strippedTag).toLowerCase();
|
||||
|
||||
if (rawTag.length() > tagLimit)
|
||||
{
|
||||
msg("That tag is too long (Max is " + String.valueOf(tagLimit) + " characters).");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!plugin.al.isAdmin(sender))
|
||||
{
|
||||
final String rawTag = ChatColor.stripColor(outputTag).toLowerCase();
|
||||
|
||||
if (rawTag.length() > 20)
|
||||
{
|
||||
msg("That tag is too long (Max is 20 characters).");
|
||||
return true;
|
||||
}
|
||||
|
||||
for (String word : FORBIDDEN_WORDS)
|
||||
{
|
||||
if (rawTag.contains(word))
|
||||
|
||||
@@ -31,16 +31,18 @@ public class Command_tagnyan extends FreedomCommand
|
||||
|
||||
String tagStr = tag.toString();
|
||||
|
||||
int tagLimit = (plugin.al.isAdmin(sender) ? 30 : 20);
|
||||
|
||||
final String rawTag = ChatColor.stripColor(tagStr).toLowerCase();
|
||||
|
||||
if (rawTag.length() > tagLimit)
|
||||
{
|
||||
msg("That tag is too long (Max is " + String.valueOf(tagLimit) + " characters).");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!plugin.al.isAdmin(sender))
|
||||
{
|
||||
final String rawTag = ChatColor.stripColor(tagStr).toLowerCase();
|
||||
|
||||
if (rawTag.length() > 20)
|
||||
{
|
||||
msg("That tag is too long (Max is 20 characters).");
|
||||
return true;
|
||||
}
|
||||
|
||||
for (String word : Command_tag.FORBIDDEN_WORDS)
|
||||
{
|
||||
if (rawTag.contains(word))
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package me.totalfreedom.totalfreedommod.command;
|
||||
|
||||
import me.totalfreedom.libsdisguise.DisallowedDisguises;
|
||||
import me.totalfreedom.disguise.DisguiseBlocker;
|
||||
import me.totalfreedom.totalfreedommod.rank.Rank;
|
||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||
import org.bukkit.command.Command;
|
||||
@@ -8,7 +8,7 @@ import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
||||
@CommandParameters(description = "Undisguise all players on the server", usage = "/<command>", aliases = "uall")
|
||||
@CommandParameters(description = "Undisguise all players on the server", usage = "/<command> [-a]", aliases = "uall")
|
||||
public class Command_undisguiseall extends FreedomCommand
|
||||
{
|
||||
|
||||
@@ -21,15 +21,22 @@ public class Command_undisguiseall extends FreedomCommand
|
||||
return true;
|
||||
}
|
||||
|
||||
if (DisallowedDisguises.disabled)
|
||||
if (!DisguiseBlocker.enabled)
|
||||
{
|
||||
msg("Disguises are not enabled.");
|
||||
return true;
|
||||
}
|
||||
|
||||
FUtil.adminAction(sender.getName(), "Undisguising all non-admins", true);
|
||||
boolean admins = false;
|
||||
|
||||
plugin.ldb.undisguiseAll(false);
|
||||
if (args.length > 0 && args[0].equalsIgnoreCase("-a"))
|
||||
{
|
||||
admins = true;
|
||||
}
|
||||
|
||||
FUtil.adminAction(sender.getName(), "Undisguising all " + (admins ? "players" : "non-admins"), true);
|
||||
|
||||
plugin.ldb.undisguiseAll(admins);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ public class Command_vanish extends FreedomCommand
|
||||
}
|
||||
if (!silent)
|
||||
{
|
||||
FUtil.bcastMsg(ChatColor.AQUA + playerSender.getName() + " is " + loginMsg);
|
||||
FUtil.bcastMsg(ChatColor.AQUA + (loginMsg.contains("%name%") ? "" : playerSender.getName() + " is ") + FUtil.colorize(loginMsg).replace("%name%", playerSender.getName()));
|
||||
FUtil.bcastMsg(playerSender.getName() + " joined the game", ChatColor.YELLOW);
|
||||
}
|
||||
if (admin.getTag() != null)
|
||||
|
||||
Reference in New Issue
Block a user