Potionspy remake

Remade the entire potionspy and monitor class to avoid spam in the chat.

Furthermore, there is now a way to look at a history of potions thrown (individually and globally) however this history is limited to avoid too much useless data in the memory.
This commit is contained in:
CoolJWB
2020-07-14 21:00:22 +02:00
parent cb108e0c13
commit 6e622ad2f3
4 changed files with 357 additions and 48 deletions

View File

@ -208,7 +208,8 @@ public class EventBlocker extends FreedomService
// TODO: Revert back to old redstone block system when (or if) it is fixed in Bukkit, Spigot or Paper.
private ArrayList<Material> redstoneBlocks = new ArrayList<>(Arrays.asList(Material.REDSTONE, Material.DISPENSER, Material.DROPPER, Material.REDSTONE_LAMP));
@EventHandler
public void onBlockPhysics(BlockPhysicsEvent event) {
public void onBlockPhysics(BlockPhysicsEvent event)
{
if (!ConfigEntry.ALLOW_REDSTONE.getBoolean())
{
// Check if the block is involved with redstone.