mirror of
https://github.com/BentoBoxWorld/Limits.git
synced 2024-11-26 12:45:56 +01:00
Add special handling for armor stands for jetsminions
https://github.com/BentoBoxWorld/Limits/issues/99
This commit is contained in:
parent
1870a309f7
commit
33d16d16e2
@ -42,6 +42,7 @@ public class EntityLimitListener implements Listener {
|
|||||||
private static final String MOD_BYPASS = "mod.bypass";
|
private static final String MOD_BYPASS = "mod.bypass";
|
||||||
private final Limits addon;
|
private final Limits addon;
|
||||||
private final List<UUID> justSpawned = new ArrayList<>();
|
private final List<UUID> justSpawned = new ArrayList<>();
|
||||||
|
private final boolean jetsMinions;
|
||||||
private static final List<BlockFace> CARDINALS;
|
private static final List<BlockFace> CARDINALS;
|
||||||
static {
|
static {
|
||||||
List<BlockFace> cardinals = new ArrayList<>();
|
List<BlockFace> cardinals = new ArrayList<>();
|
||||||
@ -61,6 +62,8 @@ public class EntityLimitListener implements Listener {
|
|||||||
public EntityLimitListener(Limits addon) {
|
public EntityLimitListener(Limits addon) {
|
||||||
this.addon = addon;
|
this.addon = addon;
|
||||||
justSpawned.clear();
|
justSpawned.clear();
|
||||||
|
// Check for JetsMinions
|
||||||
|
jetsMinions = Bukkit.getPluginManager().getPlugin("JetsMinions") != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -143,6 +146,12 @@ public class EntityLimitListener implements Listener {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Some checks can be done async, some not
|
// Some checks can be done async, some not
|
||||||
|
// Special handling for JetsMinions
|
||||||
|
if (jetsMinions && e.getEntityType().equals(EntityType.ARMOR_STAND)) {
|
||||||
|
// Check limit sync
|
||||||
|
checkLimit(e, e.getEntity(), e.getSpawnReason(), bypass, false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
switch (e.getSpawnReason()) {
|
switch (e.getSpawnReason()) {
|
||||||
case BEEHIVE:
|
case BEEHIVE:
|
||||||
case BREEDING:
|
case BREEDING:
|
||||||
|
Loading…
Reference in New Issue
Block a user