Updated mongodb driver to 3.7.0

This commit is contained in:
simon
2018-05-11 21:06:18 -04:00
parent e98575b23f
commit 854863ede9
57 changed files with 383 additions and 383 deletions

View File

@@ -1,9 +1,8 @@
package net.simon987.biomassplugin;
import com.mongodb.BasicDBObject;
import com.mongodb.DBObject;
import net.simon987.server.game.GameObject;
import net.simon987.server.game.InventoryHolder;
import org.bson.Document;
import org.json.simple.JSONObject;
public class BiomassBlob extends GameObject implements InventoryHolder {
@@ -43,9 +42,9 @@ public class BiomassBlob extends GameObject implements InventoryHolder {
}
@Override
public BasicDBObject mongoSerialise() {
public Document mongoSerialise() {
BasicDBObject dbObject = new BasicDBObject();
Document dbObject = new Document();
dbObject.put("t", ID);
dbObject.put("i", getObjectId());
@@ -65,15 +64,8 @@ public class BiomassBlob extends GameObject implements InventoryHolder {
this.biomassCount = biomassCount;
}
// public int getStyle() {
// return style;
// }
//
// public void setStyle(int style) {
// this.style = style;
// }
public static BiomassBlob deserialize(DBObject obj) {
public static BiomassBlob deserialize(Document obj) {
BiomassBlob biomassBlob = new BiomassBlob();

View File

@@ -1,6 +1,5 @@
package net.simon987.biomassplugin;
import com.mongodb.DBObject;
import net.simon987.biomassplugin.event.ObjectDeathListener;
import net.simon987.biomassplugin.event.WorldCreationListener;
import net.simon987.biomassplugin.event.WorldUpdateListener;
@@ -9,6 +8,8 @@ import net.simon987.server.game.GameObject;
import net.simon987.server.io.GameObjectDeserializer;
import net.simon987.server.logging.LogManager;
import net.simon987.server.plugin.ServerPlugin;
import org.bson.Document;
public class BiomassPlugin extends ServerPlugin implements GameObjectDeserializer {
@@ -23,7 +24,7 @@ public class BiomassPlugin extends ServerPlugin implements GameObjectDeserialize
}
@Override
public GameObject deserializeObject(DBObject object) {
public GameObject deserializeObject(Document object) {
int objType = (int) object.get("t");