mirror of
https://github.com/simon987/Much-Assembly-Required.git
synced 2025-12-13 22:59:02 +00:00
Updated mongodb driver to 3.7.0
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
@@ -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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user