andrei1058 / BedWars1058

A minecraft minigame where you have to defend your bed and destroy the others. Once your bed is destroyed, you cannot respawn.
GNU General Public License v3.0
270 stars 213 forks source link

Spigot.yml reset issue #769

Open NewPixelDev opened 1 year ago

NewPixelDev commented 1 year ago

Describe the bug After running Bedwars1058, typing reload in the console will reset Spigot.yml. This will delete the original content of Spigot.yml, and then reset all settings and content of Spigot.yml For example, the "bungeecord: true" I originally set in Spigot.yml will be reset and changed to the default "bungeecord: false"

To Reproduce You just need to put "Bedwars1058" into the Plugins folder After running successfully, enter reload in the console

Expected behavior You will find that the content of the Spigot.yml file is deleted and reset to the default Spigot.yml

Screenshots None (because not required)

System (please complete the following information):

Additional context This issue resets the content of Spigot.yml and causes "bungeecord: true" to become the default "bungeecord: false", which causes a series of problems and some security problems, such as Luckperms will not be able to detect, and some systems will fail I have tried the following:

  1. Update the latest version of Bedwars1058 and use Java11, the same situation will still occur
  2. Asked on Discord, but they asked me to report this issue on Guihub, because no one can solve it
bandaohana commented 1 year ago

I have the same problem, I believe since the version described here (22.3.4), initially I thought it was a problem with the ports open on my pc (yes, this only happens on my pc, all my test server is on it) , but recently you sent this and I went to test it, it really is the bw1058 that does this

I don't and never used "/reload" on the bw1058 servers, but the problem still occurs

NewPixelDev commented 1 year ago

I have the same problem, I believe since the version described here (22.3.4), initially I thought it was a problem with the ports open on my pc (yes, this only happens on my pc, all my test server is on it) , but recently you sent this and I went to test it, it really is the bw1058 that does this

I don't and never used "/reload" on the bw1058 servers, but the problem still occurs

Have you found a solution now? This problem has seriously affected my server security and caused some other problems

andrei1058 commented 1 year ago

I don't think bedwars1058 will touch your spigot configuration

bandaohana commented 1 year ago

I don't think bedwars1058 will touch your spigot configuration

I agree with you about him not doing that, it doesn't make sense for that to happen, but my case might be a little different from his, the "spigot.yml" isn't really reset, apparently it's saved in the server's core when to start, I don't understand much about spigot development, but this is basically and literally what happens to me

So much so that I use nLogin and it requires the "BungeeGuardPlus" plugin on all backends, if it detects that "spigot.yml -> bungeecord" is "false" it will shut down the server requiring that you activate it, which doesn't happen to me

The messages present in "spigot.yml -> messages" are custom and present on the server, which is strange as the server clones "bukkit.yml" to "spigot.yml" and keep the spigot.yml configuration

This message is displayed when starting the server, right at the beginning, I've tried to solve it a few times, but I couldn't, there are also some ">WARNING: Illegal reflective access by" messages from a few other plugins and from spigot, I believe that spigot is not managing to download some dependency or something was not downloaded, which is strange, when removing bw1058 nothing happens and none of that appears... image

would this be a problem with the windows firewall? and maybe something with the "socket" (bwproxy/BUNGEE mode) of the bw1058?

NewPixelDev commented 1 year ago

I don't think bedwars1058 will touch your spigot configuration

I agree with you about him not doing that, it doesn't make sense for that to happen, but my case might be a little different from his, the isn't really reset, apparently it's saved in the server's core when to start, I don't understand much about spigot development, but this is basically and literally what happens to me"spigot.yml"

So much so that I use nLogin and it requires the "BungeeGuardPlus" plugin on all backends, if it detects that is it will shut down the server requiring that you activate it, which doesn't happen to me"spigot.yml -> bungeecord"``"false"

The messages present in are custom and present on the server, which is strange as the server clones to and keep the spigot.yml configuration"spigot.yml -> messages"``"bukkit.yml"``"spigot.yml"

This message is displayed when starting the server, right at the beginning, I've tried to solve it a few times, but I couldn't, there are also some messages from a few other plugins and from spigot, I believe that spigot is not managing to download some dependency or something was not downloaded, which is strange, when removing bw1058 nothing happens and none of that appears...">WARNING: Illegal reflective access by" image

would this be a problem with the windows firewall? and maybe something with the "socket" (bwproxy/BUNGEE mode) of the bw1058?

Probably not a Windows Firewall issue I have tried, and turning on the Windows firewall will also reset Spigot.yml Turning off the Windows firewall will also reset Spigot.yml The serverType in my Bedwars1058 config.yml is BUNGEE_LEGACY So this reset Spigot.yml problem is disastrous for my server "Bungee: True" in Spigot.yml will be automatically reset to "Bungee: False" due to reset

andrei1058 commented 1 year ago

I gave it a closer look and found out bedwars is touching the spigot file trying to make some improvements, this could really be the issue. https://github.com/andrei1058/BedWars1058/blob/d9a318d55ec8759c407dcda31959a09abc676725/bedwars-plugin/src/main/java/com/andrei1058/bedwars/configuration/MainConfig.java#L360

NewPixelDev commented 1 year ago

I gave it a closer look and found out bedwars is touching the spigot file trying to make some improvements, this could really be the issue.

https://github.com/andrei1058/BedWars1058/blob/d9a318d55ec8759c407dcda31959a09abc676725/bedwars-plugin/src/main/java/com/andrei1058/bedwars/configuration/MainConfig.java#L360

So can this be fixed in version 22.3.4 please?

Because I'm a server that requires an older version of Java8 Some of my plugins are not compatible with higher Java versions :D