Item: Remove get/set/removeNamedTagEntry()

This commit is contained in:
Dylan K. Taylor
2019-03-17 17:49:09 +00:00
parent 5830ca958b
commit 8de9e61651
6 changed files with 30 additions and 57 deletions

View File

@ -1715,7 +1715,7 @@ class Level implements ChunkManager, Metadatable{
}
if($player->isAdventure(true) and !$ev->isCancelled()){
$tag = $item->getNamedTagEntry("CanDestroy");
$tag = $item->getNamedTag()->getListTag("CanDestroy");
$canBreak = false;
if($tag instanceof ListTag){
foreach($tag as $v){
@ -1865,7 +1865,7 @@ class Level implements ChunkManager, Metadatable{
$ev = new BlockPlaceEvent($player, $hand, $blockReplace, $blockClicked, $item);
if($player->isAdventure(true) and !$ev->isCancelled()){
$canPlace = false;
$tag = $item->getNamedTagEntry("CanPlaceOn");
$tag = $item->getNamedTag()->getListTag("CanPlaceOn");
if($tag instanceof ListTag){
foreach($tag as $v){
if($v instanceof StringTag){