package org.c4k3.Events;

import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.PlayerDeathEvent;

/** Class is responsible for listening to player deaths
 * and making sure no xp is dropped in the events
 */
public class PlayerDeath implements Listener {

	@EventHandler(priority = EventPriority.NORMAL,ignoreCancelled=true)
	public void onPlayerDeath(PlayerDeathEvent event) {

		if ( Event.isPlayerActive(event.getEntity().getUniqueId()) ) {

			event.setDroppedExp(0);

		}

	}

}

@@ -19,16 +19,77 @@
 vents;%0A%0A
+import org.bukkit.GameMode;%0Aimport org.bukkit.entity.Player;%0A
 import o
@@ -114,24 +114,24 @@
 entHandler;%0A
-
 import org.b
@@ -347,16 +347,65 @@
  events%0A
+ * and that players don't keep any set gamemodes%0A
  */%0Apubl
@@ -637,16 +637,16 @@
 )) ) %7B%0A%0A
-
 %09%09%09event
@@ -670,14 +670,172 @@
 ;%0A%0A%09%09%7D%0A%0A
+%09%09Player player = event.getEntity();%0A%0A%09%09if ( !player.isOp() && player.getGameMode() != GameMode.SURVIVAL ) %7B%0A%0A%09%09%09player.setGameMode(GameMode.SURVIVAL);%0A%0A%09%09%7D%0A%0A
 %09%7D%0A%0A%7D%0A

Fix players being able to /kill after restart to leave with gm1