Towny Classic

Towny Classic

3.2k Downloads

LoadedMetadataEvent does not fire off on Folia

CorruptedGreed opened this issue ยท 1 comments

commented

What steps will reproduce the problem?

  1. Launch a Folia server jar with a plugin listening for LoadedMetadataEvent
public class LoadedMetaDataListener implements Listener {
    @EventHandler
    public void onMetaLoaded(LoadedMetadataEvent event) {
        System.out.println("LoadedMetadataEvent event happened");
    }
}
  1. The event does not happen
    image

What is the expected output?

"LoadedMetadataEvent event happened" printed in console

For Paper:
image

Towny version

Towny 0.100.3.0

Server version

1.20.4 Folia

Please use Pastebin.com to link the following files

  1. Your full server startup from the logs\latest.log: https://pastebin.com/8uPpGuSm
  2. Your Towny config.yml: https://pastebin.com/Uzuk0rL8
  3. Your townyperms.yml: https://pastebin.com/pbZJuSut
commented

This bug was fixed in the affected plugin by registering the deserializer in onLoad instead of onEnable, since the event currently does not fire if no metadata was loaded - #7531 addresses that