本文整理汇总了Java中ethanjones.data.DataGroup.getString方法的典型用法代码示例。如果您正苦于以下问题:Java DataGroup.getString方法的具体用法?Java DataGroup.getString怎么用?Java DataGroup.getString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ethanjones.data.DataGroup
的用法示例。
在下文中一共展示了DataGroup.getString方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: readPlayer
import ethanjones.data.DataGroup; //导入方法依赖的package包/类
public Player readPlayer(UUID uuid, ClientIdentifier clientIdentifier) {
if (fileHandle == null)
return null;
FileHandle folder = folderPlayer();
FileHandle file = folder.child(uuid.toString());
if (!file.exists())
return null;
try {
DataGroup data = (DataGroup) Data.input(file.file());
Player player = new Player(data.getString("username"), uuid, clientIdentifier);
player.read(data);
return player;
} catch (Exception e) {
Log.warning("Failed to read player", e);
return null;
}
}
示例2: read
import ethanjones.data.DataGroup; //导入方法依赖的package包/类
@Override
public void read(DataGroup dataGroup) {
if (dataGroup.getInteger("saveVersion") != 0)
throw new CubesException("Invalid save version");
worldSeed = dataGroup.getLong("worldSeed");
worldSeedString = dataGroup.getString("worldSeedStr");
worldTime = dataGroup.getInteger("worldTime");
worldType = dataGroup.getString("worldType");
worldGamemode = Gamemode.valueOf(dataGroup.getString("worldGamemode"));
idManager = dataGroup.getGroup("idManager");
lastOpenedTime = dataGroup.getLong("lastOpenedTime");
DataGroup version = dataGroup.getGroup("lastVersion");
lastVersionMajor = version.getInteger("major");
lastVersionMinor = version.getInteger("minor");
lastVersionPoint = version.getInteger("point");
lastVersionBuild = version.getInteger("build");
lastVersionHash = version.getString("hash");
}
示例3: read
import ethanjones.data.DataGroup; //导入方法依赖的package包/类
@Override
public void read(DataGroup dataGroup) {
if (dataGroup.getInteger("saveVersion") != 0) throw new CubesException("Invalid save version");
worldSeed = dataGroup.getLong("worldSeed");
worldSeedString = dataGroup.getString("worldSeedStr");
worldTime = dataGroup.getInteger("worldTime");
worldType = dataGroup.getString("worldType");
worldGamemode = Gamemode.valueOf(dataGroup.getString("worldGamemode"));
idManager = dataGroup.getGroup("idManager");
lastOpenedTime = dataGroup.getLong("lastOpenedTime");
DataGroup version = dataGroup.getGroup("lastVersion");
lastVersionMajor = version.getInteger("major");
lastVersionMinor = version.getInteger("minor");
lastVersionPoint = version.getInteger("point");
lastVersionBuild = version.getInteger("build");
lastVersionHash = version.getString("hash");
}
示例4: read
import ethanjones.data.DataGroup; //导入方法依赖的package包/类
@Override
public void read(DataGroup data) {
this.position.set(VectorUtil.array(data.getArray("pos", Float.class)));
this.motion.set(VectorUtil.array(data.getArray("motion", Float.class)));
this.angle.set(VectorUtil.array(data.getArray("ang", Float.class)));
this.uuid = (UUID) data.get("uuid");
if (!this.id.equals(data.getString("id")))
throw new IllegalArgumentException(this.id + "!=" + data.getString("id"));
}
示例5: readPlayer
import ethanjones.data.DataGroup; //导入方法依赖的package包/类
public Player readPlayer(UUID uuid, ClientIdentifier clientIdentifier) {
if (fileHandle == null) return null;
FileHandle folder = folderPlayer();
FileHandle file = folder.child(uuid.toString());
if (!file.exists()) return null;
try {
DataGroup data = (DataGroup) Data.input(file.file());
Player player = new Player(data.getString("username"), uuid, clientIdentifier);
player.read(data);
return player;
} catch (Exception e) {
Log.warning("Failed to read player", e);
return null;
}
}
示例6: read
import ethanjones.data.DataGroup; //导入方法依赖的package包/类
@Override
public void read(DataGroup data) {
this.position.set(VectorUtil.array(data.getArray("pos", Float.class)));
this.motion.set(VectorUtil.array(data.getArray("motion", Float.class)));
this.angle.set(VectorUtil.array(data.getArray("ang", Float.class)));
this.uuid = (UUID) data.get("uuid");
if (!this.id.equals(data.getString("id")))
throw new IllegalArgumentException(this.id + "!=" + data.getString("id"));
}
示例7: read
import ethanjones.data.DataGroup; //导入方法依赖的package包/类
@Override
public void read(DataGroup dataGroup) {
uuid = (UUID) dataGroup.get("uuid");
usname = dataGroup.getString("username");
renderDistance = dataGroup.getInteger("renderDistance");
}
示例8: read
import ethanjones.data.DataGroup; //导入方法依赖的package包/类
@Override
public void read(DataGroup dataGroup) {
uuid = (UUID) dataGroup.get("uuid");
username = dataGroup.getString("username");
renderDistance = dataGroup.getInteger("renderDistance");
}