mirror of
https://github.com/exituser/Brewery.git
synced 2026-09-17 07:49:03 +00:00
Fixed Distilling
This commit is contained in:
@@ -335,7 +335,8 @@ public class P extends JavaPlugin {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
p.log("Update");
|
||||
long time = System.nanoTime();
|
||||
|
||||
for (BCauldron cauldron : BCauldron.bcauldrons) {
|
||||
cauldron.onUpdate();// runs every min to update cooking time
|
||||
}
|
||||
@@ -344,8 +345,16 @@ public class P extends JavaPlugin {
|
||||
|
||||
if (lastSave >= autosave) {
|
||||
saveData();// save all data
|
||||
|
||||
time = System.nanoTime() - time;
|
||||
float ftime = (float) (time / 1000000.0);
|
||||
p.log("Update and saving (" + ftime + "ms)");
|
||||
} else {
|
||||
lastSave++;
|
||||
|
||||
time = System.nanoTime() - time;
|
||||
float ftime = (float) (time / 1000000.0);
|
||||
p.log("Update (" + ftime + "ms)");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user