SteamWar/FightSystem
Archiviert
13
1

RecordSystem (Beta) #199

Manuell gemergt
Lixfel hat 40 Commits von recordSystem nach master 2020-11-01 20:11:45 +01:00 zusammengeführt
Nur Änderungen aus Commit f04a9edb41 werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -44,10 +44,12 @@ import org.bukkit.event.server.BroadcastMessageEvent;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import java.util.EnumSet; import java.util.EnumSet;
import java.util.Random;
public class EventRecordListener extends BasicListener { public class EventRecordListener extends BasicListener {
private static final int AIR = 0; private static final int AIR = 0;
private static final Random random = new Random();
public EventRecordListener() { public EventRecordListener() {
super(Config.event() ? EnumSet.allOf(FightState.class) : EnumSet.noneOf(FightState.class)); super(Config.event() ? EnumSet.allOf(FightState.class) : EnumSet.noneOf(FightState.class));
@ -131,7 +133,7 @@ public class EventRecordListener extends BasicListener {
Location loc = e.getLocation(); Location loc = e.getLocation();
RecordSystem.entityDespawns(e.getEntity()); RecordSystem.entityDespawns(e.getEntity());
RecordSystem.particle(loc.getX(), loc.getY(), loc.getZ(), Particle.EXPLOSION_LARGE.name()); RecordSystem.particle(loc.getX(), loc.getY(), loc.getZ(), Particle.EXPLOSION_LARGE.name());
RecordSystem.sound(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), Sound.ENTITY_GENERIC_EXPLODE.name(), SoundCategory.BLOCKS.name(), 255.0f, 1.0f); RecordSystem.sound(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), Sound.ENTITY_GENERIC_EXPLODE.name(), SoundCategory.BLOCKS.name(), 4.0F, (1.0F + (random.nextFloat() - random.nextFloat()) * 0.2F) * 0.7F);
} }
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)