mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 20:28:31 +00:00
Entity: report the class in getSaveId() unregistered entity exception (#3744)
This commit is contained in:
parent
f0a0c9a85f
commit
41f7c07703
@ -868,7 +868,7 @@ abstract class Entity extends Location implements Metadatable, EntityIds{
|
|||||||
*/
|
*/
|
||||||
public function getSaveId() : string{
|
public function getSaveId() : string{
|
||||||
if(!isset(self::$saveNames[static::class])){
|
if(!isset(self::$saveNames[static::class])){
|
||||||
throw new \InvalidStateException("Entity is not registered");
|
throw new \InvalidStateException("Entity " . static::class . " is not registered");
|
||||||
}
|
}
|
||||||
reset(self::$saveNames[static::class]);
|
reset(self::$saveNames[static::class]);
|
||||||
return current(self::$saveNames[static::class]);
|
return current(self::$saveNames[static::class]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user