Added config to allow vanished players to hide particles for moderation purposes

This commit is contained in:
Svenja Reissaus 2018-08-02 11:29:41 -03:00
parent cbb7d478a7
commit 6a3b4db565
2 changed files with 9 additions and 0 deletions

View File

@ -58,6 +58,14 @@ public class CmdFly extends FCommand {
continue; 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) { if (P.p.useNonPacketParticles) {
// 1.9+ based servers will use the built in particleAPI instead of packet based. // 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. // any particle amount higher than 0 made them go everywhere, and the offset at 0 was not working.

View File

@ -65,6 +65,7 @@ enable-faction-flight: true
ffly: ffly:
Particles: Particles:
Enabled: true Enabled: true
Enable-While-Vanished: true
AutoEnable: true #If set to true, fly will automatically enable when walking into your own chunk. AutoEnable: true #If set to true, fly will automatically enable when walking into your own chunk.