@Override
	public void onPlayerMove(PlayerMoveEvent event)
	{
		if (plugin.playersInChestCounter > 0) {
			Player player = event.getPlayer();
			if (System.currentTimeMillis() >= nextMoveCheck) {
				RealInChestState inChestInfo = plugin.inChestStates.get(player.getName());
				// shop output detection : in chest + more than 3 seconds in shop + moved 1 blocks or more
				// (last was 5 seconds and 2 blocks)
				if (
					(inChestInfo != null)
					&& inChestInfo.inChest
					&& (
						(Math.abs(player.getLocation().getX() - inChestInfo.lastX) >= 1)
						|| (Math.abs(player.getLocation().getZ()- inChestInfo.lastZ) >= 1)
					)
				) {
					if (RealTime.worldToRealTime(player.getWorld()) < (inChestInfo.enterTime + 3)) {
						inChestInfo.lastX = Math.round(player.getLocation().getX());
						inChestInfo.lastZ = Math.round(player.getLocation().getZ());
					} else {
						plugin.exitChest(player, false);
					}
				}
				nextMoveCheck = System.currentTimeMillis() + 1000; 
			}
		}
	}