From 6a3b4db565f907912db478ca6779cebf1e801d06 Mon Sep 17 00:00:00 2001 From: Svenja Reissaus Date: Thu, 2 Aug 2018 11:29:41 -0300 Subject: [PATCH] Added config to allow vanished players to hide particles for moderation purposes --- src/main/java/com/massivecraft/factions/cmd/CmdFly.java | 8 ++++++++ src/main/resources/config.yml | 1 + 2 files changed, 9 insertions(+) diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFly.java b/src/main/java/com/massivecraft/factions/cmd/CmdFly.java index f80e3a8a..9cecc206 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFly.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdFly.java @@ -58,6 +58,14 @@ public class CmdFly extends FCommand { continue; } + if (FPlayers.getInstance().getByPlayer(player).isVanished()) { + // Actually, vanished players (such as admins) should not display particles to prevent others from knowing their vanished assistance for moderation. + // But we can keep it as a config. + if (P.p.getConfig().getBoolean("ffly.Particles.Enable-While-Vanished")) { + return; + } + continue; + } if (P.p.useNonPacketParticles) { // 1.9+ based servers will use the built in particleAPI instead of packet based. // any particle amount higher than 0 made them go everywhere, and the offset at 0 was not working. diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index a1297935..d227629b 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -65,6 +65,7 @@ enable-faction-flight: true ffly: Particles: Enabled: true + Enable-While-Vanished: true AutoEnable: true #If set to true, fly will automatically enable when walking into your own chunk.