mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-11-01 09:59:18 +00:00
null check in tempblock revert_queue, rare occasion when server stops before any tempblocks are made
This commit is contained in:
parent
3094c691a9
commit
abfbff19fa
|
@ -1,10 +1,7 @@
|
||||||
package com.projectkorra.projectkorra.util;
|
package com.projectkorra.projectkorra.util;
|
||||||
|
|
||||||
import java.util.Comparator;
|
import com.projectkorra.projectkorra.GeneralMethods;
|
||||||
import java.util.Map;
|
import com.projectkorra.projectkorra.ProjectKorra;
|
||||||
import java.util.PriorityQueue;
|
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
|
||||||
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
|
@ -14,8 +11,10 @@ import org.bukkit.block.data.BlockData;
|
||||||
import org.bukkit.block.data.Levelled;
|
import org.bukkit.block.data.Levelled;
|
||||||
import org.bukkit.scheduler.BukkitRunnable;
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
|
|
||||||
import com.projectkorra.projectkorra.GeneralMethods;
|
import java.util.Comparator;
|
||||||
import com.projectkorra.projectkorra.ProjectKorra;
|
import java.util.Map;
|
||||||
|
import java.util.PriorityQueue;
|
||||||
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
public class TempBlock {
|
public class TempBlock {
|
||||||
|
|
||||||
|
@ -88,8 +87,10 @@ public class TempBlock {
|
||||||
for (final Block block : instances.keySet()) {
|
for (final Block block : instances.keySet()) {
|
||||||
revertBlock(block, Material.AIR);
|
revertBlock(block, Material.AIR);
|
||||||
}
|
}
|
||||||
for (final TempBlock tempblock : REVERT_QUEUE) {
|
if (REVERT_QUEUE != null) {
|
||||||
tempblock.revertBlock();
|
for (final TempBlock tempblock : REVERT_QUEUE) {
|
||||||
|
tempblock.revertBlock();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue