TotalFreedomMod/src/main/java/me/totalfreedom/totalfreedommod/player/FPlayer.java

721 lines
15 KiB
Java
Raw Normal View History

package me.totalfreedom.totalfreedommod.player;
2011-10-01 17:59:46 +00:00
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import me.totalfreedom.totalfreedommod.caging.CageData;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.freeze.FreezeData;
import me.totalfreedom.totalfreedommod.util.FUtil;
2011-10-16 06:00:37 +00:00
import org.bukkit.Bukkit;
2013-07-02 20:31:05 +00:00
import org.bukkit.ChatColor;
import org.bukkit.entity.Arrow;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.scheduler.BukkitRunnable;
import org.bukkit.scheduler.BukkitTask;
2011-10-10 12:09:19 +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
import java.util.ArrayList;
import java.util.List;
public class FPlayer
2011-10-01 17:59:46 +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
public static final long AUTO_PURGE_TICKS = 5L * 60L * 20L;
TotalFreedomMod Electrum Version 5.0 This TotalFreedomMod release implements many changes. Most notably, the internals have been completely revamped. TotalFreedomMod now relies on the Aero library for core mechanics such as command handling and services. Another important change is the UUID system. In TotalFreedomMod Electrum, it has been completely removed. The core reason for this is that the system as a whole was very bugged. Additionally, it did not solve the primary reason for its conception: preserving player data when the player changes their username. This is because TotalFreedomMod servers usually run in offline-mode. This meaning that some of the players joining do not have a registerd Mojang UUID whatsoever. All in all, the UUID system was buggy, and it did not fix the reason it was implemented, so it has been completely removed. The admin list and the ban list now use usernames and IPs again. Lastly, many smaller changes have been implemented. Due to the amount of changes, they have not been named individualy. Please refer to the issues below for more details. Fixes #342 Fixes #350 Fixes #380 Fixes #684 Fixes #704 Fixes #716 Fixes #735 Fixes #745 Fixes #784 Fixes #765 Fixes #791 Fixes #805 Fixes #826 Fixes #883 Fixes #1524 Fixes #1534 Fixes #1536 Fixes #1538 Fixes #1545 Fixes #1546 Fixes #1568 Fixes #1627 Resolves #403 Resolves #435 Resolves #597 Resolves #603 Resolves #628 Resolves #690 Resolves #708 Resolves #747 Resolves #748 Resolves #749 Resolves #764 Resolves #767 Resolves #782 Resolves #809 Resolves #803 Resolves #811 Resolves #813 Resolves #830 Resolves #848 Resolves #856 Resolves #876 Resolves #908 Resolves #992 Resolves #1018 Resolves #1432 Resolves #1446 Resolves #1494 Resolves #1501 Resolves #1526 Resolves #1540 Resolves #1550 Resolves #1560 Resolves #1561 Resolves #1578 Resolves #1613
2016-05-12 19:40:39 +00:00
private final TotalFreedomMod plugin;
private final String name;
private final String ip;
//
private final FreezeData freezeData = new FreezeData(this);
private final CageData cageData = new CageData(this);
private final List<LivingEntity> mobThrowerQueue = new ArrayList<>();
private Player player;
//
private BukkitTask unmuteTask;
private double fuckoffRadius = 0;
private int messageCount = 0;
private int totalBlockDestroy = 0;
private int totalBlockPlace = 0;
private int freecamDestroyCount = 0;
private int freecamPlaceCount = 0;
private boolean isOrbiting = false;
private double orbitStrength = 10.0;
private boolean mobThrowerEnabled = false;
private EntityType mobThrowerEntity = EntityType.PIG;
private double mobThrowerSpeed = 4.0;
private BukkitTask mp44ScheduleTask = null;
private boolean mp44Armed = false;
private boolean mp44Firing = false;
private BukkitTask lockupScheduleTask = null;
2020-01-04 02:42:23 +00:00
private boolean lockedUp = false;
private String lastMessage = "";
private boolean inAdminchat = false;
private boolean allCommandsBlocked = false;
TotalFreedomMod Electrum Version 5.0 This TotalFreedomMod release implements many changes. Most notably, the internals have been completely revamped. TotalFreedomMod now relies on the Aero library for core mechanics such as command handling and services. Another important change is the UUID system. In TotalFreedomMod Electrum, it has been completely removed. The core reason for this is that the system as a whole was very bugged. Additionally, it did not solve the primary reason for its conception: preserving player data when the player changes their username. This is because TotalFreedomMod servers usually run in offline-mode. This meaning that some of the players joining do not have a registerd Mojang UUID whatsoever. All in all, the UUID system was buggy, and it did not fix the reason it was implemented, so it has been completely removed. The admin list and the ban list now use usernames and IPs again. Lastly, many smaller changes have been implemented. Due to the amount of changes, they have not been named individualy. Please refer to the issues below for more details. Fixes #342 Fixes #350 Fixes #380 Fixes #684 Fixes #704 Fixes #716 Fixes #735 Fixes #745 Fixes #784 Fixes #765 Fixes #791 Fixes #805 Fixes #826 Fixes #883 Fixes #1524 Fixes #1534 Fixes #1536 Fixes #1538 Fixes #1545 Fixes #1546 Fixes #1568 Fixes #1627 Resolves #403 Resolves #435 Resolves #597 Resolves #603 Resolves #628 Resolves #690 Resolves #708 Resolves #747 Resolves #748 Resolves #749 Resolves #764 Resolves #767 Resolves #782 Resolves #809 Resolves #803 Resolves #811 Resolves #813 Resolves #830 Resolves #848 Resolves #856 Resolves #876 Resolves #908 Resolves #992 Resolves #1018 Resolves #1432 Resolves #1446 Resolves #1494 Resolves #1501 Resolves #1526 Resolves #1540 Resolves #1550 Resolves #1560 Resolves #1561 Resolves #1578 Resolves #1613
2016-05-12 19:40:39 +00:00
private boolean superadminIdVerified = false;
private String lastCommand = "";
private boolean cmdspyEnabled = false;
private String tag = null;
private int warningCount = 0;
2017-12-23 04:07:36 +00:00
private boolean editBlocked = false;
2017-12-23 04:07:36 +00:00
private boolean pvpBlocked = false;
2017-12-23 04:07:36 +00:00
private boolean invSee = false;
TotalFreedomMod Electrum Version 5.0 This TotalFreedomMod release implements many changes. Most notably, the internals have been completely revamped. TotalFreedomMod now relies on the Aero library for core mechanics such as command handling and services. Another important change is the UUID system. In TotalFreedomMod Electrum, it has been completely removed. The core reason for this is that the system as a whole was very bugged. Additionally, it did not solve the primary reason for its conception: preserving player data when the player changes their username. This is because TotalFreedomMod servers usually run in offline-mode. This meaning that some of the players joining do not have a registerd Mojang UUID whatsoever. All in all, the UUID system was buggy, and it did not fix the reason it was implemented, so it has been completely removed. The admin list and the ban list now use usernames and IPs again. Lastly, many smaller changes have been implemented. Due to the amount of changes, they have not been named individualy. Please refer to the issues below for more details. Fixes #342 Fixes #350 Fixes #380 Fixes #684 Fixes #704 Fixes #716 Fixes #735 Fixes #745 Fixes #784 Fixes #765 Fixes #791 Fixes #805 Fixes #826 Fixes #883 Fixes #1524 Fixes #1534 Fixes #1536 Fixes #1538 Fixes #1545 Fixes #1546 Fixes #1568 Fixes #1627 Resolves #403 Resolves #435 Resolves #597 Resolves #603 Resolves #628 Resolves #690 Resolves #708 Resolves #747 Resolves #748 Resolves #749 Resolves #764 Resolves #767 Resolves #782 Resolves #809 Resolves #803 Resolves #811 Resolves #813 Resolves #830 Resolves #848 Resolves #856 Resolves #876 Resolves #908 Resolves #992 Resolves #1018 Resolves #1432 Resolves #1446 Resolves #1494 Resolves #1501 Resolves #1526 Resolves #1540 Resolves #1550 Resolves #1560 Resolves #1561 Resolves #1578 Resolves #1613
2016-05-12 19:40:39 +00:00
public FPlayer(TotalFreedomMod plugin, Player player)
{
2020-07-01 01:51:06 +00:00
this(plugin, player.getName(), FUtil.getIp(player));
}
TotalFreedomMod Electrum Version 5.0 This TotalFreedomMod release implements many changes. Most notably, the internals have been completely revamped. TotalFreedomMod now relies on the Aero library for core mechanics such as command handling and services. Another important change is the UUID system. In TotalFreedomMod Electrum, it has been completely removed. The core reason for this is that the system as a whole was very bugged. Additionally, it did not solve the primary reason for its conception: preserving player data when the player changes their username. This is because TotalFreedomMod servers usually run in offline-mode. This meaning that some of the players joining do not have a registerd Mojang UUID whatsoever. All in all, the UUID system was buggy, and it did not fix the reason it was implemented, so it has been completely removed. The admin list and the ban list now use usernames and IPs again. Lastly, many smaller changes have been implemented. Due to the amount of changes, they have not been named individualy. Please refer to the issues below for more details. Fixes #342 Fixes #350 Fixes #380 Fixes #684 Fixes #704 Fixes #716 Fixes #735 Fixes #745 Fixes #784 Fixes #765 Fixes #791 Fixes #805 Fixes #826 Fixes #883 Fixes #1524 Fixes #1534 Fixes #1536 Fixes #1538 Fixes #1545 Fixes #1546 Fixes #1568 Fixes #1627 Resolves #403 Resolves #435 Resolves #597 Resolves #603 Resolves #628 Resolves #690 Resolves #708 Resolves #747 Resolves #748 Resolves #749 Resolves #764 Resolves #767 Resolves #782 Resolves #809 Resolves #803 Resolves #811 Resolves #813 Resolves #830 Resolves #848 Resolves #856 Resolves #876 Resolves #908 Resolves #992 Resolves #1018 Resolves #1432 Resolves #1446 Resolves #1494 Resolves #1501 Resolves #1526 Resolves #1540 Resolves #1550 Resolves #1560 Resolves #1561 Resolves #1578 Resolves #1613
2016-05-12 19:40:39 +00:00
private FPlayer(TotalFreedomMod plugin, String name, String ip)
{
TotalFreedomMod Electrum Version 5.0 This TotalFreedomMod release implements many changes. Most notably, the internals have been completely revamped. TotalFreedomMod now relies on the Aero library for core mechanics such as command handling and services. Another important change is the UUID system. In TotalFreedomMod Electrum, it has been completely removed. The core reason for this is that the system as a whole was very bugged. Additionally, it did not solve the primary reason for its conception: preserving player data when the player changes their username. This is because TotalFreedomMod servers usually run in offline-mode. This meaning that some of the players joining do not have a registerd Mojang UUID whatsoever. All in all, the UUID system was buggy, and it did not fix the reason it was implemented, so it has been completely removed. The admin list and the ban list now use usernames and IPs again. Lastly, many smaller changes have been implemented. Due to the amount of changes, they have not been named individualy. Please refer to the issues below for more details. Fixes #342 Fixes #350 Fixes #380 Fixes #684 Fixes #704 Fixes #716 Fixes #735 Fixes #745 Fixes #784 Fixes #765 Fixes #791 Fixes #805 Fixes #826 Fixes #883 Fixes #1524 Fixes #1534 Fixes #1536 Fixes #1538 Fixes #1545 Fixes #1546 Fixes #1568 Fixes #1627 Resolves #403 Resolves #435 Resolves #597 Resolves #603 Resolves #628 Resolves #690 Resolves #708 Resolves #747 Resolves #748 Resolves #749 Resolves #764 Resolves #767 Resolves #782 Resolves #809 Resolves #803 Resolves #811 Resolves #813 Resolves #830 Resolves #848 Resolves #856 Resolves #876 Resolves #908 Resolves #992 Resolves #1018 Resolves #1432 Resolves #1446 Resolves #1494 Resolves #1501 Resolves #1526 Resolves #1540 Resolves #1550 Resolves #1560 Resolves #1561 Resolves #1578 Resolves #1613
2016-05-12 19:40:39 +00:00
this.plugin = plugin;
this.name = name;
this.ip = ip;
}
public static long getAutoPurgeTicks()
{
return AUTO_PURGE_TICKS;
}
public Player getPlayer()
{
if (player != null && !player.isOnline())
{
player = null;
}
if (player == null)
{
for (Player onlinePlayer : Bukkit.getOnlinePlayers())
{
2020-07-01 01:51:06 +00:00
if (FUtil.getIp(onlinePlayer).equals(ip))
{
player = onlinePlayer;
break;
}
}
}
return player;
}
public void setPlayer(Player player)
{
this.player = player;
}
2011-10-16 06:00:37 +00:00
public boolean isOrbiting()
{
return isOrbiting;
2011-10-16 06:00:37 +00:00
}
public void setOrbiting(boolean orbiting)
{
isOrbiting = orbiting;
}
public void startOrbiting(double strength)
2011-10-16 06:00:37 +00:00
{
this.isOrbiting = true;
this.orbitStrength = strength;
2011-10-16 06:00:37 +00:00
}
2011-10-16 06:00:37 +00:00
public void stopOrbiting()
{
this.isOrbiting = false;
2011-10-16 06:00:37 +00:00
}
public double orbitStrength()
{
return orbitStrength;
2011-10-16 06:00:37 +00:00
}
2011-10-14 23:29:09 +00:00
public boolean isFuckOff()
2011-10-10 12:09:19 +00:00
{
return fuckoffRadius > 0;
2011-10-10 12:09:19 +00:00
}
2011-10-14 23:29:09 +00:00
public void setFuckoff(double radius)
2011-10-10 12:09:19 +00:00
{
this.fuckoffRadius = radius;
2011-10-10 12:09:19 +00:00
}
2011-10-14 23:29:09 +00:00
public void disableFuckoff()
2011-10-10 12:09:19 +00:00
{
this.fuckoffRadius = 0;
2011-10-01 17:59:46 +00:00
}
public void resetMsgCount()
{
this.messageCount = 0;
2011-10-01 17:59:46 +00:00
}
2011-10-02 04:18:52 +00:00
public int incrementAndGetMsgCount()
2011-10-01 17:59:46 +00:00
{
return this.messageCount++;
2011-10-01 17:59:46 +00:00
}
2011-10-02 04:18:52 +00:00
public int incrementAndGetBlockDestroyCount()
2011-10-01 17:59:46 +00:00
{
return this.totalBlockDestroy++;
2011-10-01 17:59:46 +00:00
}
2011-10-02 04:18:52 +00:00
2011-10-01 17:59:46 +00:00
public void resetBlockDestroyCount()
{
this.totalBlockDestroy = 0;
2011-10-05 19:07:45 +00:00
}
public int incrementAndGetBlockPlaceCount()
2011-10-18 04:08:40 +00:00
{
return this.totalBlockPlace++;
2011-10-18 04:08:40 +00:00
}
public void resetBlockPlaceCount()
{
this.totalBlockPlace = 0;
2011-10-18 04:08:40 +00:00
}
2011-10-14 23:29:09 +00:00
public int incrementAndGetFreecamDestroyCount()
2011-10-05 19:07:45 +00:00
{
return this.freecamDestroyCount++;
2011-10-05 19:07:45 +00:00
}
public void resetFreecamDestroyCount()
{
this.freecamDestroyCount = 0;
2011-10-05 19:07:45 +00:00
}
2011-10-14 23:29:09 +00:00
public int incrementAndGetFreecamPlaceCount()
2011-10-05 19:07:45 +00:00
{
return this.freecamPlaceCount++;
2011-10-05 19:07:45 +00:00
}
public void resetFreecamPlaceCount()
{
this.freecamPlaceCount = 0;
2011-10-01 17:59:46 +00:00
}
2011-10-16 06:00:37 +00:00
public void enableMobThrower(EntityType mobThrowerCreature, double mobThrowerSpeed)
2011-10-16 06:00:37 +00:00
{
this.mobThrowerEnabled = true;
this.mobThrowerEntity = mobThrowerCreature;
this.mobThrowerSpeed = mobThrowerSpeed;
2011-10-16 06:00:37 +00:00
}
2011-10-16 06:00:37 +00:00
public void disableMobThrower()
{
this.mobThrowerEnabled = false;
2011-10-16 06:00:37 +00:00
}
2012-03-03 04:29:54 +00:00
public EntityType mobThrowerCreature()
2011-10-16 06:00:37 +00:00
{
return this.mobThrowerEntity;
2011-10-16 06:00:37 +00:00
}
public double mobThrowerSpeed()
{
return this.mobThrowerSpeed;
2011-10-16 06:00:37 +00:00
}
2011-10-16 06:00:37 +00:00
public boolean mobThrowerEnabled()
{
return this.mobThrowerEnabled;
2011-10-16 06:00:37 +00:00
}
2011-10-16 06:00:37 +00:00
public void enqueueMob(LivingEntity mob)
{
mobThrowerQueue.add(mob);
if (mobThrowerQueue.size() > 4)
2011-10-16 06:00:37 +00:00
{
LivingEntity oldmob = mobThrowerQueue.remove(0);
2011-10-16 06:00:37 +00:00
if (oldmob != null)
{
oldmob.damage(500.0);
2011-10-16 06:00:37 +00:00
}
}
}
2011-10-21 17:02:07 +00:00
public void startArrowShooter(TotalFreedomMod plugin)
2011-10-16 06:00:37 +00:00
{
2011-10-21 17:02:07 +00:00
this.stopArrowShooter();
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
this.mp44ScheduleTask = new ArrowShooter(getPlayer()).runTaskTimer(plugin, 1L, 1L);
this.mp44Firing = true;
2011-10-16 06:00:37 +00:00
}
2011-10-19 00:37:00 +00:00
public void stopArrowShooter()
2011-10-16 06:00:37 +00:00
{
if (this.mp44ScheduleTask != null)
2011-10-16 06:00:37 +00:00
{
this.mp44ScheduleTask.cancel();
this.mp44ScheduleTask = null;
2011-10-16 06:00:37 +00:00
}
this.mp44Firing = false;
2011-10-21 17:02:07 +00:00
}
2011-10-21 17:02:07 +00:00
public void armMP44()
{
this.mp44Armed = true;
2011-10-21 17:02:07 +00:00
this.stopArrowShooter();
}
2011-10-21 17:02:07 +00:00
public void disarmMP44()
{
this.mp44Armed = false;
2011-10-21 17:02:07 +00:00
this.stopArrowShooter();
}
2011-10-21 17:02:07 +00:00
public boolean isMP44Armed()
{
return this.mp44Armed;
2011-10-21 17:02:07 +00:00
}
2011-10-21 17:02:07 +00:00
public boolean toggleMP44Firing()
{
this.mp44Firing = !this.mp44Firing;
return mp44Firing;
2011-10-16 06:00:37 +00:00
}
public boolean isMuted()
{
return unmuteTask != null;
}
public void setMuted(boolean muted, int minutes)
{
FUtil.cancel(unmuteTask);
2018-03-18 08:32:50 +00:00
plugin.mu.MUTED_PLAYERS.remove(getPlayer().getName());
unmuteTask = null;
if (!muted)
{
return;
}
TotalFreedomMod Electrum Version 5.0 This TotalFreedomMod release implements many changes. Most notably, the internals have been completely revamped. TotalFreedomMod now relies on the Aero library for core mechanics such as command handling and services. Another important change is the UUID system. In TotalFreedomMod Electrum, it has been completely removed. The core reason for this is that the system as a whole was very bugged. Additionally, it did not solve the primary reason for its conception: preserving player data when the player changes their username. This is because TotalFreedomMod servers usually run in offline-mode. This meaning that some of the players joining do not have a registerd Mojang UUID whatsoever. All in all, the UUID system was buggy, and it did not fix the reason it was implemented, so it has been completely removed. The admin list and the ban list now use usernames and IPs again. Lastly, many smaller changes have been implemented. Due to the amount of changes, they have not been named individualy. Please refer to the issues below for more details. Fixes #342 Fixes #350 Fixes #380 Fixes #684 Fixes #704 Fixes #716 Fixes #735 Fixes #745 Fixes #784 Fixes #765 Fixes #791 Fixes #805 Fixes #826 Fixes #883 Fixes #1524 Fixes #1534 Fixes #1536 Fixes #1538 Fixes #1545 Fixes #1546 Fixes #1568 Fixes #1627 Resolves #403 Resolves #435 Resolves #597 Resolves #603 Resolves #628 Resolves #690 Resolves #708 Resolves #747 Resolves #748 Resolves #749 Resolves #764 Resolves #767 Resolves #782 Resolves #809 Resolves #803 Resolves #811 Resolves #813 Resolves #830 Resolves #848 Resolves #856 Resolves #876 Resolves #908 Resolves #992 Resolves #1018 Resolves #1432 Resolves #1446 Resolves #1494 Resolves #1501 Resolves #1526 Resolves #1540 Resolves #1550 Resolves #1560 Resolves #1561 Resolves #1578 Resolves #1613
2016-05-12 19:40:39 +00:00
if (getPlayer() == null)
{
return;
}
2018-03-18 08:32:50 +00:00
plugin.mu.MUTED_PLAYERS.add(getPlayer().getName());
// TODO: Simplify this into a Consumer<BukkitTask> lambda?
unmuteTask = new BukkitRunnable()
{
@Override
public void run()
{
2018-03-18 08:32:50 +00:00
if (getPlayer() != null)
{
FUtil.adminAction(ConfigEntry.SERVER_NAME.getString(), "Unmuting " + getPlayer().getName(), false);
2018-03-18 08:32:50 +00:00
setMuted(false);
}
else
{
FUtil.adminAction(ConfigEntry.SERVER_NAME.getString(), "Unmuting " + getName(), false);
2018-03-18 08:32:50 +00:00
plugin.mu.MUTED_PLAYERS.remove(getName());
}
}
}.runTaskLater(plugin, minutes * (60L * 20L));
}
public void setMuted(boolean muted)
{
setMuted(muted, 5);
}
public BukkitTask getLockupScheduleID()
{
return this.lockupScheduleTask;
}
public void setLockupScheduleId(BukkitTask id)
{
this.lockupScheduleTask = id;
}
2012-11-27 19:02:39 +00:00
2020-01-04 02:42:23 +00:00
public boolean isLockedUp()
{
return this.lockedUp;
}
public void setLockedUp(boolean lockedUp)
{
this.lockedUp = lockedUp;
}
public String getLastMessage()
2012-11-27 19:02:39 +00:00
{
return lastMessage;
2012-11-27 19:02:39 +00:00
}
public void setLastMessage(String message)
2012-11-27 19:02:39 +00:00
{
this.lastMessage = message;
2012-11-27 19:02:39 +00:00
}
public void setAdminChat(boolean inAdminchat)
{
this.inAdminchat = inAdminchat;
}
public boolean inAdminChat()
{
return this.inAdminchat;
}
2012-12-06 09:32:08 +00:00
public boolean allCommandsBlocked()
2012-12-06 09:32:08 +00:00
{
return this.allCommandsBlocked;
2012-12-06 09:32:08 +00:00
}
public void setCommandsBlocked(boolean commandsBlocked)
2012-12-06 09:32:08 +00:00
{
this.allCommandsBlocked = commandsBlocked;
2012-12-06 09:32:08 +00:00
}
public String getLastCommand()
{
return lastCommand;
}
public void setLastCommand(String lastCommand)
{
this.lastCommand = lastCommand;
}
2013-01-21 18:58:42 +00:00
public void setCommandSpy(boolean enabled)
2013-01-21 18:58:42 +00:00
{
this.cmdspyEnabled = enabled;
2013-01-21 18:58:42 +00:00
}
public boolean cmdspyEnabled()
{
return cmdspyEnabled;
2013-01-21 18:58:42 +00:00
}
2013-08-12 10:26:49 +00:00
public String getTag()
{
return this.tag;
}
2013-08-12 10:26:49 +00:00
public void setTag(String tag)
{
if (tag == null)
{
this.tag = null;
}
else
{
this.tag = FUtil.colorize(tag) + ChatColor.WHITE;
2013-08-12 10:26:49 +00:00
}
}
public int getWarningCount()
2013-08-12 10:26:49 +00:00
{
return this.warningCount;
2013-08-12 10:26:49 +00:00
}
public void setWarningCount(int warningCount)
{
this.warningCount = warningCount;
}
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
public void incrementWarnings(boolean quiet)
{
this.warningCount++;
if (this.warningCount % 2 == 0)
{
TotalFreedomMod Electrum Version 5.0 This TotalFreedomMod release implements many changes. Most notably, the internals have been completely revamped. TotalFreedomMod now relies on the Aero library for core mechanics such as command handling and services. Another important change is the UUID system. In TotalFreedomMod Electrum, it has been completely removed. The core reason for this is that the system as a whole was very bugged. Additionally, it did not solve the primary reason for its conception: preserving player data when the player changes their username. This is because TotalFreedomMod servers usually run in offline-mode. This meaning that some of the players joining do not have a registerd Mojang UUID whatsoever. All in all, the UUID system was buggy, and it did not fix the reason it was implemented, so it has been completely removed. The admin list and the ban list now use usernames and IPs again. Lastly, many smaller changes have been implemented. Due to the amount of changes, they have not been named individualy. Please refer to the issues below for more details. Fixes #342 Fixes #350 Fixes #380 Fixes #684 Fixes #704 Fixes #716 Fixes #735 Fixes #745 Fixes #784 Fixes #765 Fixes #791 Fixes #805 Fixes #826 Fixes #883 Fixes #1524 Fixes #1534 Fixes #1536 Fixes #1538 Fixes #1545 Fixes #1546 Fixes #1568 Fixes #1627 Resolves #403 Resolves #435 Resolves #597 Resolves #603 Resolves #628 Resolves #690 Resolves #708 Resolves #747 Resolves #748 Resolves #749 Resolves #764 Resolves #767 Resolves #782 Resolves #809 Resolves #803 Resolves #811 Resolves #813 Resolves #830 Resolves #848 Resolves #856 Resolves #876 Resolves #908 Resolves #992 Resolves #1018 Resolves #1432 Resolves #1446 Resolves #1494 Resolves #1501 Resolves #1526 Resolves #1540 Resolves #1550 Resolves #1560 Resolves #1561 Resolves #1578 Resolves #1613
2016-05-12 19:40:39 +00:00
Player p = getPlayer();
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 (!quiet)
{
p.getWorld().strikeLightning(p.getLocation());
}
TotalFreedomMod Electrum Version 5.0 This TotalFreedomMod release implements many changes. Most notably, the internals have been completely revamped. TotalFreedomMod now relies on the Aero library for core mechanics such as command handling and services. Another important change is the UUID system. In TotalFreedomMod Electrum, it has been completely removed. The core reason for this is that the system as a whole was very bugged. Additionally, it did not solve the primary reason for its conception: preserving player data when the player changes their username. This is because TotalFreedomMod servers usually run in offline-mode. This meaning that some of the players joining do not have a registerd Mojang UUID whatsoever. All in all, the UUID system was buggy, and it did not fix the reason it was implemented, so it has been completely removed. The admin list and the ban list now use usernames and IPs again. Lastly, many smaller changes have been implemented. Due to the amount of changes, they have not been named individualy. Please refer to the issues below for more details. Fixes #342 Fixes #350 Fixes #380 Fixes #684 Fixes #704 Fixes #716 Fixes #735 Fixes #745 Fixes #784 Fixes #765 Fixes #791 Fixes #805 Fixes #826 Fixes #883 Fixes #1524 Fixes #1534 Fixes #1536 Fixes #1538 Fixes #1545 Fixes #1546 Fixes #1568 Fixes #1627 Resolves #403 Resolves #435 Resolves #597 Resolves #603 Resolves #628 Resolves #690 Resolves #708 Resolves #747 Resolves #748 Resolves #749 Resolves #764 Resolves #767 Resolves #782 Resolves #809 Resolves #803 Resolves #811 Resolves #813 Resolves #830 Resolves #848 Resolves #856 Resolves #876 Resolves #908 Resolves #992 Resolves #1018 Resolves #1432 Resolves #1446 Resolves #1494 Resolves #1501 Resolves #1526 Resolves #1540 Resolves #1550 Resolves #1560 Resolves #1561 Resolves #1578 Resolves #1613
2016-05-12 19:40:39 +00:00
FUtil.playerMsg(p, ChatColor.RED + "You have been warned at least twice now, make sure to read the rules at " + ConfigEntry.SERVER_BAN_URL.getString());
}
}
public TotalFreedomMod getPlugin()
{
return plugin;
}
public String getName()
{
return name;
}
public String getIp()
{
return ip;
}
public BukkitTask getUnmuteTask()
{
return unmuteTask;
}
public void setUnmuteTask(BukkitTask unmuteTask)
{
this.unmuteTask = unmuteTask;
}
public FreezeData getFreezeData()
{
return freezeData;
}
public double getFuckoffRadius()
{
return fuckoffRadius;
}
public void setFuckoffRadius(double fuckoffRadius)
{
this.fuckoffRadius = fuckoffRadius;
}
public int getMessageCount()
{
return messageCount;
}
public void setMessageCount(int messageCount)
{
this.messageCount = messageCount;
}
public int getTotalBlockDestroy()
{
return totalBlockDestroy;
}
public void setTotalBlockDestroy(int totalBlockDestroy)
{
this.totalBlockDestroy = totalBlockDestroy;
}
public int getTotalBlockPlace()
{
return totalBlockPlace;
}
public void setTotalBlockPlace(int totalBlockPlace)
{
this.totalBlockPlace = totalBlockPlace;
}
public int getFreecamDestroyCount()
{
return freecamDestroyCount;
}
public void setFreecamDestroyCount(int freecamDestroyCount)
{
this.freecamDestroyCount = freecamDestroyCount;
}
public int getFreecamPlaceCount()
{
return freecamPlaceCount;
}
public void setFreecamPlaceCount(int freecamPlaceCount)
{
this.freecamPlaceCount = freecamPlaceCount;
}
public CageData getCageData()
{
return cageData;
}
public double getOrbitStrength()
{
return orbitStrength;
}
public void setOrbitStrength(double orbitStrength)
{
this.orbitStrength = orbitStrength;
}
public boolean isMobThrowerEnabled()
{
return mobThrowerEnabled;
}
public void setMobThrowerEnabled(boolean mobThrowerEnabled)
{
this.mobThrowerEnabled = mobThrowerEnabled;
}
public EntityType getMobThrowerEntity()
{
return mobThrowerEntity;
}
public void setMobThrowerEntity(EntityType mobThrowerEntity)
{
this.mobThrowerEntity = mobThrowerEntity;
}
public double getMobThrowerSpeed()
{
return mobThrowerSpeed;
}
public void setMobThrowerSpeed(double mobThrowerSpeed)
{
this.mobThrowerSpeed = mobThrowerSpeed;
}
public List<LivingEntity> getMobThrowerQueue()
{
return mobThrowerQueue;
}
public BukkitTask getMp44ScheduleTask()
{
return mp44ScheduleTask;
}
public void setMp44ScheduleTask(BukkitTask mp44ScheduleTask)
{
this.mp44ScheduleTask = mp44ScheduleTask;
}
public boolean isMp44Armed()
{
return mp44Armed;
}
public void setMp44Armed(boolean mp44Armed)
{
this.mp44Armed = mp44Armed;
}
public boolean isMp44Firing()
{
return mp44Firing;
}
public void setMp44Firing(boolean mp44Firing)
{
this.mp44Firing = mp44Firing;
}
public BukkitTask getLockupScheduleTask()
{
return lockupScheduleTask;
}
public void setLockupScheduleTask(BukkitTask lockupScheduleTask)
{
this.lockupScheduleTask = lockupScheduleTask;
}
public boolean isInAdminchat()
{
return inAdminchat;
}
public void setInAdminchat(boolean inAdminchat)
{
this.inAdminchat = inAdminchat;
}
public boolean isAllCommandsBlocked()
{
return allCommandsBlocked;
}
public void setAllCommandsBlocked(boolean allCommandsBlocked)
{
this.allCommandsBlocked = allCommandsBlocked;
}
public boolean isSuperadminIdVerified()
{
return superadminIdVerified;
}
public void setSuperadminIdVerified(boolean superadminIdVerified)
{
this.superadminIdVerified = superadminIdVerified;
}
public boolean isCmdspyEnabled()
{
return cmdspyEnabled;
}
public void setCmdspyEnabled(boolean cmdspyEnabled)
{
this.cmdspyEnabled = cmdspyEnabled;
}
public boolean isEditBlocked()
{
return editBlocked;
}
public void setEditBlocked(boolean editBlocked)
{
this.editBlocked = editBlocked;
}
public boolean isPvpBlocked()
{
return pvpBlocked;
}
public void setPvpBlocked(boolean pvpBlocked)
{
this.pvpBlocked = pvpBlocked;
}
public boolean isInvSee()
{
return invSee;
}
public void setInvSee(boolean invSee)
{
this.invSee = invSee;
}
private static class ArrowShooter extends BukkitRunnable
{
private final Player player;
private ArrowShooter(Player player)
{
this.player = player;
}
@Override
public void run()
{
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 (player != null)
{
Arrow shot = player.launchProjectile(Arrow.class);
shot.setVelocity(shot.getVelocity().multiply(2.0));
}
}
}
}