From: David ‘Bombe’ Roden Date: Thu, 26 Apr 2012 13:39:55 +0000 (+0200) Subject: Implement levels in default implementation. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=7111cd7fbdb9d40d6021e299b24fda6a1d67dde9;p=demoscenemusic.git Implement levels in default implementation. --- diff --git a/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultUser.java b/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultUser.java index ea2959c..f8fe1b6 100644 --- a/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultUser.java +++ b/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultUser.java @@ -59,6 +59,23 @@ public class DefaultUser extends DefaultBase implements User { * {@inheritDoc} */ @Override + public int getLevel() { + return Default.forNull(getValue("level", Integer.class).get(), 0); + } + + /** + * {@inheritDoc} + */ + @Override + public User setLevel(int level) { + getValue("level", Integer.class).set(level); + return this; + } + + /** + * {@inheritDoc} + */ + @Override @SuppressWarnings("unchecked") public Collection getOpenIds() { return getValue("openIds", Collection.class).get();