mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
NOTE! THIS SHOULD BE REVERTED LATER! Removed WeakRef dependency
This commit is contained in:
@ -29,7 +29,7 @@ use pocketmine\utils\PluginException;
|
||||
|
||||
abstract class MetadataStore{
|
||||
/** @var \WeakMap[] */
|
||||
private $metadataMap = [];
|
||||
private $metadataMap;
|
||||
|
||||
/**
|
||||
* Adds a metadata value to an object.
|
||||
@ -48,8 +48,8 @@ abstract class MetadataStore{
|
||||
|
||||
$key = $this->disambiguate($subject, $metadataKey);
|
||||
if(!isset($this->metadataMap[$key])){
|
||||
$entry = new \WeakMap();
|
||||
$this->metadataMap[$key] = $entry;
|
||||
//$entry = new \WeakMap();
|
||||
$this->metadataMap[$key] = new \SplObjectStorage();//$entry;
|
||||
}else{
|
||||
$entry = $this->metadataMap[$key];
|
||||
}
|
||||
|
Reference in New Issue
Block a user