mirror of
https://github.com/songoda/UltimateStacker.git
synced 2025-01-16 20:41:28 +01:00
Re-added the spawn reason set metadata.
This commit is contained in:
parent
48e47435f6
commit
cc8c616c5f
@ -22,11 +22,9 @@ import org.bukkit.entity.TNTPrimed;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
||||
import org.bukkit.event.entity.EntityExplodeEvent;
|
||||
import org.bukkit.event.entity.EntityTransformEvent;
|
||||
import org.bukkit.event.entity.ItemSpawnEvent;
|
||||
import org.bukkit.event.entity.*;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.metadata.FixedMetadataValue;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@ -89,7 +87,11 @@ public class EntityListeners implements Listener {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
|
||||
public void onSpawn(CreatureSpawnEvent event) {
|
||||
event.getEntity().setMetadata("US_REASON", new FixedMetadataValue(plugin, event.getSpawnReason().name()));
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||
public void onBlow(EntityExplodeEvent event) {
|
||||
if (!plugin.spawnersEnabled()) return;
|
||||
|
Loading…
Reference in New Issue
Block a user