mirror of
https://github.com/GeorgH93/Minepacks.git
synced 2025-01-06 19:18:07 +01:00
Fix error when using IntervalChecked uncache strategy
This commit is contained in:
parent
940e2a4b13
commit
c119874d09
@ -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 <https://www.gnu.org/licenses/>.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user