修复客户端owner读取问题

This commit is contained in:
Light_Quanta 2025-07-15 00:37:56 +08:00
parent 8efe96de2c
commit 5a593b0634
No known key found for this signature in database
GPG key ID: 11A39A1B8C890959
6 changed files with 30 additions and 12 deletions

View file

@ -125,8 +125,11 @@ public class Blu43Entity extends Entity implements GeoEntity, OwnableEntity {
} else { } else {
String s = compound.getString("Owner"); String s = compound.getString("Owner");
assert this.getServer() != null; if (this.getServer() == null) {
uuid = OldUsersConverter.convertMobOwnerIfNecessary(this.getServer(), s); uuid = UUID.fromString(s);
} else {
uuid = OldUsersConverter.convertMobOwnerIfNecessary(this.getServer(), s);
}
} }
if (uuid != null) { if (uuid != null) {

View file

@ -130,8 +130,11 @@ public class ClaymoreEntity extends Entity implements GeoEntity, OwnableEntity {
} else { } else {
String s = compound.getString("Owner"); String s = compound.getString("Owner");
assert this.getServer() != null; if (this.getServer() == null) {
uuid = OldUsersConverter.convertMobOwnerIfNecessary(this.getServer(), s); uuid = UUID.fromString(s);
} else {
uuid = OldUsersConverter.convertMobOwnerIfNecessary(this.getServer(), s);
}
} }
if (uuid != null) { if (uuid != null) {

View file

@ -134,8 +134,11 @@ public class Tm62Entity extends Entity implements GeoEntity, OwnableEntity {
} else { } else {
String s = compound.getString("Owner"); String s = compound.getString("Owner");
assert this.getServer() != null; if (this.getServer() == null) {
uuid = OldUsersConverter.convertMobOwnerIfNecessary(this.getServer(), s); uuid = UUID.fromString(s);
} else {
uuid = OldUsersConverter.convertMobOwnerIfNecessary(this.getServer(), s);
}
} }
if (uuid != null) { if (uuid != null) {

View file

@ -144,8 +144,11 @@ public class C4Entity extends Entity implements GeoEntity, OwnableEntity {
} else { } else {
String s = compound.getString("Owner"); String s = compound.getString("Owner");
assert this.getServer() != null; if (this.getServer() == null) {
uuid = OldUsersConverter.convertMobOwnerIfNecessary(this.getServer(), s); uuid = UUID.fromString(s);
} else {
uuid = OldUsersConverter.convertMobOwnerIfNecessary(this.getServer(), s);
}
} }
if (uuid != null) { if (uuid != null) {

View file

@ -131,8 +131,11 @@ public class Hpj11Entity extends ContainerMobileVehicleEntity implements GeoEnti
} else { } else {
String s = compound.getString("Owner"); String s = compound.getString("Owner");
assert this.getServer() != null; if (this.getServer() == null) {
uuid = OldUsersConverter.convertMobOwnerIfNecessary(this.getServer(), s); uuid = UUID.fromString(s);
} else {
uuid = OldUsersConverter.convertMobOwnerIfNecessary(this.getServer(), s);
}
} }
if (uuid != null) { if (uuid != null) {

View file

@ -110,8 +110,11 @@ public class LaserTowerEntity extends VehicleEntity implements GeoEntity, Ownabl
} else { } else {
String s = compound.getString("Owner"); String s = compound.getString("Owner");
assert this.getServer() != null; if (this.getServer() == null) {
uuid = OldUsersConverter.convertMobOwnerIfNecessary(this.getServer(), s); uuid = UUID.fromString(s);
} else {
uuid = OldUsersConverter.convertMobOwnerIfNecessary(this.getServer(), s);
}
} }
if (uuid != null) { if (uuid != null) {