Amulet-Team / Amulet-Map-Editor

A new Minecraft world editor and converter that supports all versions since Java 1.12 and Bedrock 1.7.
https://www.amuletmc.com/
1.73k stars 122 forks source link

[Bug Report] Plugins failing to load because of Plugin Name! #873

Open StealthyExpertX opened 1 year ago

StealthyExpertX commented 1 year ago

Bug Report

There is a bug where some plugins will fail to load and will not display an error in the console because of the plugin names.

The causes of this bug include: Plugin name being too long, having "_" underscores or other special characters, numbers, extra "." dots or if capitals exist in the file names.

Having a plugin named the following breaks it. "set_can_place_can_destroy_v1.0.1.py"

Current Behaviour:

The plugin name being too long, having "_" underscores or other special characters, numbers, extra "." dots or if capitals exist in the file names will prevent it from loading and will not show console log errors when the plugin fails to load.

Expected behavior:

The plugin name should be able to use underscores, capitals, not have a character limit and be able use numbers, underscores and other special characters in the names without it failing to load, and if for some reason it did end up failing to load it should tell users why it failed rather then being left ignored.

Steps To Reproduce:

Environment:

Additional context

Seems this has been an issue for awhile but only just caught wind of the actual cause.

Attachments

Screenshots

Screenshot of the plugin not showing when pressing the reload/refresh plugin. image

Screenshot of the Amulet Console not showing any errors on reload/refresh. image

Screenshot of Amulet Operations directory with the plugin. image

Here's a test that I did with an unfinished plugin that has an error/unfinished but shows no errors when reloading/refreshing. But after renaming it displays the errors like it was meant to in the first place. debug_test

Worlds

N/A

gentlegiantJGC commented 1 year ago

The file name needs to be a valid python identifier. This won't be an issue in the Qt version.

StealthyExpertX commented 1 year ago

Even then if it's not it should throw an error in the console, or at least it should have in my opinion.