Why won't the mob summon (Minecraft / plugin)?

Sp
- in Plugins
4

Error code:

Source code:

Ri

I don't write in Java, so I can't really say much about it.

But somehow I don't see a place where the void is called

Dr

SpawnEntity spawns the entity and returns the spawned entity at the same time

Dr

There you are trying to spawn an entity asynchronously. Apparently that is not possible.

Try it like this:

Bukkit.getScheduler (). ScheduleRepeatSyncTask (Bukkit.getPluginManager (). GetPlugin ("PLUGINNAME"), () → {
Entity skelleton = p.getWorld (). SpawnEntity (p.getLocation (), EntityType.SKELETON);
}, 1000L, 30000L);

(Or something like xd

Sp

I did not copy the class in which I call the class "vassals", because otherwise it could be too much