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,14 +30,26 @@ public class Command_tagnyan extends FreedomCommand
|
|||||||
}
|
}
|
||||||
|
|
||||||
String tagStr = tag.toString();
|
String tagStr = tag.toString();
|
||||||
|
|
||||||
|
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)
|
for (String word : Command_tag.FORBIDDEN_WORDS)
|
||||||
{
|
{
|
||||||
if (tagStr.contains(word))
|
if (rawTag.contains(word))
|
||||||
{
|
{
|
||||||
msg("That tag contains a forbidden word.");
|
msg("That tag contains a forbidden word.");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
final FPlayer data = plugin.pl.getPlayer(playerSender);
|
final FPlayer data = plugin.pl.getPlayer(playerSender);
|
||||||
data.setTag(tagStr);
|
data.setTag(tagStr);
|
||||||
|
@ -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,7 +23,11 @@ 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))
|
||||||
|
{
|
||||||
|
final String rawTag = ChatColor.stripColor(tag).toLowerCase();
|
||||||
|
|
||||||
|
if (rawTag.length() > 20)
|
||||||
{
|
{
|
||||||
msg("That tag is too long (Max is 20 characters).");
|
msg("That tag is too long (Max is 20 characters).");
|
||||||
return true;
|
return true;
|
||||||
@ -31,12 +35,13 @@ public class Command_rainbowtag extends FreedomCommand
|
|||||||
|
|
||||||
for (String word : Command_tag.FORBIDDEN_WORDS)
|
for (String word : Command_tag.FORBIDDEN_WORDS)
|
||||||
{
|
{
|
||||||
if (tag.contains(word))
|
if (rawTag.contains(word))
|
||||||
{
|
{
|
||||||
msg("That tag contains a forbidden word.");
|
msg("That tag contains a forbidden word.");
|
||||||
return true;
|
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