Skip to content

EssentialsX does not load on Folia #6633

Description

@lewisgibson

Type of bug

Compatibility issue, Error in console

/ess dump all output

not available, EssentialsX does not enable on Folia so the command does not exist.

Error log (if applicable)

[21:19:07 ERROR]: [DirectoryProviderSource] Error loading plugin: Could not load plugin 'Essentials v2.22.1-dev+25-cfb6f12' as it is not marked as supporting Folia!

With folia-supported: true added to the plugin.yml and nothing else changed, enabling fails on the first use of the Bukkit scheduler:

[21:42:37 ERROR]: Error occurred while enabling Essentials v2.22.1-dev+25-cfb6f12 (Is it up to date?)
java.lang.UnsupportedOperationException
	at org.bukkit.craftbukkit.scheduler.CraftScheduler.handle(CraftScheduler.java:517)
	at org.bukkit.craftbukkit.scheduler.CraftScheduler.runTaskTimer(CraftScheduler.java:227)
	at org.bukkit.craftbukkit.scheduler.CraftScheduler.scheduleSyncDelayedTask(CraftScheduler.java:168)
	at com.earth2me.essentials.Essentials.scheduleSyncDelayedTask(Essentials.java:1262)
	at com.earth2me.essentials.economy.EconomyLayers.onEnable(EconomyLayers.java:35)
	at com.earth2me.essentials.Essentials.onEnable(Essentials.java:330)

Bug description

EssentialsX cannot run on Folia. Folia does not load a plugin whose plugin.yml does not set folia-supported: true, and none of the EssentialsX modules do. Beyond that, the plugin uses the Bukkit scheduler throughout (scheduleSyncDelayedTask, runTaskAsynchronously and so on), which Folia does not support, and it teleports, spawns, kills and reads blocks from whichever thread runs the command, while Folia only allows the thread that owns an entity, block or chunk to touch it, and the global thread to change the world clock and the weather.

Steps to reproduce

  1. Start Folia 26.x
  2. Put the EssentialsX jar in plugins
  3. EssentialsX is not loaded. With folia-supported: true set it still fails to enable, as above. With the scheduler calls replaced as well, commands such as /kill, /spawnmob and /gc still throw Thread failed main thread check when the player or location involved is in another region.

Expected behaviour

EssentialsX loads on Folia, and its commands, signs and timers work from any region.

Actual behaviour

EssentialsX is not loaded.

Additional Information

I have an implementation I would like to propose: a scheduling provider that falls back to the Bukkit scheduler on every other server so nothing changes there, and an end to end test run of the commands on Folia and Paper. I would like to open it once this is acknowledged.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions