mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 01:05:38 +00:00
pls
This commit is contained in:
parent
84c0e90164
commit
aac921b283
@ -59,6 +59,7 @@
|
|||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: com.squareup.okhttp3:okhttp:3.8.1" level="project" />
|
<orderEntry type="library" scope="PROVIDED" name="Maven: com.squareup.okhttp3:okhttp:3.8.1" level="project" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: com.squareup.okio:okio:1.13.0" level="project" />
|
<orderEntry type="library" scope="PROVIDED" name="Maven: com.squareup.okio:okio:1.13.0" level="project" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: net.coreprotect:coreprotect:2.15.0" level="project" />
|
<orderEntry type="library" scope="PROVIDED" name="Maven: net.coreprotect:coreprotect:2.15.0" level="project" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sk89q.worldedit:worldedit-bukkit:7.0.0-SNAPSHOT" level="project" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sk89q.worldguard:worldguard-legacy:6.2" level="project" />
|
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sk89q.worldguard:worldguard-legacy:6.2" level="project" />
|
||||||
</component>
|
</component>
|
||||||
</module>
|
</module>
|
@ -18,7 +18,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH, blockHostConsole = true)
|
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH, blockHostConsole = true)
|
||||||
@CommandParameters(description = "Bans a player", usage = "/<command> <username> [reason] [-nrb]", aliases = "ban")
|
@CommandParameters(description = "Bans a player", usage = "/<command> <username> [reason] [-rb]", aliases = "ban")
|
||||||
public class Command_gtfo extends FreedomCommand
|
public class Command_gtfo extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -78,12 +78,12 @@ public class Command_gtfo extends FreedomCommand
|
|||||||
}
|
}
|
||||||
|
|
||||||
String reason = null;
|
String reason = null;
|
||||||
Boolean cancelRollback = false;
|
Boolean rollback = false;
|
||||||
if (args.length >= 2)
|
if (args.length >= 2)
|
||||||
{
|
{
|
||||||
if (args[args.length - 1].equals("-nrb"))
|
if (args[args.length - 1].equalsIgnoreCase("-rb"))
|
||||||
{
|
{
|
||||||
cancelRollback = true;
|
rollback = true;
|
||||||
if (args.length >= 3)
|
if (args.length >= 3)
|
||||||
{
|
{
|
||||||
reason = StringUtils.join(ArrayUtils.subarray(args, 1, args.length - 1), " ");
|
reason = StringUtils.join(ArrayUtils.subarray(args, 1, args.length - 1), " ");
|
||||||
@ -96,7 +96,7 @@ public class Command_gtfo extends FreedomCommand
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Checks if CoreProtect is loaded and installed, and skips the rollback and uses CoreProtect directly
|
// Checks if CoreProtect is loaded and installed, and skips the rollback and uses CoreProtect directly
|
||||||
if (!cancelRollback)
|
if (rollback)
|
||||||
{
|
{
|
||||||
if (!plugin.cpb.isEnabled())
|
if (!plugin.cpb.isEnabled())
|
||||||
{
|
{
|
||||||
|
@ -30,13 +30,25 @@ public class Command_tagnyan extends FreedomCommand
|
|||||||
}
|
}
|
||||||
|
|
||||||
String tagStr = tag.toString();
|
String tagStr = tag.toString();
|
||||||
for (String word : Command_tag.FORBIDDEN_WORDS)
|
|
||||||
|
if (!plugin.al.isAdmin(sender))
|
||||||
{
|
{
|
||||||
if (tagStr.contains(word))
|
final String rawTag = ChatColor.stripColor(tagStr).toLowerCase();
|
||||||
|
|
||||||
|
if (rawTag.length() > 20)
|
||||||
{
|
{
|
||||||
msg("That tag contains a forbidden word.");
|
msg("That tag is too long (Max is 20 characters).");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (String word : Command_tag.FORBIDDEN_WORDS)
|
||||||
|
{
|
||||||
|
if (rawTag.contains(word))
|
||||||
|
{
|
||||||
|
msg("That tag contains a forbidden word.");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final FPlayer data = plugin.pl.getPlayer(playerSender);
|
final FPlayer data = plugin.pl.getPlayer(playerSender);
|
||||||
|
@ -10,7 +10,7 @@ import org.bukkit.entity.Player;
|
|||||||
|
|
||||||
@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Gives you a rainbow tag", usage = "/<command> <tag>")
|
@CommandParameters(description = "Gives you a rainbow tag", usage = "/<command> <tag>")
|
||||||
public class Command_rainbowtag extends FreedomCommand
|
public class Command_tagrainbow extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -23,19 +23,24 @@ public class Command_rainbowtag extends FreedomCommand
|
|||||||
|
|
||||||
final String tag = ChatColor.stripColor(FUtil.colorize(StringUtils.join(args, " ")));
|
final String tag = ChatColor.stripColor(FUtil.colorize(StringUtils.join(args, " ")));
|
||||||
|
|
||||||
if (tag.length() > 20)
|
if (!plugin.al.isAdmin(sender))
|
||||||
{
|
{
|
||||||
msg("That tag is too long (Max is 20 characters).");
|
final String rawTag = ChatColor.stripColor(tag).toLowerCase();
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (String word : Command_tag.FORBIDDEN_WORDS)
|
if (rawTag.length() > 20)
|
||||||
{
|
|
||||||
if (tag.contains(word))
|
|
||||||
{
|
{
|
||||||
msg("That tag contains a forbidden word.");
|
msg("That tag is too long (Max is 20 characters).");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (String word : Command_tag.FORBIDDEN_WORDS)
|
||||||
|
{
|
||||||
|
if (rawTag.contains(word))
|
||||||
|
{
|
||||||
|
msg("That tag contains a forbidden word.");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
plugin.pl.getPlayer(playerSender).setTag(FUtil.rainbowify(tag));
|
plugin.pl.getPlayer(playerSender).setTag(FUtil.rainbowify(tag));
|
@ -12,7 +12,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Unbans a player", usage = "/<command> <username> [-restore]", aliases = "pardon")
|
@CommandParameters(description = "Unbans a player", usage = "/<command> <username> [-r[estore]]", aliases = "pardon")
|
||||||
public class Command_unban extends FreedomCommand
|
public class Command_unban extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ public class Command_unban extends FreedomCommand
|
|||||||
|
|
||||||
if (args.length >= 2)
|
if (args.length >= 2)
|
||||||
{
|
{
|
||||||
if (args[args.length - 1].equals("-restore"))
|
if (args[1].equalsIgnoreCase("-r") || args[1].equalsIgnoreCase("-restore"))
|
||||||
{
|
{
|
||||||
if (!plugin.cpb.isEnabled())
|
if (!plugin.cpb.isEnabled())
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user