Guest User

Untitled

a guest
May 5th, 2018
107
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @SubscribeEvent(priority = EventPriority.LOWEST)
  2. public void onDeath(LivingDeathEvent e)
  3. {
  4. if(e.getEntity() instanceof EntityPlayerMP)
  5. {
  6. EntityPlayerMP player = (EntityPlayerMP)e.getEntity();
  7. World oldWorld = player.world;
  8. player.connection.player = player.getServer().getPlayerList().recreatePlayerEntity(player, player.dimension, false);
  9. if(oldWorld.provider.getDimension() == 1)
  10. EntityUtil.removeDragonBars(oldWorld);
  11. e.setCanceled(true);
  12. }
  13. }
RAW Paste Data