diff --git a/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Database/UnCacheStrategies/IntervalChecked.java b/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Database/UnCacheStrategies/IntervalChecked.java index cb72612..4334aaa 100644 --- a/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Database/UnCacheStrategies/IntervalChecked.java +++ b/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Database/UnCacheStrategies/IntervalChecked.java @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ package at.pcgamingfreaks.Minepacks.Bukkit.Database.UnCacheStrategies; @@ -20,6 +20,7 @@ import at.pcgamingfreaks.Minepacks.Bukkit.Backpack; import at.pcgamingfreaks.Minepacks.Bukkit.Database.Database; import at.pcgamingfreaks.Minepacks.Bukkit.Minepacks; + import org.bukkit.Bukkit; public class IntervalChecked extends UnCacheStrategy implements Runnable @@ -41,7 +42,7 @@ public void run() long currentTime = System.currentTimeMillis() - delay; for(Backpack backpack : cache.getLoadedBackpacks()) { - if(!backpack.getOwner().isOnline() && backpack.getOwner().getPlayer().getLastPlayed() < currentTime && !backpack.isOpen()) + if(!backpack.getOwner().isOnline() && backpack.getOwner().getLastPlayed() < currentTime && !backpack.isOpen()) { this.cache.unloadBackpack(backpack); }