Teleport dead people
This commit is contained in:
parent
4c38a5878f
commit
24d71e09fe
@ -14,7 +14,7 @@ import com.google.common.collect.Sets;
|
||||
import mineplex.core.MiniPlugin;
|
||||
import mineplex.core.ReflectivelyCreateMiniPlugin;
|
||||
import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.gemhunters.world.WorldDataModule;
|
||||
import mineplex.gemhunters.spawn.SpawnModule;
|
||||
|
||||
/**
|
||||
* This module handles anything to do with a players death
|
||||
@ -28,13 +28,13 @@ public class DeathModule extends MiniPlugin
|
||||
// Some items like the cash out item (and for some reason players drop bones?) don't need to be dropped to avoid duplication.
|
||||
private static final Set<Material> DISALLOWED_DROPS = Sets.newHashSet(Material.EMERALD, Material.BONE);
|
||||
|
||||
private final WorldDataModule _worldData;
|
||||
private final SpawnModule _spawn;
|
||||
|
||||
private DeathModule()
|
||||
{
|
||||
super("Death");
|
||||
|
||||
_worldData = require(WorldDataModule.class);
|
||||
_spawn = require(SpawnModule.class);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@ -45,7 +45,7 @@ public class DeathModule extends MiniPlugin
|
||||
// Stop the player dieing
|
||||
player.setHealth(20);
|
||||
UtilAction.zeroVelocity(player);
|
||||
player.teleport(_worldData.getSpawnLocation("Yellow").get(0));
|
||||
_spawn.teleportToSpawn(player);
|
||||
|
||||
Iterator<ItemStack> iterator = event.getDrops().iterator();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user