Read up on Bukkit's events. The name of the event you want is PlayExpChangeEvent, and contains the method getAmount() which returns how much the player has picked up. To get their current xp, get the player involved in the event, then get their xp. To get the xp they'll have after they pick up the xp, add their current xp to how much they pick up.
Code: @EventHandler public void onPlayerExpChange(PlayerExpChangeEvent e) { int xp = e.getAmount(); // Xp picked up int currentXp = e.getPlayer().getExpToLevel(); // Player's xp before pick up int getAfterXp = currentXp + xp; // Player's xp after pick up }