use of de.dytanic.cloudnet.lib.database.DatabaseDocument in project CloudNet by Dytanic.
the class WrapperSessionDatabase method addSession.
public void addSession(WrapperSession session) {
DatabaseDocument databaseDocument = new DatabaseDocument(session.getUniqueId().toString());
databaseDocument.append("session", session);
databaseDocument.insert(database);
}
use of de.dytanic.cloudnet.lib.database.DatabaseDocument in project CloudNet by Dytanic.
the class PlayerDatabase method registerPlayer.
public OfflinePlayer registerPlayer(PlayerConnection playerConnection) {
OfflinePlayer offlinePlayer = new OfflinePlayer(playerConnection.getUniqueId(), playerConnection.getName(), new Document(), System.currentTimeMillis(), System.currentTimeMillis(), playerConnection, null);
database.insert(new DatabaseDocument(playerConnection.getUniqueId().toString()).append("offlinePlayer", offlinePlayer));
return offlinePlayer;
}
Aggregations