Allow explosions, blood, and arrow trails to be turned off globally
This commit is contained in:
parent
2011aac324
commit
7975674c6c
|
@ -203,4 +203,18 @@ public class Config {
|
|||
return getConfiguration().getBoolean("mutations.enabled", true);
|
||||
}
|
||||
}
|
||||
|
||||
public static class Effects {
|
||||
public static boolean blood() {
|
||||
return getConfiguration().getBoolean("effects.blood", true);
|
||||
}
|
||||
|
||||
public static boolean explosions() {
|
||||
return getConfiguration().getBoolean("effects.explosions", true);
|
||||
}
|
||||
|
||||
public static boolean trails() {
|
||||
return getConfiguration().getBoolean("effects.trails", true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
|||
import org.bukkit.event.entity.EntityDamageEvent;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
import tc.oc.commons.bukkit.settings.SettingManagerProvider;
|
||||
import tc.oc.pgm.Config;
|
||||
import tc.oc.pgm.events.ListenerScope;
|
||||
import tc.oc.pgm.match.MatchModule;
|
||||
import tc.oc.pgm.match.MatchScope;
|
||||
|
@ -50,4 +51,8 @@ public class BloodMatchModule extends MatchModule implements Listener {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldLoad() {
|
||||
return Config.Effects.blood();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@ import org.bukkit.event.EventPriority;
|
|||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.block.BlockExplodeEvent;
|
||||
import org.bukkit.event.entity.EntityExplodeEvent;
|
||||
import tc.oc.pgm.Config;
|
||||
import tc.oc.pgm.events.ListenerScope;
|
||||
import tc.oc.pgm.match.MatchModule;
|
||||
import tc.oc.pgm.match.MatchScope;
|
||||
|
@ -37,4 +38,8 @@ public class LongRangeExplosionMatchModule extends MatchModule implements Listen
|
|||
render(event.getBlock().getLocation());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldLoad() {
|
||||
return Config.Effects.explosions();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ import org.bukkit.event.Listener;
|
|||
import org.bukkit.event.entity.ProjectileHitEvent;
|
||||
import org.bukkit.event.entity.ProjectileLaunchEvent;
|
||||
import org.bukkit.metadata.FixedMetadataValue;
|
||||
import tc.oc.pgm.Config;
|
||||
import tc.oc.pgm.PGM;
|
||||
import tc.oc.pgm.events.ListenerScope;
|
||||
import tc.oc.pgm.match.MatchModule;
|
||||
|
@ -87,4 +88,8 @@ public class ProjectileTrailMatchModule extends MatchModule implements Listener
|
|||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldLoad() {
|
||||
return Config.Effects.trails();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue