Temporarily not do async checked for entity spawns

https://github.com/BentoBoxWorld/Limits/issues/98
https://github.com/BentoBoxWorld/Limits/issues/100
This commit is contained in:
tastybento 2020-09-17 18:54:02 -07:00
parent 33d16d16e2
commit 0c107f2bab
1 changed files with 3 additions and 3 deletions

View File

@ -181,8 +181,8 @@ public class EntityLimitListener implements Listener {
checkLimit(e, e.getEntity(), e.getSpawnReason(), bypass, false); checkLimit(e, e.getEntity(), e.getSpawnReason(), bypass, false);
break; break;
default: default:
// Check limit async // Check limit sync - TODO, work out why async causes problems.
checkLimit(e, e.getEntity(), e.getSpawnReason(), bypass, true); checkLimit(e, e.getEntity(), e.getSpawnReason(), bypass, false);
break; break;
} }
@ -234,7 +234,7 @@ public class EntityLimitListener implements Listener {
* Check if a creature is allowed to spawn or not * Check if a creature is allowed to spawn or not
* @param e - CreatureSpawnEvent * @param e - CreatureSpawnEvent
* @param bypass - true if the player involved can bypass the checks * @param bypass - true if the player involved can bypass the checks
* @param async * @param async - true if check can be done async, false if not
*/ */
private void checkLimit(Cancellable c, LivingEntity e, SpawnReason reason, boolean bypass, boolean async) { private void checkLimit(Cancellable c, LivingEntity e, SpawnReason reason, boolean bypass, boolean async) {
Location l = e.getLocation(); Location l = e.getLocation();