mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-01-25 01:21:21 +01:00
Fix bug with MythicMobs changes #2340
This commit is contained in:
parent
3de0ff236e
commit
ffb955b22b
@ -286,6 +286,9 @@ public class BlueprintEntity {
|
||||
* @return the mythicMobsRecord
|
||||
*/
|
||||
public MythicMobRecord getMythicMobsRecord() {
|
||||
if (this.MMtype == null || this.MMLevel == null || this.MMpower == null || this.MMStance == null) {
|
||||
return null;
|
||||
}
|
||||
return new MythicMobRecord(this.MMtype, this.getCustomName(), this.MMLevel, this.MMpower, this.MMStance);
|
||||
}
|
||||
|
||||
|
@ -55,6 +55,9 @@ public class MythicMobsHook extends Hook {
|
||||
* @return true if spawn is successful
|
||||
*/
|
||||
public boolean spawnMythicMob(MythicMobRecord mmr, Location spawnLocation) {
|
||||
if (!this.isPluginAvailable()) {
|
||||
return false;
|
||||
}
|
||||
return MythicBukkit.inst().getMobManager().getMythicMob(mmr.type()).map(mob -> {
|
||||
// A delay is required before spawning, I assume because the blocks are pasted using NMS
|
||||
Bukkit.getScheduler().runTaskLater(getPlugin(), () -> {
|
||||
|
Loading…
Reference in New Issue
Block a user