@EventHandler(priority = EventPriority.HIGH)
    public void join(PlayerJoinEvent event) {
        if (!plugin.toggle) {
            try {
                final Player player = event.getPlayer();
                plugin.Logger("Player " + event.getPlayer().getTotalExperience() + " XP: " + event.getPlayer().getTotalExperience() + " Level: " + event.getPlayer().getLevel(), "Debug");
//            double y = 1.75 * (event.getPlayer().getLevel() + event.getPlayer().getExp()) * (event.getPlayer().getLevel() + event.getPlayer().getExp()) + 4.9997 * (event.getPlayer().getLevel() + event.getPlayer().getExp()) + 0.1327;
//            event.getPlayer().setTotalExperience((int) y);
                double t = plugin.getLevelXP(player.getLevel()) + (xpShop.nextLevelAt(player.getLevel()) * player.getExp());
                player.setTotalExperience((int) t);
                plugin.getServer().getScheduler().runTaskLaterAsynchronously(plugin, new Runnable() {
					
					@Override
					public void run() {
						try {
							ArrayList<XPSend> xpSends = plugin.getSendDatabase().getOpenTransactions(player.getName());
							for(XPSend send : xpSends) {
								plugin.PlayerLogger(player, send.getMessage(), "");
								plugin.UpdateXP(player, send.getSendedXP(), "sendxp");
								player.saveData();
								plugin.getSendDatabase().setStatus(player.getName(), send.getId(), 1);
							}
						} catch (SQLException e) {
							e.printStackTrace();
						}
					}
				}, 20);
                plugin.Logger("After calculating: Player " + event.getPlayer().getTotalExperience() + " XP: " + event.getPlayer().getTotalExperience() + " Level: " + event.getPlayer().getLevel(), "Debug");
                if (!plugin.Blacklistcode.startsWith("1")) {
                    if (plugin.PermissionsHandler.checkpermissionssilent(event.getPlayer(), "xpShop.admin")) {
                        if (xpShop.updateaviable) {
                            plugin.PlayerLogger(event.getPlayer(), "installed xpShop version: " + plugin.Version + ", latest version: " + plugin.newversion, "Warning");
                            plugin.PlayerLogger(event.getPlayer(), "New xpShop update aviable: type \"/xpShop update\" to install!", "Warning");
                            if (!plugin.getConfig().getBoolean("installondownload")) {
                                plugin.PlayerLogger(event.getPlayer(), "Please edit the config.yml if you wish that the plugin updates itself atomatically!", "Warning");
                            }
                        }
                    }
                }
            } catch (Exception e) {
                plugin.report.report(334, "join event failed", e.getMessage(), "xpShopListener", e);
            }
        }
    }