Fixed invalid metadata and updated weak references on PluginManager

This commit is contained in:
Shoghi Cervantes
2014-05-23 22:30:37 +02:00
parent 53749483c3
commit 683ab8d2cd
6 changed files with 61 additions and 26 deletions

View File

@ -25,8 +25,10 @@ use pocketmine\level\Level;
class LevelMetadataStore extends MetadataStore{
/** @noinspection PhpHierarchyChecksInspection */
public function disambiguate(Level $level, $metadataKey){
public function disambiguate(Metadatable $level, $metadataKey){
if(!($level instanceof Level)){
throw new \InvalidArgumentException("Argument must be a Level instance");
}
return strtolower($level->getName()) . ":" . $metadataKey;
}
}