mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Type-hinted NBT tag constructors, made getValue() and setValue() more strict, fix dozens of assorted related bugs
This commit is contained in:
@ -728,12 +728,12 @@ class Server{
|
||||
}
|
||||
$spawn = $this->getDefaultLevel()->getSafeSpawn();
|
||||
$nbt = new CompoundTag("", [
|
||||
new LongTag("firstPlayed", floor(microtime(true) * 1000)),
|
||||
new LongTag("lastPlayed", floor(microtime(true) * 1000)),
|
||||
new LongTag("firstPlayed", (int) (microtime(true) * 1000)),
|
||||
new LongTag("lastPlayed", (int) (microtime(true) * 1000)),
|
||||
new ListTag("Pos", [
|
||||
new DoubleTag(0, $spawn->x),
|
||||
new DoubleTag(1, $spawn->y),
|
||||
new DoubleTag(2, $spawn->z)
|
||||
new DoubleTag("", $spawn->x),
|
||||
new DoubleTag("", $spawn->y),
|
||||
new DoubleTag("", $spawn->z)
|
||||
]),
|
||||
new StringTag("Level", $this->getDefaultLevel()->getName()),
|
||||
//new StringTag("SpawnLevel", $this->getDefaultLevel()->getName()),
|
||||
@ -745,13 +745,13 @@ class Server{
|
||||
new CompoundTag("Achievements", []),
|
||||
new IntTag("playerGameType", $this->getGamemode()),
|
||||
new ListTag("Motion", [
|
||||
new DoubleTag(0, 0.0),
|
||||
new DoubleTag(1, 0.0),
|
||||
new DoubleTag(2, 0.0)
|
||||
new DoubleTag("", 0.0),
|
||||
new DoubleTag("", 0.0),
|
||||
new DoubleTag("", 0.0)
|
||||
]),
|
||||
new ListTag("Rotation", [
|
||||
new FloatTag(0, 0.0),
|
||||
new FloatTag(1, 0.0)
|
||||
new FloatTag("", 0.0),
|
||||
new FloatTag("", 0.0)
|
||||
]),
|
||||
new FloatTag("FallDistance", 0.0),
|
||||
new ShortTag("Fire", 0),
|
||||
|
Reference in New Issue
Block a user