mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-26 20:45:43 +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 migrateRegionsToUuid;
|
||||
public boolean keepUnresolvedNames;
|
||||
public boolean particleEffects;
|
||||
|
||||
@Unreported public Map<String, String> hostKeys = new HashMap<>();
|
||||
public boolean hostKeysAllowFMLClients;
|
||||
|
@ -62,6 +62,7 @@ public void load() {
|
||||
config.removeProperty("auto-invincible-permission");
|
||||
usePlayerMove = config.getBoolean("use-player-move-event", true);
|
||||
usePlayerTeleports = config.getBoolean("use-player-teleports", true);
|
||||
particleEffects = config.getBoolean("use-particle-effects", true);
|
||||
|
||||
deopOnJoin = config.getBoolean("security.deop-everyone-on-join", 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) {
|
||||
//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) {
|
||||
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 {
|
||||
|
Loading…
Reference in New Issue
Block a user