mirror of
https://github.com/BentoBoxWorld/Limits.git
synced 2024-09-27 14:12:57 +02:00
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:
parent
33d16d16e2
commit
0c107f2bab
@ -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();
|
||||||
|
Loading…
Reference in New Issue
Block a user