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,10 +1,10 @@
|
||||
package net.simon987.mischwplugin;
|
||||
|
||||
import com.mongodb.BasicDBObject;
|
||||
import net.simon987.server.GameServer;
|
||||
import net.simon987.server.assembly.CpuHardware;
|
||||
import net.simon987.server.assembly.Status;
|
||||
import net.simon987.server.assembly.Util;
|
||||
import org.bson.Document;
|
||||
|
||||
/**
|
||||
* Hardware to get game time
|
||||
@@ -37,9 +37,9 @@ public class Clock extends CpuHardware {
|
||||
|
||||
|
||||
@Override
|
||||
public BasicDBObject mongoSerialise() {
|
||||
public Document mongoSerialise() {
|
||||
|
||||
BasicDBObject dbObject = new BasicDBObject();
|
||||
Document dbObject = new Document();
|
||||
|
||||
dbObject.put("hwid", (int) HWID);
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package net.simon987.mischwplugin;
|
||||
|
||||
import com.mongodb.DBObject;
|
||||
import net.simon987.mischwplugin.event.CpuInitialisationListener;
|
||||
import net.simon987.server.ServerConfiguration;
|
||||
import net.simon987.server.assembly.CpuHardware;
|
||||
import net.simon987.server.io.CpuHardwareDeserializer;
|
||||
import net.simon987.server.logging.LogManager;
|
||||
import net.simon987.server.plugin.ServerPlugin;
|
||||
import org.bson.Document;
|
||||
|
||||
/**
|
||||
* Plugin that adds miscellaneous hardware to the game
|
||||
@@ -22,7 +22,7 @@ public class MiscHWPlugin extends ServerPlugin implements CpuHardwareDeserialize
|
||||
}
|
||||
|
||||
@Override
|
||||
public CpuHardware deserializeHardware(DBObject hwJson) {
|
||||
public CpuHardware deserializeHardware(Document hwJson) {
|
||||
int hwid = (int) hwJson.get("hwid");
|
||||
|
||||
switch (hwid) {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package net.simon987.mischwplugin;
|
||||
|
||||
import com.mongodb.BasicDBObject;
|
||||
import net.simon987.server.assembly.CpuHardware;
|
||||
import net.simon987.server.assembly.Status;
|
||||
import org.bson.Document;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
@@ -34,9 +34,9 @@ public class RandomNumberGenerator extends CpuHardware {
|
||||
}
|
||||
|
||||
@Override
|
||||
public BasicDBObject mongoSerialise() {
|
||||
public Document mongoSerialise() {
|
||||
|
||||
BasicDBObject dbObject = new BasicDBObject();
|
||||
Document dbObject = new Document();
|
||||
|
||||
dbObject.put("hwid", (int) HWID);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user