TotalFreedomMod/src/main/java/me/totalfreedom/totalfreedommod/command/Command_cage.java

169 lines
5.4 KiB
Java
Raw Normal View History

package me.totalfreedom.totalfreedommod.command;
2011-10-19 00:37:00 +00:00
2019-01-29 04:57:41 +00:00
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import me.totalfreedom.totalfreedommod.player.FPlayer;
Release 2021.06 (#97) * Update Command_ride.java * ok, done (FS-156) * Fixes FS-137 * grammar fix * Remove a number of wipe commands we don't want anyway We shouldn't be wiping any of this data within the server now anyway so let's not tempt fate again. * Why overcomplicating things is a horrifically bad idea (#55) The longer I look into this plugin's code, the angrier I will become. This fixes 2 bugs in the /potion command: - Fixes non-admins being able to clear other players - Fixes NPE caused when trying to add potion effects to players who are not on the server as a non-admin. Both of these issues are caused by overcomplicating seemingly simple solutions, hence the name of this commit. Co-authored-by: Ryan <Wild1145@users.noreply.github.com> Co-authored-by: Nathan Curran <30569566+Focusvity@users.noreply.github.com> * Bug fixes, improvements, and removals (FS-192) (#46) * Three fixes * Fixes /tempban throwing a NullPointerException when trying to get a player who isn't on the server but was in the past * Fixes /tempban banning players for 24 hours regardless of the duration defined * Fixes /list -t throwing a NullPointerException when performed from a non-player source (such as Telnet) * Removes hubworld entriely * Configurable blacklists for tag, muted commands, and wildcard Changes: * Moves globally blocked commands to the `global` subsection of the original `blocked_commands` section. You *will* need to update your configurations * /wildcard's command blacklist is now configurable under the `wildcard` section in `blocked_commands`. * The commands muted players can't use are now configurable under the `muted` section in `blocked_commands`. * Removes some commented-out globally blocked command entries. Co-authored-by: Ryan <Wild1145@users.noreply.github.com> * Switched from -c to -ci (#63) Resolves FS-219 * Added new dependency to allow TFM to compile (#65) * Name change for Fleek (#64) * Add //g to blocked commands (#62) Co-authored-by: Nathan Curran <30569566+Focusvity@users.noreply.github.com> * Small modification to new TFGuilds (FS-255) (#67) * Calculate the player count without offline players (FS-247) (#68) Co-authored-by: Ryan <Wild1145@users.noreply.github.com> * Use long instead of int and use offset to check time (FS-181) (#69) * Use long instead of int and use offset to check time (FS-181) * Remove star import * Addresses FS-224 (#70) * Continuation on that notes thing (#74) I forgot to remove the dependency after I removed the code that used JSONMessage. This fixes that by removing both the repository and the dependency from the pom file. * Updated permissions to re-baseline with the dev server (#75) Updating this to be based off of the dev server as it seems this has not been updated in some time. Primary purpose is to add the crackshot bypass removal for everyone (Though allow admins to bypass) and to add a start of network manager perms in the hopes it makes it more usable going forward. * Two fixes, one commit To kill two birds with one stone, I've done two fixes in this commit. - Fixes issue that caused quiet warns to behave improperly (e.g. the warnings wouldn't increment if quiet) - Added WARN to the PunishmentType list. * Update EntityWiper.java * FS-27 * FS-26 * FS-25 * Code quality and consistency improvements Here's all the changes I've made in this commit: - Resolves FS-44 (AutoEject.java) - Resolves FS-45 (BlockBlocker.java) - Resolves FS-47 and FS-48 (InteractBlocker.java) - Resolves FS-49 (Command_cage.java) - Resolves FS-50 (Command_manageshop.java) - Resolves FS-51 (Command_notes.java) - Resolves FS-52 (Command_potion.java) - Resolves FS-53 (Command_tag.java) - Resolves FS-55 (ItemFun.java) - Resolves FS-56 (Module_list.java) - Resolves FS-57 (Module_players.java) - Removes redundant code from InteractBlocker.java - Misc. code consistency corrections (global) * FS-54 * Shut up Codacy * FS-201 * Simple fix * Even more punishment log types Here's what I've changed in this commit: - Adds /blockcmd to the punishment log (FS-239) - Adds /blockedit and /blockpvp to the punishment log (FS-240) - Adds /cage to the punishment log (FS-241) - Adds /orbit to the punishment log (FS-242) - Changes the order of operations in some commands to be a bit more consistent * Order of operations fix * ez (#77) * Start building Java 16 (#84) * Start building Java 16 * Re-apply Fleek's change * Removed the shitty Github auto formatted white space. * Update to the maven build in Github workflows Given TravisCI has started to charge, I guess this might be what we move back to using as our main way to verify if something can actually build. * Update maven.yml * Delete .travis.yml * Adds /seed command (FS-225) (#85) * Create Command_seed.java * Addresses requested changes * My IDE decided to try to "fix" things with *s in imports Co-authored-by: Ryan <Wild1145@users.noreply.github.com> * Use 'getPlayer()' to prevent NPE (FS-159) (#87) Co-authored-by: Ryan <Wild1145@users.noreply.github.com> * 2 bugfixes - Fixes FS-309 by checking if a material provided is actually a block before caging someone. - Fixes a bug that causes the command to throw an ArrayOutOfBoundsException if one were to use a command like `/cage player1 block`. * Temporarily re-naming /clearchat to /cleanchat (#91) * Temporarily re-naming /clearchat to /cleanchat Due to another plugin which currently doesn't quite have all the permissions working, this command is not currently able to be executed as it stands. * Shhh I know I'm an idiot * Let's actually do dependency uplifts (#89) * Bump release to 2021.06-RC01 * Bump to release version We're good to go! Co-authored-by: Video <videogamesm12@gmail.com> Co-authored-by: Elmon11 <elmon11bussiness@gmail.com> Co-authored-by: Nathan Curran <30569566+Focusvity@users.noreply.github.com> Co-authored-by: Paldiu <pawereus@gmail.com>
2021-08-15 00:06:21 +00:00
import me.totalfreedom.totalfreedommod.punishments.Punishment;
import me.totalfreedom.totalfreedommod.punishments.PunishmentType;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.ChatColor;
2011-10-19 00:37:00 +00:00
import org.bukkit.GameMode;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
2020-09-28 03:17:01 +00:00
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
2020-05-29 10:14:21 +00:00
@CommandParameters(description = "Place a cage around someone with certain blocks, or someone's player head.", usage = "/<command> <purge | <partialname> [head | block] [playername | blockname]")
public class Command_cage extends FreedomCommand
2011-10-19 00:37:00 +00:00
{
public boolean run(final CommandSender sender, final Player playerSender, final Command cmd, final String commandLabel, final String[] args, final boolean senderIsConsole)
{
if (args.length == 0)
{
return false;
}
2020-05-29 10:14:21 +00:00
String skullName = null;
if (args[0].equalsIgnoreCase("purge"))
{
FUtil.adminAction(sender.getName(), "Uncaging all players", true);
for (Player player : server.getOnlinePlayers())
{
final FPlayer fPlayer = plugin.pl.getPlayer(player);
fPlayer.getCageData().setCaged(false);
2013-09-26 00:33:44 +00:00
}
return true;
}
2020-05-29 10:14:21 +00:00
Player player = getPlayer(args[0]);
if (player == null)
{
Right, so this change applies only to commands. For the sake of code consistency, I tried to change as many as possible to use `FreedomCommand.msg` instead of `CommandSender.sendMessage` for their messages. Here are a list of the files containing those changes: * Command_adminworld.java * Command_adventure.java * Command_banip.java * Command_blockedit.java * Command_blockpvp.java * Command_cage.java * Command_cartsit.java * Command_clearchat.java * Command_clearinventory.java * Command_commandlist.java * Command_creative.java * Command_deop.java * Command_deopall.java * Command_dispfill.java * Command_doom.java * Command_gcmd.java * Command_hubworld.java * Command_inspect.java * Command_list.java * Command_lockup.java * Command_manageshop.java * Command_manuallyverify.java * Command_masterbuilderworld.java * Command_mbconfig.java * Command_moblimiter.java * Command_mp44.java * Command_mute.java * Command_nickfilter.java * Command_op.java * Command_opall.java * Command_opme.java * Command_potion.java (Also corrected the inconsistent "player not found" message's color) * Command_rank.java * Command_ride.java * Command_saconfig.java * Command_scare.java * Command_setplayerlimit.java * Command_settotalvotes.java * Command_smite.java * Command_spectator.java * Command_survival.java * Command_unblockcmd.java * Command_uncage.java * Command_unmute.java * Command_verifynoadmin.java Here are some commands I added functionality to: * Command_dispfill.java: Added some code that hooks into the CoreProtect API to log the items being removed from and added into the dispensers. * Command_setlever.java: Added some code that hooks into the CoreProtect API to log the levers being interacted with. Here's a command I fixed a critical bug in: * Command_setlever.java
2021-04-05 23:13:26 +00:00
msg(PLAYER_NOT_FOUND);
return true;
}
2020-05-29 10:14:21 +00:00
final FPlayer fPlayer = plugin.pl.getPlayer(player);
2020-07-22 03:56:18 +00:00
if (fPlayer.getCageData().isCaged())
{
Right, so this change applies only to commands. For the sake of code consistency, I tried to change as many as possible to use `FreedomCommand.msg` instead of `CommandSender.sendMessage` for their messages. Here are a list of the files containing those changes: * Command_adminworld.java * Command_adventure.java * Command_banip.java * Command_blockedit.java * Command_blockpvp.java * Command_cage.java * Command_cartsit.java * Command_clearchat.java * Command_clearinventory.java * Command_commandlist.java * Command_creative.java * Command_deop.java * Command_deopall.java * Command_dispfill.java * Command_doom.java * Command_gcmd.java * Command_hubworld.java * Command_inspect.java * Command_list.java * Command_lockup.java * Command_manageshop.java * Command_manuallyverify.java * Command_masterbuilderworld.java * Command_mbconfig.java * Command_moblimiter.java * Command_mp44.java * Command_mute.java * Command_nickfilter.java * Command_op.java * Command_opall.java * Command_opme.java * Command_potion.java (Also corrected the inconsistent "player not found" message's color) * Command_rank.java * Command_ride.java * Command_saconfig.java * Command_scare.java * Command_setplayerlimit.java * Command_settotalvotes.java * Command_smite.java * Command_spectator.java * Command_survival.java * Command_unblockcmd.java * Command_uncage.java * Command_unmute.java * Command_verifynoadmin.java Here are some commands I added functionality to: * Command_dispfill.java: Added some code that hooks into the CoreProtect API to log the items being removed from and added into the dispensers. * Command_setlever.java: Added some code that hooks into the CoreProtect API to log the levers being interacted with. Here's a command I fixed a critical bug in: * Command_setlever.java
2021-04-05 23:13:26 +00:00
msg("That player is already caged.", ChatColor.RED);
2020-07-22 03:56:18 +00:00
return true;
}
2020-05-29 10:14:21 +00:00
2013-08-25 23:08:53 +00:00
Material outerMaterial = Material.GLASS;
Material innerMaterial = Material.AIR;
if (args.length >= 2 && args[1] != null)
{
final String s = args[1];
switch (s)
{
case "head":
{
2018-07-25 02:08:29 +00:00
outerMaterial = Material.PLAYER_HEAD;
if (args.length >= 3)
{
skullName = args[2];
}
2018-07-25 02:08:29 +00:00
else
{
outerMaterial = Material.SKELETON_SKULL;
}
break;
2013-08-25 23:08:53 +00:00
}
case "block":
{
Release 2021.06 (#97) * Update Command_ride.java * ok, done (FS-156) * Fixes FS-137 * grammar fix * Remove a number of wipe commands we don't want anyway We shouldn't be wiping any of this data within the server now anyway so let's not tempt fate again. * Why overcomplicating things is a horrifically bad idea (#55) The longer I look into this plugin's code, the angrier I will become. This fixes 2 bugs in the /potion command: - Fixes non-admins being able to clear other players - Fixes NPE caused when trying to add potion effects to players who are not on the server as a non-admin. Both of these issues are caused by overcomplicating seemingly simple solutions, hence the name of this commit. Co-authored-by: Ryan <Wild1145@users.noreply.github.com> Co-authored-by: Nathan Curran <30569566+Focusvity@users.noreply.github.com> * Bug fixes, improvements, and removals (FS-192) (#46) * Three fixes * Fixes /tempban throwing a NullPointerException when trying to get a player who isn't on the server but was in the past * Fixes /tempban banning players for 24 hours regardless of the duration defined * Fixes /list -t throwing a NullPointerException when performed from a non-player source (such as Telnet) * Removes hubworld entriely * Configurable blacklists for tag, muted commands, and wildcard Changes: * Moves globally blocked commands to the `global` subsection of the original `blocked_commands` section. You *will* need to update your configurations * /wildcard's command blacklist is now configurable under the `wildcard` section in `blocked_commands`. * The commands muted players can't use are now configurable under the `muted` section in `blocked_commands`. * Removes some commented-out globally blocked command entries. Co-authored-by: Ryan <Wild1145@users.noreply.github.com> * Switched from -c to -ci (#63) Resolves FS-219 * Added new dependency to allow TFM to compile (#65) * Name change for Fleek (#64) * Add //g to blocked commands (#62) Co-authored-by: Nathan Curran <30569566+Focusvity@users.noreply.github.com> * Small modification to new TFGuilds (FS-255) (#67) * Calculate the player count without offline players (FS-247) (#68) Co-authored-by: Ryan <Wild1145@users.noreply.github.com> * Use long instead of int and use offset to check time (FS-181) (#69) * Use long instead of int and use offset to check time (FS-181) * Remove star import * Addresses FS-224 (#70) * Continuation on that notes thing (#74) I forgot to remove the dependency after I removed the code that used JSONMessage. This fixes that by removing both the repository and the dependency from the pom file. * Updated permissions to re-baseline with the dev server (#75) Updating this to be based off of the dev server as it seems this has not been updated in some time. Primary purpose is to add the crackshot bypass removal for everyone (Though allow admins to bypass) and to add a start of network manager perms in the hopes it makes it more usable going forward. * Two fixes, one commit To kill two birds with one stone, I've done two fixes in this commit. - Fixes issue that caused quiet warns to behave improperly (e.g. the warnings wouldn't increment if quiet) - Added WARN to the PunishmentType list. * Update EntityWiper.java * FS-27 * FS-26 * FS-25 * Code quality and consistency improvements Here's all the changes I've made in this commit: - Resolves FS-44 (AutoEject.java) - Resolves FS-45 (BlockBlocker.java) - Resolves FS-47 and FS-48 (InteractBlocker.java) - Resolves FS-49 (Command_cage.java) - Resolves FS-50 (Command_manageshop.java) - Resolves FS-51 (Command_notes.java) - Resolves FS-52 (Command_potion.java) - Resolves FS-53 (Command_tag.java) - Resolves FS-55 (ItemFun.java) - Resolves FS-56 (Module_list.java) - Resolves FS-57 (Module_players.java) - Removes redundant code from InteractBlocker.java - Misc. code consistency corrections (global) * FS-54 * Shut up Codacy * FS-201 * Simple fix * Even more punishment log types Here's what I've changed in this commit: - Adds /blockcmd to the punishment log (FS-239) - Adds /blockedit and /blockpvp to the punishment log (FS-240) - Adds /cage to the punishment log (FS-241) - Adds /orbit to the punishment log (FS-242) - Changes the order of operations in some commands to be a bit more consistent * Order of operations fix * ez (#77) * Start building Java 16 (#84) * Start building Java 16 * Re-apply Fleek's change * Removed the shitty Github auto formatted white space. * Update to the maven build in Github workflows Given TravisCI has started to charge, I guess this might be what we move back to using as our main way to verify if something can actually build. * Update maven.yml * Delete .travis.yml * Adds /seed command (FS-225) (#85) * Create Command_seed.java * Addresses requested changes * My IDE decided to try to "fix" things with *s in imports Co-authored-by: Ryan <Wild1145@users.noreply.github.com> * Use 'getPlayer()' to prevent NPE (FS-159) (#87) Co-authored-by: Ryan <Wild1145@users.noreply.github.com> * 2 bugfixes - Fixes FS-309 by checking if a material provided is actually a block before caging someone. - Fixes a bug that causes the command to throw an ArrayOutOfBoundsException if one were to use a command like `/cage player1 block`. * Temporarily re-naming /clearchat to /cleanchat (#91) * Temporarily re-naming /clearchat to /cleanchat Due to another plugin which currently doesn't quite have all the permissions working, this command is not currently able to be executed as it stands. * Shhh I know I'm an idiot * Let's actually do dependency uplifts (#89) * Bump release to 2021.06-RC01 * Bump to release version We're good to go! Co-authored-by: Video <videogamesm12@gmail.com> Co-authored-by: Elmon11 <elmon11bussiness@gmail.com> Co-authored-by: Nathan Curran <30569566+Focusvity@users.noreply.github.com> Co-authored-by: Paldiu <pawereus@gmail.com>
2021-08-15 00:06:21 +00:00
if (args.length >= 3)
{
Release 2021.06 (#97) * Update Command_ride.java * ok, done (FS-156) * Fixes FS-137 * grammar fix * Remove a number of wipe commands we don't want anyway We shouldn't be wiping any of this data within the server now anyway so let's not tempt fate again. * Why overcomplicating things is a horrifically bad idea (#55) The longer I look into this plugin's code, the angrier I will become. This fixes 2 bugs in the /potion command: - Fixes non-admins being able to clear other players - Fixes NPE caused when trying to add potion effects to players who are not on the server as a non-admin. Both of these issues are caused by overcomplicating seemingly simple solutions, hence the name of this commit. Co-authored-by: Ryan <Wild1145@users.noreply.github.com> Co-authored-by: Nathan Curran <30569566+Focusvity@users.noreply.github.com> * Bug fixes, improvements, and removals (FS-192) (#46) * Three fixes * Fixes /tempban throwing a NullPointerException when trying to get a player who isn't on the server but was in the past * Fixes /tempban banning players for 24 hours regardless of the duration defined * Fixes /list -t throwing a NullPointerException when performed from a non-player source (such as Telnet) * Removes hubworld entriely * Configurable blacklists for tag, muted commands, and wildcard Changes: * Moves globally blocked commands to the `global` subsection of the original `blocked_commands` section. You *will* need to update your configurations * /wildcard's command blacklist is now configurable under the `wildcard` section in `blocked_commands`. * The commands muted players can't use are now configurable under the `muted` section in `blocked_commands`. * Removes some commented-out globally blocked command entries. Co-authored-by: Ryan <Wild1145@users.noreply.github.com> * Switched from -c to -ci (#63) Resolves FS-219 * Added new dependency to allow TFM to compile (#65) * Name change for Fleek (#64) * Add //g to blocked commands (#62) Co-authored-by: Nathan Curran <30569566+Focusvity@users.noreply.github.com> * Small modification to new TFGuilds (FS-255) (#67) * Calculate the player count without offline players (FS-247) (#68) Co-authored-by: Ryan <Wild1145@users.noreply.github.com> * Use long instead of int and use offset to check time (FS-181) (#69) * Use long instead of int and use offset to check time (FS-181) * Remove star import * Addresses FS-224 (#70) * Continuation on that notes thing (#74) I forgot to remove the dependency after I removed the code that used JSONMessage. This fixes that by removing both the repository and the dependency from the pom file. * Updated permissions to re-baseline with the dev server (#75) Updating this to be based off of the dev server as it seems this has not been updated in some time. Primary purpose is to add the crackshot bypass removal for everyone (Though allow admins to bypass) and to add a start of network manager perms in the hopes it makes it more usable going forward. * Two fixes, one commit To kill two birds with one stone, I've done two fixes in this commit. - Fixes issue that caused quiet warns to behave improperly (e.g. the warnings wouldn't increment if quiet) - Added WARN to the PunishmentType list. * Update EntityWiper.java * FS-27 * FS-26 * FS-25 * Code quality and consistency improvements Here's all the changes I've made in this commit: - Resolves FS-44 (AutoEject.java) - Resolves FS-45 (BlockBlocker.java) - Resolves FS-47 and FS-48 (InteractBlocker.java) - Resolves FS-49 (Command_cage.java) - Resolves FS-50 (Command_manageshop.java) - Resolves FS-51 (Command_notes.java) - Resolves FS-52 (Command_potion.java) - Resolves FS-53 (Command_tag.java) - Resolves FS-55 (ItemFun.java) - Resolves FS-56 (Module_list.java) - Resolves FS-57 (Module_players.java) - Removes redundant code from InteractBlocker.java - Misc. code consistency corrections (global) * FS-54 * Shut up Codacy * FS-201 * Simple fix * Even more punishment log types Here's what I've changed in this commit: - Adds /blockcmd to the punishment log (FS-239) - Adds /blockedit and /blockpvp to the punishment log (FS-240) - Adds /cage to the punishment log (FS-241) - Adds /orbit to the punishment log (FS-242) - Changes the order of operations in some commands to be a bit more consistent * Order of operations fix * ez (#77) * Start building Java 16 (#84) * Start building Java 16 * Re-apply Fleek's change * Removed the shitty Github auto formatted white space. * Update to the maven build in Github workflows Given TravisCI has started to charge, I guess this might be what we move back to using as our main way to verify if something can actually build. * Update maven.yml * Delete .travis.yml * Adds /seed command (FS-225) (#85) * Create Command_seed.java * Addresses requested changes * My IDE decided to try to "fix" things with *s in imports Co-authored-by: Ryan <Wild1145@users.noreply.github.com> * Use 'getPlayer()' to prevent NPE (FS-159) (#87) Co-authored-by: Ryan <Wild1145@users.noreply.github.com> * 2 bugfixes - Fixes FS-309 by checking if a material provided is actually a block before caging someone. - Fixes a bug that causes the command to throw an ArrayOutOfBoundsException if one were to use a command like `/cage player1 block`. * Temporarily re-naming /clearchat to /cleanchat (#91) * Temporarily re-naming /clearchat to /cleanchat Due to another plugin which currently doesn't quite have all the permissions working, this command is not currently able to be executed as it stands. * Shhh I know I'm an idiot * Let's actually do dependency uplifts (#89) * Bump release to 2021.06-RC01 * Bump to release version We're good to go! Co-authored-by: Video <videogamesm12@gmail.com> Co-authored-by: Elmon11 <elmon11bussiness@gmail.com> Co-authored-by: Nathan Curran <30569566+Focusvity@users.noreply.github.com> Co-authored-by: Paldiu <pawereus@gmail.com>
2021-08-15 00:06:21 +00:00
// Checks the validity of the Material and checks if it's a block.
// This is incredibly inefficient, as Spigot's isBlock() method in Material is an actual
// nightmare of switch-cases.
if (Material.matchMaterial(args[2]) != null && Material.matchMaterial(args[2]).isBlock())
{
outerMaterial = Material.matchMaterial(args[2]);
break;
}
else
{
msg("Invalid block!", ChatColor.RED);
return true;
}
}
Release 2021.06 (#97) * Update Command_ride.java * ok, done (FS-156) * Fixes FS-137 * grammar fix * Remove a number of wipe commands we don't want anyway We shouldn't be wiping any of this data within the server now anyway so let's not tempt fate again. * Why overcomplicating things is a horrifically bad idea (#55) The longer I look into this plugin's code, the angrier I will become. This fixes 2 bugs in the /potion command: - Fixes non-admins being able to clear other players - Fixes NPE caused when trying to add potion effects to players who are not on the server as a non-admin. Both of these issues are caused by overcomplicating seemingly simple solutions, hence the name of this commit. Co-authored-by: Ryan <Wild1145@users.noreply.github.com> Co-authored-by: Nathan Curran <30569566+Focusvity@users.noreply.github.com> * Bug fixes, improvements, and removals (FS-192) (#46) * Three fixes * Fixes /tempban throwing a NullPointerException when trying to get a player who isn't on the server but was in the past * Fixes /tempban banning players for 24 hours regardless of the duration defined * Fixes /list -t throwing a NullPointerException when performed from a non-player source (such as Telnet) * Removes hubworld entriely * Configurable blacklists for tag, muted commands, and wildcard Changes: * Moves globally blocked commands to the `global` subsection of the original `blocked_commands` section. You *will* need to update your configurations * /wildcard's command blacklist is now configurable under the `wildcard` section in `blocked_commands`. * The commands muted players can't use are now configurable under the `muted` section in `blocked_commands`. * Removes some commented-out globally blocked command entries. Co-authored-by: Ryan <Wild1145@users.noreply.github.com> * Switched from -c to -ci (#63) Resolves FS-219 * Added new dependency to allow TFM to compile (#65) * Name change for Fleek (#64) * Add //g to blocked commands (#62) Co-authored-by: Nathan Curran <30569566+Focusvity@users.noreply.github.com> * Small modification to new TFGuilds (FS-255) (#67) * Calculate the player count without offline players (FS-247) (#68) Co-authored-by: Ryan <Wild1145@users.noreply.github.com> * Use long instead of int and use offset to check time (FS-181) (#69) * Use long instead of int and use offset to check time (FS-181) * Remove star import * Addresses FS-224 (#70) * Continuation on that notes thing (#74) I forgot to remove the dependency after I removed the code that used JSONMessage. This fixes that by removing both the repository and the dependency from the pom file. * Updated permissions to re-baseline with the dev server (#75) Updating this to be based off of the dev server as it seems this has not been updated in some time. Primary purpose is to add the crackshot bypass removal for everyone (Though allow admins to bypass) and to add a start of network manager perms in the hopes it makes it more usable going forward. * Two fixes, one commit To kill two birds with one stone, I've done two fixes in this commit. - Fixes issue that caused quiet warns to behave improperly (e.g. the warnings wouldn't increment if quiet) - Added WARN to the PunishmentType list. * Update EntityWiper.java * FS-27 * FS-26 * FS-25 * Code quality and consistency improvements Here's all the changes I've made in this commit: - Resolves FS-44 (AutoEject.java) - Resolves FS-45 (BlockBlocker.java) - Resolves FS-47 and FS-48 (InteractBlocker.java) - Resolves FS-49 (Command_cage.java) - Resolves FS-50 (Command_manageshop.java) - Resolves FS-51 (Command_notes.java) - Resolves FS-52 (Command_potion.java) - Resolves FS-53 (Command_tag.java) - Resolves FS-55 (ItemFun.java) - Resolves FS-56 (Module_list.java) - Resolves FS-57 (Module_players.java) - Removes redundant code from InteractBlocker.java - Misc. code consistency corrections (global) * FS-54 * Shut up Codacy * FS-201 * Simple fix * Even more punishment log types Here's what I've changed in this commit: - Adds /blockcmd to the punishment log (FS-239) - Adds /blockedit and /blockpvp to the punishment log (FS-240) - Adds /cage to the punishment log (FS-241) - Adds /orbit to the punishment log (FS-242) - Changes the order of operations in some commands to be a bit more consistent * Order of operations fix * ez (#77) * Start building Java 16 (#84) * Start building Java 16 * Re-apply Fleek's change * Removed the shitty Github auto formatted white space. * Update to the maven build in Github workflows Given TravisCI has started to charge, I guess this might be what we move back to using as our main way to verify if something can actually build. * Update maven.yml * Delete .travis.yml * Adds /seed command (FS-225) (#85) * Create Command_seed.java * Addresses requested changes * My IDE decided to try to "fix" things with *s in imports Co-authored-by: Ryan <Wild1145@users.noreply.github.com> * Use 'getPlayer()' to prevent NPE (FS-159) (#87) Co-authored-by: Ryan <Wild1145@users.noreply.github.com> * 2 bugfixes - Fixes FS-309 by checking if a material provided is actually a block before caging someone. - Fixes a bug that causes the command to throw an ArrayOutOfBoundsException if one were to use a command like `/cage player1 block`. * Temporarily re-naming /clearchat to /cleanchat (#91) * Temporarily re-naming /clearchat to /cleanchat Due to another plugin which currently doesn't quite have all the permissions working, this command is not currently able to be executed as it stands. * Shhh I know I'm an idiot * Let's actually do dependency uplifts (#89) * Bump release to 2021.06-RC01 * Bump to release version We're good to go! Co-authored-by: Video <videogamesm12@gmail.com> Co-authored-by: Elmon11 <elmon11bussiness@gmail.com> Co-authored-by: Nathan Curran <30569566+Focusvity@users.noreply.github.com> Co-authored-by: Paldiu <pawereus@gmail.com>
2021-08-15 00:06:21 +00:00
else
{
return false;
}
}
default:
{
return false;
2011-10-19 00:37:00 +00:00
}
}
}
2018-07-25 02:44:00 +00:00
Release 2021.06 (#97) * Update Command_ride.java * ok, done (FS-156) * Fixes FS-137 * grammar fix * Remove a number of wipe commands we don't want anyway We shouldn't be wiping any of this data within the server now anyway so let's not tempt fate again. * Why overcomplicating things is a horrifically bad idea (#55) The longer I look into this plugin's code, the angrier I will become. This fixes 2 bugs in the /potion command: - Fixes non-admins being able to clear other players - Fixes NPE caused when trying to add potion effects to players who are not on the server as a non-admin. Both of these issues are caused by overcomplicating seemingly simple solutions, hence the name of this commit. Co-authored-by: Ryan <Wild1145@users.noreply.github.com> Co-authored-by: Nathan Curran <30569566+Focusvity@users.noreply.github.com> * Bug fixes, improvements, and removals (FS-192) (#46) * Three fixes * Fixes /tempban throwing a NullPointerException when trying to get a player who isn't on the server but was in the past * Fixes /tempban banning players for 24 hours regardless of the duration defined * Fixes /list -t throwing a NullPointerException when performed from a non-player source (such as Telnet) * Removes hubworld entriely * Configurable blacklists for tag, muted commands, and wildcard Changes: * Moves globally blocked commands to the `global` subsection of the original `blocked_commands` section. You *will* need to update your configurations * /wildcard's command blacklist is now configurable under the `wildcard` section in `blocked_commands`. * The commands muted players can't use are now configurable under the `muted` section in `blocked_commands`. * Removes some commented-out globally blocked command entries. Co-authored-by: Ryan <Wild1145@users.noreply.github.com> * Switched from -c to -ci (#63) Resolves FS-219 * Added new dependency to allow TFM to compile (#65) * Name change for Fleek (#64) * Add //g to blocked commands (#62) Co-authored-by: Nathan Curran <30569566+Focusvity@users.noreply.github.com> * Small modification to new TFGuilds (FS-255) (#67) * Calculate the player count without offline players (FS-247) (#68) Co-authored-by: Ryan <Wild1145@users.noreply.github.com> * Use long instead of int and use offset to check time (FS-181) (#69) * Use long instead of int and use offset to check time (FS-181) * Remove star import * Addresses FS-224 (#70) * Continuation on that notes thing (#74) I forgot to remove the dependency after I removed the code that used JSONMessage. This fixes that by removing both the repository and the dependency from the pom file. * Updated permissions to re-baseline with the dev server (#75) Updating this to be based off of the dev server as it seems this has not been updated in some time. Primary purpose is to add the crackshot bypass removal for everyone (Though allow admins to bypass) and to add a start of network manager perms in the hopes it makes it more usable going forward. * Two fixes, one commit To kill two birds with one stone, I've done two fixes in this commit. - Fixes issue that caused quiet warns to behave improperly (e.g. the warnings wouldn't increment if quiet) - Added WARN to the PunishmentType list. * Update EntityWiper.java * FS-27 * FS-26 * FS-25 * Code quality and consistency improvements Here's all the changes I've made in this commit: - Resolves FS-44 (AutoEject.java) - Resolves FS-45 (BlockBlocker.java) - Resolves FS-47 and FS-48 (InteractBlocker.java) - Resolves FS-49 (Command_cage.java) - Resolves FS-50 (Command_manageshop.java) - Resolves FS-51 (Command_notes.java) - Resolves FS-52 (Command_potion.java) - Resolves FS-53 (Command_tag.java) - Resolves FS-55 (ItemFun.java) - Resolves FS-56 (Module_list.java) - Resolves FS-57 (Module_players.java) - Removes redundant code from InteractBlocker.java - Misc. code consistency corrections (global) * FS-54 * Shut up Codacy * FS-201 * Simple fix * Even more punishment log types Here's what I've changed in this commit: - Adds /blockcmd to the punishment log (FS-239) - Adds /blockedit and /blockpvp to the punishment log (FS-240) - Adds /cage to the punishment log (FS-241) - Adds /orbit to the punishment log (FS-242) - Changes the order of operations in some commands to be a bit more consistent * Order of operations fix * ez (#77) * Start building Java 16 (#84) * Start building Java 16 * Re-apply Fleek's change * Removed the shitty Github auto formatted white space. * Update to the maven build in Github workflows Given TravisCI has started to charge, I guess this might be what we move back to using as our main way to verify if something can actually build. * Update maven.yml * Delete .travis.yml * Adds /seed command (FS-225) (#85) * Create Command_seed.java * Addresses requested changes * My IDE decided to try to "fix" things with *s in imports Co-authored-by: Ryan <Wild1145@users.noreply.github.com> * Use 'getPlayer()' to prevent NPE (FS-159) (#87) Co-authored-by: Ryan <Wild1145@users.noreply.github.com> * 2 bugfixes - Fixes FS-309 by checking if a material provided is actually a block before caging someone. - Fixes a bug that causes the command to throw an ArrayOutOfBoundsException if one were to use a command like `/cage player1 block`. * Temporarily re-naming /clearchat to /cleanchat (#91) * Temporarily re-naming /clearchat to /cleanchat Due to another plugin which currently doesn't quite have all the permissions working, this command is not currently able to be executed as it stands. * Shhh I know I'm an idiot * Let's actually do dependency uplifts (#89) * Bump release to 2021.06-RC01 * Bump to release version We're good to go! Co-authored-by: Video <videogamesm12@gmail.com> Co-authored-by: Elmon11 <elmon11bussiness@gmail.com> Co-authored-by: Nathan Curran <30569566+Focusvity@users.noreply.github.com> Co-authored-by: Paldiu <pawereus@gmail.com>
2021-08-15 00:06:21 +00:00
if (outerMaterial == Material.PLAYER_HEAD)
{
Release 2021.06 (#97) * Update Command_ride.java * ok, done (FS-156) * Fixes FS-137 * grammar fix * Remove a number of wipe commands we don't want anyway We shouldn't be wiping any of this data within the server now anyway so let's not tempt fate again. * Why overcomplicating things is a horrifically bad idea (#55) The longer I look into this plugin's code, the angrier I will become. This fixes 2 bugs in the /potion command: - Fixes non-admins being able to clear other players - Fixes NPE caused when trying to add potion effects to players who are not on the server as a non-admin. Both of these issues are caused by overcomplicating seemingly simple solutions, hence the name of this commit. Co-authored-by: Ryan <Wild1145@users.noreply.github.com> Co-authored-by: Nathan Curran <30569566+Focusvity@users.noreply.github.com> * Bug fixes, improvements, and removals (FS-192) (#46) * Three fixes * Fixes /tempban throwing a NullPointerException when trying to get a player who isn't on the server but was in the past * Fixes /tempban banning players for 24 hours regardless of the duration defined * Fixes /list -t throwing a NullPointerException when performed from a non-player source (such as Telnet) * Removes hubworld entriely * Configurable blacklists for tag, muted commands, and wildcard Changes: * Moves globally blocked commands to the `global` subsection of the original `blocked_commands` section. You *will* need to update your configurations * /wildcard's command blacklist is now configurable under the `wildcard` section in `blocked_commands`. * The commands muted players can't use are now configurable under the `muted` section in `blocked_commands`. * Removes some commented-out globally blocked command entries. Co-authored-by: Ryan <Wild1145@users.noreply.github.com> * Switched from -c to -ci (#63) Resolves FS-219 * Added new dependency to allow TFM to compile (#65) * Name change for Fleek (#64) * Add //g to blocked commands (#62) Co-authored-by: Nathan Curran <30569566+Focusvity@users.noreply.github.com> * Small modification to new TFGuilds (FS-255) (#67) * Calculate the player count without offline players (FS-247) (#68) Co-authored-by: Ryan <Wild1145@users.noreply.github.com> * Use long instead of int and use offset to check time (FS-181) (#69) * Use long instead of int and use offset to check time (FS-181) * Remove star import * Addresses FS-224 (#70) * Continuation on that notes thing (#74) I forgot to remove the dependency after I removed the code that used JSONMessage. This fixes that by removing both the repository and the dependency from the pom file. * Updated permissions to re-baseline with the dev server (#75) Updating this to be based off of the dev server as it seems this has not been updated in some time. Primary purpose is to add the crackshot bypass removal for everyone (Though allow admins to bypass) and to add a start of network manager perms in the hopes it makes it more usable going forward. * Two fixes, one commit To kill two birds with one stone, I've done two fixes in this commit. - Fixes issue that caused quiet warns to behave improperly (e.g. the warnings wouldn't increment if quiet) - Added WARN to the PunishmentType list. * Update EntityWiper.java * FS-27 * FS-26 * FS-25 * Code quality and consistency improvements Here's all the changes I've made in this commit: - Resolves FS-44 (AutoEject.java) - Resolves FS-45 (BlockBlocker.java) - Resolves FS-47 and FS-48 (InteractBlocker.java) - Resolves FS-49 (Command_cage.java) - Resolves FS-50 (Command_manageshop.java) - Resolves FS-51 (Command_notes.java) - Resolves FS-52 (Command_potion.java) - Resolves FS-53 (Command_tag.java) - Resolves FS-55 (ItemFun.java) - Resolves FS-56 (Module_list.java) - Resolves FS-57 (Module_players.java) - Removes redundant code from InteractBlocker.java - Misc. code consistency corrections (global) * FS-54 * Shut up Codacy * FS-201 * Simple fix * Even more punishment log types Here's what I've changed in this commit: - Adds /blockcmd to the punishment log (FS-239) - Adds /blockedit and /blockpvp to the punishment log (FS-240) - Adds /cage to the punishment log (FS-241) - Adds /orbit to the punishment log (FS-242) - Changes the order of operations in some commands to be a bit more consistent * Order of operations fix * ez (#77) * Start building Java 16 (#84) * Start building Java 16 * Re-apply Fleek's change * Removed the shitty Github auto formatted white space. * Update to the maven build in Github workflows Given TravisCI has started to charge, I guess this might be what we move back to using as our main way to verify if something can actually build. * Update maven.yml * Delete .travis.yml * Adds /seed command (FS-225) (#85) * Create Command_seed.java * Addresses requested changes * My IDE decided to try to "fix" things with *s in imports Co-authored-by: Ryan <Wild1145@users.noreply.github.com> * Use 'getPlayer()' to prevent NPE (FS-159) (#87) Co-authored-by: Ryan <Wild1145@users.noreply.github.com> * 2 bugfixes - Fixes FS-309 by checking if a material provided is actually a block before caging someone. - Fixes a bug that causes the command to throw an ArrayOutOfBoundsException if one were to use a command like `/cage player1 block`. * Temporarily re-naming /clearchat to /cleanchat (#91) * Temporarily re-naming /clearchat to /cleanchat Due to another plugin which currently doesn't quite have all the permissions working, this command is not currently able to be executed as it stands. * Shhh I know I'm an idiot * Let's actually do dependency uplifts (#89) * Bump release to 2021.06-RC01 * Bump to release version We're good to go! Co-authored-by: Video <videogamesm12@gmail.com> Co-authored-by: Elmon11 <elmon11bussiness@gmail.com> Co-authored-by: Nathan Curran <30569566+Focusvity@users.noreply.github.com> Co-authored-by: Paldiu <pawereus@gmail.com>
2021-08-15 00:06:21 +00:00
FUtil.adminAction(sender.getName(), "Caging " + player.getName() + " in " + skullName, true);
}
else
{
Release 2021.06 (#97) * Update Command_ride.java * ok, done (FS-156) * Fixes FS-137 * grammar fix * Remove a number of wipe commands we don't want anyway We shouldn't be wiping any of this data within the server now anyway so let's not tempt fate again. * Why overcomplicating things is a horrifically bad idea (#55) The longer I look into this plugin's code, the angrier I will become. This fixes 2 bugs in the /potion command: - Fixes non-admins being able to clear other players - Fixes NPE caused when trying to add potion effects to players who are not on the server as a non-admin. Both of these issues are caused by overcomplicating seemingly simple solutions, hence the name of this commit. Co-authored-by: Ryan <Wild1145@users.noreply.github.com> Co-authored-by: Nathan Curran <30569566+Focusvity@users.noreply.github.com> * Bug fixes, improvements, and removals (FS-192) (#46) * Three fixes * Fixes /tempban throwing a NullPointerException when trying to get a player who isn't on the server but was in the past * Fixes /tempban banning players for 24 hours regardless of the duration defined * Fixes /list -t throwing a NullPointerException when performed from a non-player source (such as Telnet) * Removes hubworld entriely * Configurable blacklists for tag, muted commands, and wildcard Changes: * Moves globally blocked commands to the `global` subsection of the original `blocked_commands` section. You *will* need to update your configurations * /wildcard's command blacklist is now configurable under the `wildcard` section in `blocked_commands`. * The commands muted players can't use are now configurable under the `muted` section in `blocked_commands`. * Removes some commented-out globally blocked command entries. Co-authored-by: Ryan <Wild1145@users.noreply.github.com> * Switched from -c to -ci (#63) Resolves FS-219 * Added new dependency to allow TFM to compile (#65) * Name change for Fleek (#64) * Add //g to blocked commands (#62) Co-authored-by: Nathan Curran <30569566+Focusvity@users.noreply.github.com> * Small modification to new TFGuilds (FS-255) (#67) * Calculate the player count without offline players (FS-247) (#68) Co-authored-by: Ryan <Wild1145@users.noreply.github.com> * Use long instead of int and use offset to check time (FS-181) (#69) * Use long instead of int and use offset to check time (FS-181) * Remove star import * Addresses FS-224 (#70) * Continuation on that notes thing (#74) I forgot to remove the dependency after I removed the code that used JSONMessage. This fixes that by removing both the repository and the dependency from the pom file. * Updated permissions to re-baseline with the dev server (#75) Updating this to be based off of the dev server as it seems this has not been updated in some time. Primary purpose is to add the crackshot bypass removal for everyone (Though allow admins to bypass) and to add a start of network manager perms in the hopes it makes it more usable going forward. * Two fixes, one commit To kill two birds with one stone, I've done two fixes in this commit. - Fixes issue that caused quiet warns to behave improperly (e.g. the warnings wouldn't increment if quiet) - Added WARN to the PunishmentType list. * Update EntityWiper.java * FS-27 * FS-26 * FS-25 * Code quality and consistency improvements Here's all the changes I've made in this commit: - Resolves FS-44 (AutoEject.java) - Resolves FS-45 (BlockBlocker.java) - Resolves FS-47 and FS-48 (InteractBlocker.java) - Resolves FS-49 (Command_cage.java) - Resolves FS-50 (Command_manageshop.java) - Resolves FS-51 (Command_notes.java) - Resolves FS-52 (Command_potion.java) - Resolves FS-53 (Command_tag.java) - Resolves FS-55 (ItemFun.java) - Resolves FS-56 (Module_list.java) - Resolves FS-57 (Module_players.java) - Removes redundant code from InteractBlocker.java - Misc. code consistency corrections (global) * FS-54 * Shut up Codacy * FS-201 * Simple fix * Even more punishment log types Here's what I've changed in this commit: - Adds /blockcmd to the punishment log (FS-239) - Adds /blockedit and /blockpvp to the punishment log (FS-240) - Adds /cage to the punishment log (FS-241) - Adds /orbit to the punishment log (FS-242) - Changes the order of operations in some commands to be a bit more consistent * Order of operations fix * ez (#77) * Start building Java 16 (#84) * Start building Java 16 * Re-apply Fleek's change * Removed the shitty Github auto formatted white space. * Update to the maven build in Github workflows Given TravisCI has started to charge, I guess this might be what we move back to using as our main way to verify if something can actually build. * Update maven.yml * Delete .travis.yml * Adds /seed command (FS-225) (#85) * Create Command_seed.java * Addresses requested changes * My IDE decided to try to "fix" things with *s in imports Co-authored-by: Ryan <Wild1145@users.noreply.github.com> * Use 'getPlayer()' to prevent NPE (FS-159) (#87) Co-authored-by: Ryan <Wild1145@users.noreply.github.com> * 2 bugfixes - Fixes FS-309 by checking if a material provided is actually a block before caging someone. - Fixes a bug that causes the command to throw an ArrayOutOfBoundsException if one were to use a command like `/cage player1 block`. * Temporarily re-naming /clearchat to /cleanchat (#91) * Temporarily re-naming /clearchat to /cleanchat Due to another plugin which currently doesn't quite have all the permissions working, this command is not currently able to be executed as it stands. * Shhh I know I'm an idiot * Let's actually do dependency uplifts (#89) * Bump release to 2021.06-RC01 * Bump to release version We're good to go! Co-authored-by: Video <videogamesm12@gmail.com> Co-authored-by: Elmon11 <elmon11bussiness@gmail.com> Co-authored-by: Nathan Curran <30569566+Focusvity@users.noreply.github.com> Co-authored-by: Paldiu <pawereus@gmail.com>
2021-08-15 00:06:21 +00:00
FUtil.adminAction(sender.getName(), "Caging " + player.getName(), true);
}
2020-05-29 10:14:21 +00:00
Release 2021.06 (#97) * Update Command_ride.java * ok, done (FS-156) * Fixes FS-137 * grammar fix * Remove a number of wipe commands we don't want anyway We shouldn't be wiping any of this data within the server now anyway so let's not tempt fate again. * Why overcomplicating things is a horrifically bad idea (#55) The longer I look into this plugin's code, the angrier I will become. This fixes 2 bugs in the /potion command: - Fixes non-admins being able to clear other players - Fixes NPE caused when trying to add potion effects to players who are not on the server as a non-admin. Both of these issues are caused by overcomplicating seemingly simple solutions, hence the name of this commit. Co-authored-by: Ryan <Wild1145@users.noreply.github.com> Co-authored-by: Nathan Curran <30569566+Focusvity@users.noreply.github.com> * Bug fixes, improvements, and removals (FS-192) (#46) * Three fixes * Fixes /tempban throwing a NullPointerException when trying to get a player who isn't on the server but was in the past * Fixes /tempban banning players for 24 hours regardless of the duration defined * Fixes /list -t throwing a NullPointerException when performed from a non-player source (such as Telnet) * Removes hubworld entriely * Configurable blacklists for tag, muted commands, and wildcard Changes: * Moves globally blocked commands to the `global` subsection of the original `blocked_commands` section. You *will* need to update your configurations * /wildcard's command blacklist is now configurable under the `wildcard` section in `blocked_commands`. * The commands muted players can't use are now configurable under the `muted` section in `blocked_commands`. * Removes some commented-out globally blocked command entries. Co-authored-by: Ryan <Wild1145@users.noreply.github.com> * Switched from -c to -ci (#63) Resolves FS-219 * Added new dependency to allow TFM to compile (#65) * Name change for Fleek (#64) * Add //g to blocked commands (#62) Co-authored-by: Nathan Curran <30569566+Focusvity@users.noreply.github.com> * Small modification to new TFGuilds (FS-255) (#67) * Calculate the player count without offline players (FS-247) (#68) Co-authored-by: Ryan <Wild1145@users.noreply.github.com> * Use long instead of int and use offset to check time (FS-181) (#69) * Use long instead of int and use offset to check time (FS-181) * Remove star import * Addresses FS-224 (#70) * Continuation on that notes thing (#74) I forgot to remove the dependency after I removed the code that used JSONMessage. This fixes that by removing both the repository and the dependency from the pom file. * Updated permissions to re-baseline with the dev server (#75) Updating this to be based off of the dev server as it seems this has not been updated in some time. Primary purpose is to add the crackshot bypass removal for everyone (Though allow admins to bypass) and to add a start of network manager perms in the hopes it makes it more usable going forward. * Two fixes, one commit To kill two birds with one stone, I've done two fixes in this commit. - Fixes issue that caused quiet warns to behave improperly (e.g. the warnings wouldn't increment if quiet) - Added WARN to the PunishmentType list. * Update EntityWiper.java * FS-27 * FS-26 * FS-25 * Code quality and consistency improvements Here's all the changes I've made in this commit: - Resolves FS-44 (AutoEject.java) - Resolves FS-45 (BlockBlocker.java) - Resolves FS-47 and FS-48 (InteractBlocker.java) - Resolves FS-49 (Command_cage.java) - Resolves FS-50 (Command_manageshop.java) - Resolves FS-51 (Command_notes.java) - Resolves FS-52 (Command_potion.java) - Resolves FS-53 (Command_tag.java) - Resolves FS-55 (ItemFun.java) - Resolves FS-56 (Module_list.java) - Resolves FS-57 (Module_players.java) - Removes redundant code from InteractBlocker.java - Misc. code consistency corrections (global) * FS-54 * Shut up Codacy * FS-201 * Simple fix * Even more punishment log types Here's what I've changed in this commit: - Adds /blockcmd to the punishment log (FS-239) - Adds /blockedit and /blockpvp to the punishment log (FS-240) - Adds /cage to the punishment log (FS-241) - Adds /orbit to the punishment log (FS-242) - Changes the order of operations in some commands to be a bit more consistent * Order of operations fix * ez (#77) * Start building Java 16 (#84) * Start building Java 16 * Re-apply Fleek's change * Removed the shitty Github auto formatted white space. * Update to the maven build in Github workflows Given TravisCI has started to charge, I guess this might be what we move back to using as our main way to verify if something can actually build. * Update maven.yml * Delete .travis.yml * Adds /seed command (FS-225) (#85) * Create Command_seed.java * Addresses requested changes * My IDE decided to try to "fix" things with *s in imports Co-authored-by: Ryan <Wild1145@users.noreply.github.com> * Use 'getPlayer()' to prevent NPE (FS-159) (#87) Co-authored-by: Ryan <Wild1145@users.noreply.github.com> * 2 bugfixes - Fixes FS-309 by checking if a material provided is actually a block before caging someone. - Fixes a bug that causes the command to throw an ArrayOutOfBoundsException if one were to use a command like `/cage player1 block`. * Temporarily re-naming /clearchat to /cleanchat (#91) * Temporarily re-naming /clearchat to /cleanchat Due to another plugin which currently doesn't quite have all the permissions working, this command is not currently able to be executed as it stands. * Shhh I know I'm an idiot * Let's actually do dependency uplifts (#89) * Bump release to 2021.06-RC01 * Bump to release version We're good to go! Co-authored-by: Video <videogamesm12@gmail.com> Co-authored-by: Elmon11 <elmon11bussiness@gmail.com> Co-authored-by: Nathan Curran <30569566+Focusvity@users.noreply.github.com> Co-authored-by: Paldiu <pawereus@gmail.com>
2021-08-15 00:06:21 +00:00
Location location = player.getLocation().clone().add(0.0, 1.0, 0.0);
2020-05-29 10:14:21 +00:00
Release 2021.06 (#97) * Update Command_ride.java * ok, done (FS-156) * Fixes FS-137 * grammar fix * Remove a number of wipe commands we don't want anyway We shouldn't be wiping any of this data within the server now anyway so let's not tempt fate again. * Why overcomplicating things is a horrifically bad idea (#55) The longer I look into this plugin's code, the angrier I will become. This fixes 2 bugs in the /potion command: - Fixes non-admins being able to clear other players - Fixes NPE caused when trying to add potion effects to players who are not on the server as a non-admin. Both of these issues are caused by overcomplicating seemingly simple solutions, hence the name of this commit. Co-authored-by: Ryan <Wild1145@users.noreply.github.com> Co-authored-by: Nathan Curran <30569566+Focusvity@users.noreply.github.com> * Bug fixes, improvements, and removals (FS-192) (#46) * Three fixes * Fixes /tempban throwing a NullPointerException when trying to get a player who isn't on the server but was in the past * Fixes /tempban banning players for 24 hours regardless of the duration defined * Fixes /list -t throwing a NullPointerException when performed from a non-player source (such as Telnet) * Removes hubworld entriely * Configurable blacklists for tag, muted commands, and wildcard Changes: * Moves globally blocked commands to the `global` subsection of the original `blocked_commands` section. You *will* need to update your configurations * /wildcard's command blacklist is now configurable under the `wildcard` section in `blocked_commands`. * The commands muted players can't use are now configurable under the `muted` section in `blocked_commands`. * Removes some commented-out globally blocked command entries. Co-authored-by: Ryan <Wild1145@users.noreply.github.com> * Switched from -c to -ci (#63) Resolves FS-219 * Added new dependency to allow TFM to compile (#65) * Name change for Fleek (#64) * Add //g to blocked commands (#62) Co-authored-by: Nathan Curran <30569566+Focusvity@users.noreply.github.com> * Small modification to new TFGuilds (FS-255) (#67) * Calculate the player count without offline players (FS-247) (#68) Co-authored-by: Ryan <Wild1145@users.noreply.github.com> * Use long instead of int and use offset to check time (FS-181) (#69) * Use long instead of int and use offset to check time (FS-181) * Remove star import * Addresses FS-224 (#70) * Continuation on that notes thing (#74) I forgot to remove the dependency after I removed the code that used JSONMessage. This fixes that by removing both the repository and the dependency from the pom file. * Updated permissions to re-baseline with the dev server (#75) Updating this to be based off of the dev server as it seems this has not been updated in some time. Primary purpose is to add the crackshot bypass removal for everyone (Though allow admins to bypass) and to add a start of network manager perms in the hopes it makes it more usable going forward. * Two fixes, one commit To kill two birds with one stone, I've done two fixes in this commit. - Fixes issue that caused quiet warns to behave improperly (e.g. the warnings wouldn't increment if quiet) - Added WARN to the PunishmentType list. * Update EntityWiper.java * FS-27 * FS-26 * FS-25 * Code quality and consistency improvements Here's all the changes I've made in this commit: - Resolves FS-44 (AutoEject.java) - Resolves FS-45 (BlockBlocker.java) - Resolves FS-47 and FS-48 (InteractBlocker.java) - Resolves FS-49 (Command_cage.java) - Resolves FS-50 (Command_manageshop.java) - Resolves FS-51 (Command_notes.java) - Resolves FS-52 (Command_potion.java) - Resolves FS-53 (Command_tag.java) - Resolves FS-55 (ItemFun.java) - Resolves FS-56 (Module_list.java) - Resolves FS-57 (Module_players.java) - Removes redundant code from InteractBlocker.java - Misc. code consistency corrections (global) * FS-54 * Shut up Codacy * FS-201 * Simple fix * Even more punishment log types Here's what I've changed in this commit: - Adds /blockcmd to the punishment log (FS-239) - Adds /blockedit and /blockpvp to the punishment log (FS-240) - Adds /cage to the punishment log (FS-241) - Adds /orbit to the punishment log (FS-242) - Changes the order of operations in some commands to be a bit more consistent * Order of operations fix * ez (#77) * Start building Java 16 (#84) * Start building Java 16 * Re-apply Fleek's change * Removed the shitty Github auto formatted white space. * Update to the maven build in Github workflows Given TravisCI has started to charge, I guess this might be what we move back to using as our main way to verify if something can actually build. * Update maven.yml * Delete .travis.yml * Adds /seed command (FS-225) (#85) * Create Command_seed.java * Addresses requested changes * My IDE decided to try to "fix" things with *s in imports Co-authored-by: Ryan <Wild1145@users.noreply.github.com> * Use 'getPlayer()' to prevent NPE (FS-159) (#87) Co-authored-by: Ryan <Wild1145@users.noreply.github.com> * 2 bugfixes - Fixes FS-309 by checking if a material provided is actually a block before caging someone. - Fixes a bug that causes the command to throw an ArrayOutOfBoundsException if one were to use a command like `/cage player1 block`. * Temporarily re-naming /clearchat to /cleanchat (#91) * Temporarily re-naming /clearchat to /cleanchat Due to another plugin which currently doesn't quite have all the permissions working, this command is not currently able to be executed as it stands. * Shhh I know I'm an idiot * Let's actually do dependency uplifts (#89) * Bump release to 2021.06-RC01 * Bump to release version We're good to go! Co-authored-by: Video <videogamesm12@gmail.com> Co-authored-by: Elmon11 <elmon11bussiness@gmail.com> Co-authored-by: Nathan Curran <30569566+Focusvity@users.noreply.github.com> Co-authored-by: Paldiu <pawereus@gmail.com>
2021-08-15 00:06:21 +00:00
if (skullName != null)
{
Release 2021.06 (#97) * Update Command_ride.java * ok, done (FS-156) * Fixes FS-137 * grammar fix * Remove a number of wipe commands we don't want anyway We shouldn't be wiping any of this data within the server now anyway so let's not tempt fate again. * Why overcomplicating things is a horrifically bad idea (#55) The longer I look into this plugin's code, the angrier I will become. This fixes 2 bugs in the /potion command: - Fixes non-admins being able to clear other players - Fixes NPE caused when trying to add potion effects to players who are not on the server as a non-admin. Both of these issues are caused by overcomplicating seemingly simple solutions, hence the name of this commit. Co-authored-by: Ryan <Wild1145@users.noreply.github.com> Co-authored-by: Nathan Curran <30569566+Focusvity@users.noreply.github.com> * Bug fixes, improvements, and removals (FS-192) (#46) * Three fixes * Fixes /tempban throwing a NullPointerException when trying to get a player who isn't on the server but was in the past * Fixes /tempban banning players for 24 hours regardless of the duration defined * Fixes /list -t throwing a NullPointerException when performed from a non-player source (such as Telnet) * Removes hubworld entriely * Configurable blacklists for tag, muted commands, and wildcard Changes: * Moves globally blocked commands to the `global` subsection of the original `blocked_commands` section. You *will* need to update your configurations * /wildcard's command blacklist is now configurable under the `wildcard` section in `blocked_commands`. * The commands muted players can't use are now configurable under the `muted` section in `blocked_commands`. * Removes some commented-out globally blocked command entries. Co-authored-by: Ryan <Wild1145@users.noreply.github.com> * Switched from -c to -ci (#63) Resolves FS-219 * Added new dependency to allow TFM to compile (#65) * Name change for Fleek (#64) * Add //g to blocked commands (#62) Co-authored-by: Nathan Curran <30569566+Focusvity@users.noreply.github.com> * Small modification to new TFGuilds (FS-255) (#67) * Calculate the player count without offline players (FS-247) (#68) Co-authored-by: Ryan <Wild1145@users.noreply.github.com> * Use long instead of int and use offset to check time (FS-181) (#69) * Use long instead of int and use offset to check time (FS-181) * Remove star import * Addresses FS-224 (#70) * Continuation on that notes thing (#74) I forgot to remove the dependency after I removed the code that used JSONMessage. This fixes that by removing both the repository and the dependency from the pom file. * Updated permissions to re-baseline with the dev server (#75) Updating this to be based off of the dev server as it seems this has not been updated in some time. Primary purpose is to add the crackshot bypass removal for everyone (Though allow admins to bypass) and to add a start of network manager perms in the hopes it makes it more usable going forward. * Two fixes, one commit To kill two birds with one stone, I've done two fixes in this commit. - Fixes issue that caused quiet warns to behave improperly (e.g. the warnings wouldn't increment if quiet) - Added WARN to the PunishmentType list. * Update EntityWiper.java * FS-27 * FS-26 * FS-25 * Code quality and consistency improvements Here's all the changes I've made in this commit: - Resolves FS-44 (AutoEject.java) - Resolves FS-45 (BlockBlocker.java) - Resolves FS-47 and FS-48 (InteractBlocker.java) - Resolves FS-49 (Command_cage.java) - Resolves FS-50 (Command_manageshop.java) - Resolves FS-51 (Command_notes.java) - Resolves FS-52 (Command_potion.java) - Resolves FS-53 (Command_tag.java) - Resolves FS-55 (ItemFun.java) - Resolves FS-56 (Module_list.java) - Resolves FS-57 (Module_players.java) - Removes redundant code from InteractBlocker.java - Misc. code consistency corrections (global) * FS-54 * Shut up Codacy * FS-201 * Simple fix * Even more punishment log types Here's what I've changed in this commit: - Adds /blockcmd to the punishment log (FS-239) - Adds /blockedit and /blockpvp to the punishment log (FS-240) - Adds /cage to the punishment log (FS-241) - Adds /orbit to the punishment log (FS-242) - Changes the order of operations in some commands to be a bit more consistent * Order of operations fix * ez (#77) * Start building Java 16 (#84) * Start building Java 16 * Re-apply Fleek's change * Removed the shitty Github auto formatted white space. * Update to the maven build in Github workflows Given TravisCI has started to charge, I guess this might be what we move back to using as our main way to verify if something can actually build. * Update maven.yml * Delete .travis.yml * Adds /seed command (FS-225) (#85) * Create Command_seed.java * Addresses requested changes * My IDE decided to try to "fix" things with *s in imports Co-authored-by: Ryan <Wild1145@users.noreply.github.com> * Use 'getPlayer()' to prevent NPE (FS-159) (#87) Co-authored-by: Ryan <Wild1145@users.noreply.github.com> * 2 bugfixes - Fixes FS-309 by checking if a material provided is actually a block before caging someone. - Fixes a bug that causes the command to throw an ArrayOutOfBoundsException if one were to use a command like `/cage player1 block`. * Temporarily re-naming /clearchat to /cleanchat (#91) * Temporarily re-naming /clearchat to /cleanchat Due to another plugin which currently doesn't quite have all the permissions working, this command is not currently able to be executed as it stands. * Shhh I know I'm an idiot * Let's actually do dependency uplifts (#89) * Bump release to 2021.06-RC01 * Bump to release version We're good to go! Co-authored-by: Video <videogamesm12@gmail.com> Co-authored-by: Elmon11 <elmon11bussiness@gmail.com> Co-authored-by: Nathan Curran <30569566+Focusvity@users.noreply.github.com> Co-authored-by: Paldiu <pawereus@gmail.com>
2021-08-15 00:06:21 +00:00
fPlayer.getCageData().cage(location, outerMaterial, innerMaterial, skullName);
2013-08-25 23:08:53 +00:00
}
else
{
Release 2021.06 (#97) * Update Command_ride.java * ok, done (FS-156) * Fixes FS-137 * grammar fix * Remove a number of wipe commands we don't want anyway We shouldn't be wiping any of this data within the server now anyway so let's not tempt fate again. * Why overcomplicating things is a horrifically bad idea (#55) The longer I look into this plugin's code, the angrier I will become. This fixes 2 bugs in the /potion command: - Fixes non-admins being able to clear other players - Fixes NPE caused when trying to add potion effects to players who are not on the server as a non-admin. Both of these issues are caused by overcomplicating seemingly simple solutions, hence the name of this commit. Co-authored-by: Ryan <Wild1145@users.noreply.github.com> Co-authored-by: Nathan Curran <30569566+Focusvity@users.noreply.github.com> * Bug fixes, improvements, and removals (FS-192) (#46) * Three fixes * Fixes /tempban throwing a NullPointerException when trying to get a player who isn't on the server but was in the past * Fixes /tempban banning players for 24 hours regardless of the duration defined * Fixes /list -t throwing a NullPointerException when performed from a non-player source (such as Telnet) * Removes hubworld entriely * Configurable blacklists for tag, muted commands, and wildcard Changes: * Moves globally blocked commands to the `global` subsection of the original `blocked_commands` section. You *will* need to update your configurations * /wildcard's command blacklist is now configurable under the `wildcard` section in `blocked_commands`. * The commands muted players can't use are now configurable under the `muted` section in `blocked_commands`. * Removes some commented-out globally blocked command entries. Co-authored-by: Ryan <Wild1145@users.noreply.github.com> * Switched from -c to -ci (#63) Resolves FS-219 * Added new dependency to allow TFM to compile (#65) * Name change for Fleek (#64) * Add //g to blocked commands (#62) Co-authored-by: Nathan Curran <30569566+Focusvity@users.noreply.github.com> * Small modification to new TFGuilds (FS-255) (#67) * Calculate the player count without offline players (FS-247) (#68) Co-authored-by: Ryan <Wild1145@users.noreply.github.com> * Use long instead of int and use offset to check time (FS-181) (#69) * Use long instead of int and use offset to check time (FS-181) * Remove star import * Addresses FS-224 (#70) * Continuation on that notes thing (#74) I forgot to remove the dependency after I removed the code that used JSONMessage. This fixes that by removing both the repository and the dependency from the pom file. * Updated permissions to re-baseline with the dev server (#75) Updating this to be based off of the dev server as it seems this has not been updated in some time. Primary purpose is to add the crackshot bypass removal for everyone (Though allow admins to bypass) and to add a start of network manager perms in the hopes it makes it more usable going forward. * Two fixes, one commit To kill two birds with one stone, I've done two fixes in this commit. - Fixes issue that caused quiet warns to behave improperly (e.g. the warnings wouldn't increment if quiet) - Added WARN to the PunishmentType list. * Update EntityWiper.java * FS-27 * FS-26 * FS-25 * Code quality and consistency improvements Here's all the changes I've made in this commit: - Resolves FS-44 (AutoEject.java) - Resolves FS-45 (BlockBlocker.java) - Resolves FS-47 and FS-48 (InteractBlocker.java) - Resolves FS-49 (Command_cage.java) - Resolves FS-50 (Command_manageshop.java) - Resolves FS-51 (Command_notes.java) - Resolves FS-52 (Command_potion.java) - Resolves FS-53 (Command_tag.java) - Resolves FS-55 (ItemFun.java) - Resolves FS-56 (Module_list.java) - Resolves FS-57 (Module_players.java) - Removes redundant code from InteractBlocker.java - Misc. code consistency corrections (global) * FS-54 * Shut up Codacy * FS-201 * Simple fix * Even more punishment log types Here's what I've changed in this commit: - Adds /blockcmd to the punishment log (FS-239) - Adds /blockedit and /blockpvp to the punishment log (FS-240) - Adds /cage to the punishment log (FS-241) - Adds /orbit to the punishment log (FS-242) - Changes the order of operations in some commands to be a bit more consistent * Order of operations fix * ez (#77) * Start building Java 16 (#84) * Start building Java 16 * Re-apply Fleek's change * Removed the shitty Github auto formatted white space. * Update to the maven build in Github workflows Given TravisCI has started to charge, I guess this might be what we move back to using as our main way to verify if something can actually build. * Update maven.yml * Delete .travis.yml * Adds /seed command (FS-225) (#85) * Create Command_seed.java * Addresses requested changes * My IDE decided to try to "fix" things with *s in imports Co-authored-by: Ryan <Wild1145@users.noreply.github.com> * Use 'getPlayer()' to prevent NPE (FS-159) (#87) Co-authored-by: Ryan <Wild1145@users.noreply.github.com> * 2 bugfixes - Fixes FS-309 by checking if a material provided is actually a block before caging someone. - Fixes a bug that causes the command to throw an ArrayOutOfBoundsException if one were to use a command like `/cage player1 block`. * Temporarily re-naming /clearchat to /cleanchat (#91) * Temporarily re-naming /clearchat to /cleanchat Due to another plugin which currently doesn't quite have all the permissions working, this command is not currently able to be executed as it stands. * Shhh I know I'm an idiot * Let's actually do dependency uplifts (#89) * Bump release to 2021.06-RC01 * Bump to release version We're good to go! Co-authored-by: Video <videogamesm12@gmail.com> Co-authored-by: Elmon11 <elmon11bussiness@gmail.com> Co-authored-by: Nathan Curran <30569566+Focusvity@users.noreply.github.com> Co-authored-by: Paldiu <pawereus@gmail.com>
2021-08-15 00:06:21 +00:00
fPlayer.getCageData().cage(location, outerMaterial, innerMaterial);
2013-08-25 23:08:53 +00:00
}
Release 2021.06 (#97) * Update Command_ride.java * ok, done (FS-156) * Fixes FS-137 * grammar fix * Remove a number of wipe commands we don't want anyway We shouldn't be wiping any of this data within the server now anyway so let's not tempt fate again. * Why overcomplicating things is a horrifically bad idea (#55) The longer I look into this plugin's code, the angrier I will become. This fixes 2 bugs in the /potion command: - Fixes non-admins being able to clear other players - Fixes NPE caused when trying to add potion effects to players who are not on the server as a non-admin. Both of these issues are caused by overcomplicating seemingly simple solutions, hence the name of this commit. Co-authored-by: Ryan <Wild1145@users.noreply.github.com> Co-authored-by: Nathan Curran <30569566+Focusvity@users.noreply.github.com> * Bug fixes, improvements, and removals (FS-192) (#46) * Three fixes * Fixes /tempban throwing a NullPointerException when trying to get a player who isn't on the server but was in the past * Fixes /tempban banning players for 24 hours regardless of the duration defined * Fixes /list -t throwing a NullPointerException when performed from a non-player source (such as Telnet) * Removes hubworld entriely * Configurable blacklists for tag, muted commands, and wildcard Changes: * Moves globally blocked commands to the `global` subsection of the original `blocked_commands` section. You *will* need to update your configurations * /wildcard's command blacklist is now configurable under the `wildcard` section in `blocked_commands`. * The commands muted players can't use are now configurable under the `muted` section in `blocked_commands`. * Removes some commented-out globally blocked command entries. Co-authored-by: Ryan <Wild1145@users.noreply.github.com> * Switched from -c to -ci (#63) Resolves FS-219 * Added new dependency to allow TFM to compile (#65) * Name change for Fleek (#64) * Add //g to blocked commands (#62) Co-authored-by: Nathan Curran <30569566+Focusvity@users.noreply.github.com> * Small modification to new TFGuilds (FS-255) (#67) * Calculate the player count without offline players (FS-247) (#68) Co-authored-by: Ryan <Wild1145@users.noreply.github.com> * Use long instead of int and use offset to check time (FS-181) (#69) * Use long instead of int and use offset to check time (FS-181) * Remove star import * Addresses FS-224 (#70) * Continuation on that notes thing (#74) I forgot to remove the dependency after I removed the code that used JSONMessage. This fixes that by removing both the repository and the dependency from the pom file. * Updated permissions to re-baseline with the dev server (#75) Updating this to be based off of the dev server as it seems this has not been updated in some time. Primary purpose is to add the crackshot bypass removal for everyone (Though allow admins to bypass) and to add a start of network manager perms in the hopes it makes it more usable going forward. * Two fixes, one commit To kill two birds with one stone, I've done two fixes in this commit. - Fixes issue that caused quiet warns to behave improperly (e.g. the warnings wouldn't increment if quiet) - Added WARN to the PunishmentType list. * Update EntityWiper.java * FS-27 * FS-26 * FS-25 * Code quality and consistency improvements Here's all the changes I've made in this commit: - Resolves FS-44 (AutoEject.java) - Resolves FS-45 (BlockBlocker.java) - Resolves FS-47 and FS-48 (InteractBlocker.java) - Resolves FS-49 (Command_cage.java) - Resolves FS-50 (Command_manageshop.java) - Resolves FS-51 (Command_notes.java) - Resolves FS-52 (Command_potion.java) - Resolves FS-53 (Command_tag.java) - Resolves FS-55 (ItemFun.java) - Resolves FS-56 (Module_list.java) - Resolves FS-57 (Module_players.java) - Removes redundant code from InteractBlocker.java - Misc. code consistency corrections (global) * FS-54 * Shut up Codacy * FS-201 * Simple fix * Even more punishment log types Here's what I've changed in this commit: - Adds /blockcmd to the punishment log (FS-239) - Adds /blockedit and /blockpvp to the punishment log (FS-240) - Adds /cage to the punishment log (FS-241) - Adds /orbit to the punishment log (FS-242) - Changes the order of operations in some commands to be a bit more consistent * Order of operations fix * ez (#77) * Start building Java 16 (#84) * Start building Java 16 * Re-apply Fleek's change * Removed the shitty Github auto formatted white space. * Update to the maven build in Github workflows Given TravisCI has started to charge, I guess this might be what we move back to using as our main way to verify if something can actually build. * Update maven.yml * Delete .travis.yml * Adds /seed command (FS-225) (#85) * Create Command_seed.java * Addresses requested changes * My IDE decided to try to "fix" things with *s in imports Co-authored-by: Ryan <Wild1145@users.noreply.github.com> * Use 'getPlayer()' to prevent NPE (FS-159) (#87) Co-authored-by: Ryan <Wild1145@users.noreply.github.com> * 2 bugfixes - Fixes FS-309 by checking if a material provided is actually a block before caging someone. - Fixes a bug that causes the command to throw an ArrayOutOfBoundsException if one were to use a command like `/cage player1 block`. * Temporarily re-naming /clearchat to /cleanchat (#91) * Temporarily re-naming /clearchat to /cleanchat Due to another plugin which currently doesn't quite have all the permissions working, this command is not currently able to be executed as it stands. * Shhh I know I'm an idiot * Let's actually do dependency uplifts (#89) * Bump release to 2021.06-RC01 * Bump to release version We're good to go! Co-authored-by: Video <videogamesm12@gmail.com> Co-authored-by: Elmon11 <elmon11bussiness@gmail.com> Co-authored-by: Nathan Curran <30569566+Focusvity@users.noreply.github.com> Co-authored-by: Paldiu <pawereus@gmail.com>
2021-08-15 00:06:21 +00:00
player.setGameMode(GameMode.SURVIVAL);
plugin.pul.logPunishment(new Punishment(player.getName(), FUtil.getIp(player), sender.getName(), PunishmentType.CAGE, null));
2011-10-19 00:37:00 +00:00
return true;
}
2019-01-29 04:57:41 +00:00
@Override
public List<String> getTabCompleteOptions(CommandSender sender, Command command, String alias, String[] args)
{
if (!plugin.al.isAdmin(sender))
2019-01-29 04:57:41 +00:00
{
return null;
}
if (args.length == 1)
{
List<String> arguments = new ArrayList<>();
arguments.add("purge");
arguments.addAll(FUtil.getPlayerList());
return arguments;
}
else if (args.length == 2)
{
if (!args[0].equals("purge"))
{
2020-05-29 10:14:21 +00:00
return Arrays.asList("head", "block");
2019-01-29 04:57:41 +00:00
}
}
else if (args.length == 3)
{
if (args[1].equals("block"))
{
return FUtil.getAllMaterialNames();
}
else if (args[1].equals("head"))
2019-01-29 04:57:41 +00:00
{
return FUtil.getPlayerList();
}
}
return Collections.emptyList();
}
}