feat: Improve SpawnLocation toString
This helps in debug logs not showing world=null for spawn location
This commit is contained in:
parent
5d1d71baf2
commit
3fc3663d5d
|
@ -380,7 +380,7 @@ public class SimpleMVWorld implements MVWorld {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "NULL LOCATION";
|
||||
return "Location{null}";
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -95,4 +95,18 @@ public class SpawnLocation extends Location implements ConfigurationSerializable
|
|||
float yaw = ((Number) args.get("yaw")).floatValue();
|
||||
return new SpawnLocation(x, y, z, yaw, pitch);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Location{world=" + getWorld()
|
||||
+ ",x=" + this.getX()
|
||||
+ ",y=" + this.getY()
|
||||
+ ",z=" + this.getZ()
|
||||
+ ",pitch=" + this.getPitch()
|
||||
+ ",yaw=" + this.getYaw()
|
||||
+ '}';
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue