Shevchik / AutoSaveWorld

Bukkit plugin that provides advanced bukkit server management capabilities. Supports automatic saves, backups, stale data purge, plugin management, and more.
GNU General Public License v3.0
35 stars 36 forks source link

Possible fix for 1.13 #51

Open mattboy9921 opened 5 years ago

mattboy9921 commented 5 years ago

It appears that saveLevel() is absent from WorldServer.java in 1.13. All I've done is take what saveLevel() was doing which is this.dataManager.a() and have the reflection util get the dataManager object and invoke the a() method on it.

I am of course very new to reflection but after some basic testing, I am no longer getting any errors in console. I hope I've called everything correctly and this results in proper saving. Please advise!

MarkElf commented 5 years ago

I hate to ask but can you provide a compiled version with this change for 1.13? I'd really appreciate it.

mattboy9921 commented 5 years ago

Sure. Here's the version I was using on my server. I actually learned that with Paper, it's easier to rely on the built in saving mechanics and just use a shell script to back up worlds which is what I switched to just a few weeks ago.

Here's the link: https://mega.nz/#!hkUiSaJa!nZvjVV8VUjvEg2upVCVw4aQS2ezG73mgPdgbQVdGRFo

MarkElf commented 5 years ago

I've gotten comfortable using autosaveworld for backing up worlds, plugins, and reboot the server at midnight / off hours for years now otherwise I'd probably consider a shell script at server startup. Regardless, thank you so much.

encode42 commented 5 years ago

This fix works. The annoying console-spam message is gone! Thank you,

TheRandomLabs commented 5 years ago

Here's a version that appears to be working for 1.14.3. Take the .txt file extension off so it's recognized as a jar file. AutoSaveWorld.jar.txt

TheRandomLabs commented 5 years ago

This version should work for 1.14.4 with Google Drive support. I haven't tested this. AutoSaveWorld.jar.txt

J0B10 commented 4 years ago

Thanks @TheRandomLabs for the 1.14.4 fix. Do you have the source code, I'dd be interested in the changes you made.

TheRandomLabs commented 4 years ago

You're welcome. I don't have the source anymore, but I'm pretty sure I just updated some method names. It was a simple fix.

xazes commented 4 years ago

Hi now i become this error: [AutoSaveWorld] Could not dump RegionFileCache java.lang.RuntimeException: Can't find method r with params length 0