Implement levels in default implementation.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 26 Apr 2012 13:39:55 +0000 (15:39 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 26 Apr 2012 13:39:55 +0000 (15:39 +0200)
src/main/java/net/pterodactylus/demoscenemusic/data/DefaultUser.java

index ea2959c..f8fe1b6 100644 (file)
@@ -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<String> getOpenIds() {
                return getValue("openIds", Collection.class).get();