More task scheduling. Fixes #199
This commit is contained in:
@@ -833,30 +833,20 @@ public class ArenaImpl implements Arena
|
|||||||
@Override
|
@Override
|
||||||
public void storeContainerContents()
|
public void storeContainerContents()
|
||||||
{
|
{
|
||||||
plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin,
|
for (Location loc : region.getContainers()) {
|
||||||
new Runnable() {
|
BlockState state = world.getBlockAt(loc).getState();
|
||||||
public void run() {
|
if (state instanceof InventoryHolder) {
|
||||||
for (Location loc : region.getContainers()) {
|
containables.add(new RepairableContainer(state, false));
|
||||||
BlockState state = world.getBlockAt(loc).getState();
|
}
|
||||||
if (state instanceof InventoryHolder) {
|
}
|
||||||
containables.add(new RepairableContainer(state, false));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void restoreContainerContents()
|
public void restoreContainerContents()
|
||||||
{
|
{
|
||||||
plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin,
|
for (Repairable r : containables) {
|
||||||
new Runnable() {
|
r.repair();
|
||||||
public void run() {
|
}
|
||||||
for (Repairable r : containables) {
|
|
||||||
r.repair();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user