Use different method to create a local Sone.
[Sone.git] / src / main / java / net / pterodactylus / sone / database / memory / MemoryDatabase.java
index 330f588..8815abc 100644 (file)
@@ -182,8 +182,8 @@ public class MemoryDatabase extends AbstractService implements Database {
        }
 
        private LocalSone loadLocalSone(OwnIdentity ownIdentity) {
-               LocalSone localSone = (LocalSone) newSoneBuilder().local().from(ownIdentity).using(
-                               new Client("Sone", SonePlugin.VERSION.toString())).build();
+               LocalSone localSone = newSoneBuilder().from(ownIdentity).using(
+                               new Client("Sone", SonePlugin.VERSION.toString())).buildLocal();
                localSone.setLatestEdition(
                                Optional.fromNullable(
                                                Longs.tryParse(ownIdentity.getProperty(LATEST_EDITION_PROPERTY)))