mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-11-02 17:00:19 +01:00
Fix games not marked as started
This commit is contained in:
parent
ff7e8dbf5f
commit
cf557a61e2
@ -170,7 +170,10 @@ public class EntityListener implements Listener {
|
||||
DGroup attackerDGroup = null;
|
||||
DGroup attackedDGroup = null;
|
||||
|
||||
if (attackerEntity instanceof LivingEntity && attackedEntity instanceof LivingEntity) {
|
||||
if (!(attackerEntity instanceof LivingEntity) || !(attackedEntity instanceof LivingEntity)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (attackerEntity instanceof Player && attackedEntity instanceof Player) {
|
||||
attackerPlayer = (Player) attackerEntity;
|
||||
attackedPlayer = (Player) attackedEntity;
|
||||
@ -180,11 +183,13 @@ public class EntityListener implements Listener {
|
||||
|
||||
if (!pvp) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
if (attackerDGroup != null && attackedDGroup != null) {
|
||||
if (!friendlyFire && attackerDGroup.equals(attackedDGroup)) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -216,7 +221,6 @@ public class EntityListener implements Listener {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Deny food in Lobby
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
|
@ -698,6 +698,8 @@ public class DGamePlayer extends DInstancePlayer {
|
||||
respawn();
|
||||
}
|
||||
}
|
||||
|
||||
game.setStarted(true);
|
||||
}
|
||||
|
||||
public void respawn() {
|
||||
|
Loading…
Reference in New Issue
Block a user