mirror of
				https://github.com/mcMMO-Dev/mcMMO.git
				synced 2025-10-31 01:03:44 +01:00 
			
		
		
		
	| @@ -174,6 +174,10 @@ public class EntityListener implements Listener { | |||||||
|             Player defendingPlayer = (Player) defender; |             Player defendingPlayer = (Player) defender; | ||||||
|             Player attackingPlayer = (Player) attacker; |             Player attackingPlayer = (Player) attacker; | ||||||
|  |  | ||||||
|  |             if (!UserManager.hasPlayerDataKey(defendingPlayer) || !UserManager.hasPlayerDataKey(attackingPlayer)) { | ||||||
|  |                 return; | ||||||
|  |             } | ||||||
|  |  | ||||||
|             // We want to make sure we're not gaining XP or applying abilities when we hit ourselves |             // We want to make sure we're not gaining XP or applying abilities when we hit ourselves | ||||||
|             if (defendingPlayer.equals(attackingPlayer)) { |             if (defendingPlayer.equals(attackingPlayer)) { | ||||||
|                 return; |                 return; | ||||||
| @@ -226,6 +230,11 @@ public class EntityListener implements Listener { | |||||||
|  |  | ||||||
|         if (livingEntity instanceof Player) { |         if (livingEntity instanceof Player) { | ||||||
|             Player player = (Player) entity; |             Player player = (Player) entity; | ||||||
|  |  | ||||||
|  |             if (!UserManager.hasPlayerDataKey(player)) { | ||||||
|  |                 return; | ||||||
|  |             } | ||||||
|  |  | ||||||
|             McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player); |             McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player); | ||||||
|  |  | ||||||
|             /* Check for invincibility */ |             /* Check for invincibility */ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 TfT_02
					TfT_02