PowerNukkitX / PowerNukkitX-Legacy

GNU General Public License v3.0
6 stars 4 forks source link

Bug in Configs #30

Open MrHoller opened 1 year ago

MrHoller commented 1 year ago

🐞 I found a bug

If you create two different plugins, write in onEnable() in both saveDefaultConfig() and put different config.yml in resources of both plugins Then when you turn on the server in both plugins, the same config from the first loaded plugin will be saved sorry for my bad english

📸 Screenshots / Videos

1 2

▶ Steps to Reproduce

  1. Paste the two plugins into the plugins folder (plugins below)
  2. Run server
  3. Look config.yml

✔ Expected Behavior

Configs work fine

❌ Actual Behavior

Configs are not working correctly

📋 Debug information

💢 Crash Dump, Stack Trace and Other Files

sources_and_jars.zip

IndianBartonka commented 1 year ago

i think it's not a bug, you just have two plugins with the same packgate names, next time name them like this for example: me.author name.PluginName me.indian.Ostag You just need to have different packgate names :)

IndianBartonka commented 1 year ago

And you can also load config in onLoad method

@Override
    public void onLoad() {
        this.saveDefaultConfig();
}
MrHoller commented 1 year ago

i think it's not a bug, you just have two plugins with the same packgate names, next time name them like this for example: me.author name.PluginName me.indian.Ostag You just need to have different packgate names :)

I attached plugins with different names, if you take a clean server and run only these two plugins, you will get the same result

IndianBartonka commented 1 year ago

i think it's not a bug, you just have two plugins with the same packgate names, next time name them like this for example: me.author name.PluginName me.indian.Ostag You just need to have different packgate names :)

I attached plugins with different names, if you take a clean server and run only these two plugins, you will get the same result

yes the names are different but the package names are still the same which causes this error, it doesn't work the same as on bukkit

IndianBartonka commented 1 year ago

in JukeboxMc(https://github.com/LucGamesYT/JukeboxMC) I get a similar error, but there it just loads only one plugin

MrHoller commented 1 year ago

i think it's not a bug, you just have two plugins with the same packgate names, next time name them like this for example: me.author name.PluginName me.indian.Ostag You just need to have different packgate names :)

I attached plugins with different names, if you take a clean server and run only these two plugins, you will get the same result

yes the names are different but the package names are still the same which causes this error, it doesn't work the same as on bukkit

Okay, I did make a mistake while copying. Now I fixed it and, on your advice, added it to onLoad() but the problem did not disappear sources_and_jars2.zip

IndianBartonka commented 1 year ago

i think it's not a bug, you just have two plugins with the same packgate names, next time name them like this for example: me.author name.PluginName me.indian.Ostag You just need to have different packgate names :)

I attached plugins with different names, if you take a clean server and run only these two plugins, you will get the same result

yes the names are different but the package names are still the same which causes this error, it doesn't work the same as on bukkit

Okay, I did make a mistake while copying. Now I fixed it and, on your advice, added it to onLoad() but the problem did not disappear sources_and_jars2.zip

Emmmm show you're console