mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2025-02-18 13:21:46 +01:00
Added an option to disable particle effects on deny
This commit is contained in:
parent
f235e870a7
commit
a6261b9071
@ -77,6 +77,7 @@ public abstract class ConfigurationManager {
|
|||||||
public boolean blockInGameOp;
|
public boolean blockInGameOp;
|
||||||
public boolean migrateRegionsToUuid;
|
public boolean migrateRegionsToUuid;
|
||||||
public boolean keepUnresolvedNames;
|
public boolean keepUnresolvedNames;
|
||||||
|
public boolean particleEffects;
|
||||||
|
|
||||||
@Unreported public Map<String, String> hostKeys = new HashMap<>();
|
@Unreported public Map<String, String> hostKeys = new HashMap<>();
|
||||||
public boolean hostKeysAllowFMLClients;
|
public boolean hostKeysAllowFMLClients;
|
||||||
|
@ -62,6 +62,7 @@ public void load() {
|
|||||||
config.removeProperty("auto-invincible-permission");
|
config.removeProperty("auto-invincible-permission");
|
||||||
usePlayerMove = config.getBoolean("use-player-move-event", true);
|
usePlayerMove = config.getBoolean("use-player-move-event", true);
|
||||||
usePlayerTeleports = config.getBoolean("use-player-teleports", true);
|
usePlayerTeleports = config.getBoolean("use-player-teleports", true);
|
||||||
|
particleEffects = config.getBoolean("use-particle-effects", true);
|
||||||
|
|
||||||
deopOnJoin = config.getBoolean("security.deop-everyone-on-join", false);
|
deopOnJoin = config.getBoolean("security.deop-everyone-on-join", false);
|
||||||
blockInGameOp = config.getBoolean("security.block-in-game-op-command", false);
|
blockInGameOp = config.getBoolean("security.block-in-game-op-command", false);
|
||||||
|
@ -1046,11 +1046,15 @@ private boolean isItemAppliedToBlock(ItemStack item, Block clicked) {
|
|||||||
|
|
||||||
private void playDenyEffect(Player player, Location location) {
|
private void playDenyEffect(Player player, Location location) {
|
||||||
//player.playSound(location, Sound.SUCCESSFUL_HIT, 0.2f, 0.4f);
|
//player.playSound(location, Sound.SUCCESSFUL_HIT, 0.2f, 0.4f);
|
||||||
player.playEffect(location, Effect.SMOKE, BlockFace.UP);
|
if (WorldGuard.getInstance().getPlatform().getGlobalStateManager().particleEffects) {
|
||||||
|
player.playEffect(location, Effect.SMOKE, BlockFace.UP);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void playDenyEffect(Location location) {
|
private void playDenyEffect(Location location) {
|
||||||
location.getWorld().playEffect(location, Effect.SMOKE, BlockFace.UP);
|
if (WorldGuard.getInstance().getPlatform().getGlobalStateManager().particleEffects) {
|
||||||
|
location.getWorld().playEffect(location, Effect.SMOKE, BlockFace.UP);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class SpigotCompatListener implements Listener {
|
public class SpigotCompatListener implements Listener {
|
||||||
|
Loading…
Reference in New Issue
Block a user