mirror of
https://github.com/exituser/Brewery.git
synced 2026-09-17 06:38:56 +00:00
When unloading world, only save if it has data
This commit is contained in:
@@ -535,6 +535,13 @@ public class BCauldron {
|
||||
return bcauldrons.remove(block) != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Are any Cauldrons in that World
|
||||
*/
|
||||
public static boolean hasDataInWorld(String name) {
|
||||
return bcauldrons.keySet().stream().anyMatch(block -> block.getWorld().getName().equals(name));
|
||||
}
|
||||
|
||||
// unloads cauldrons that are in a unloading world
|
||||
// as they were written to file just before, this is safe to do
|
||||
public static void onUnload(String name) {
|
||||
|
||||
Reference in New Issue
Block a user