Permalink
Browse files

Added an option to disable particle effects on deny

  • Loading branch information...
me4502 committed Sep 28, 2018
1 parent f235e87 commit a6261b907175f4e947ef8345e03a05563eeef393
@@ -77,6 +77,7 @@
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 {

0 comments on commit a6261b9

Please sign in to comment.