@EventHandler
    public void onWorldChange(PlayerChangedWorldEvent event)
    {
        Player player = event.getPlayer();
        if(!player.getWorld().getName().equals(p.getWorld()))
        {
            ItemStack[] inv =  player.getInventory().getContents();
            ItemStack[] armor = player.getInventory().getArmorContents();
            ItemStack is;
            for(int i = 0; i < inv.length; i++)
            {
                is = inv[i];
                if(p.getTool().isSimilar(is))
                {
                    inv[i] = null;
                }
            }
            for(int i = 0; i < inv.length; i++)
            {
                is = inv[i];
                if(p.getTool().isSimilar(is))
                {
                    armor[i] = null;
                }
            }
            player.getInventory().setContents(inv);
            player.getInventory().setArmorContents(armor);
            player.saveData();
        }
    }