public long getLong(String key) {
        try {
            if(hasKey(key))
                return ((NBTNumber<Long>) get(key)).getValue();
            return 0;
        } catch (ClassCastException e) {
            return 0;
        }
    }