mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-11-25 03:55:22 +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 attackerDGroup = null;
|
||||||
DGroup attackedDGroup = 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) {
|
if (attackerEntity instanceof Player && attackedEntity instanceof Player) {
|
||||||
attackerPlayer = (Player) attackerEntity;
|
attackerPlayer = (Player) attackerEntity;
|
||||||
attackedPlayer = (Player) attackedEntity;
|
attackedPlayer = (Player) attackedEntity;
|
||||||
@ -180,11 +183,13 @@ public class EntityListener implements Listener {
|
|||||||
|
|
||||||
if (!pvp) {
|
if (!pvp) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (attackerDGroup != null && attackedDGroup != null) {
|
if (attackerDGroup != null && attackedDGroup != null) {
|
||||||
if (!friendlyFire && attackerDGroup.equals(attackedDGroup)) {
|
if (!friendlyFire && attackerDGroup.equals(attackedDGroup)) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -216,7 +221,6 @@ public class EntityListener implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Deny food in Lobby
|
// Deny food in Lobby
|
||||||
@EventHandler(priority = EventPriority.HIGH)
|
@EventHandler(priority = EventPriority.HIGH)
|
||||||
|
@ -698,6 +698,8 @@ public class DGamePlayer extends DInstancePlayer {
|
|||||||
respawn();
|
respawn();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
game.setStarted(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void respawn() {
|
public void respawn() {
|
||||||
|
Loading…
Reference in New Issue
Block a user