26 lines
655 B
Java
26 lines
655 B
Java
package tech.nevets.admininv;
|
|
|
|
import org.bukkit.scheduler.BukkitRunnable;
|
|
|
|
import java.util.Collection;
|
|
import java.util.Iterator;
|
|
|
|
public class SaveInventories extends BukkitRunnable {
|
|
private Collection<SerializablePlayerInventory> inventories;
|
|
|
|
public SaveInventories(Collection<SerializablePlayerInventory> toSave) {
|
|
this.inventories = toSave;
|
|
}
|
|
|
|
public void run() {
|
|
Iterator i$ = this.inventories.iterator();
|
|
|
|
while(i$.hasNext()) {
|
|
SerializablePlayerInventory inv = (SerializablePlayerInventory)i$.next();
|
|
if (inv != null) {
|
|
inv.save();
|
|
}
|
|
}
|
|
|
|
}
|
|
} |