public boolean hadNameAtTime(UUID uuid, String name, int timestamp) {
        Map<Integer, String> history = this.getNameHistory(uuid);

        for (int ts : history.keySet()) {
            if (!history.get(ts).equals(name))
                continue;

            int next = (int) (System.currentTimeMillis() / 1000L);
            for (int ts2 : history.keySet()) {
                if (ts < ts2 && ts2 < next) {
                    next = ts2;
                    break;
                }
            }

            if (ts < timestamp && timestamp < next) {
                return true;
            }
        }

        return false;
    }