1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-20 11:45:51 +00:00

Added hasDisplayName check

This commit is contained in:
AlexLander123 2019-10-09 22:06:31 +08:00
parent 8cc822429d
commit 691256cefe

View File

@ -61,7 +61,7 @@ public class BlockPlacer extends SimpleSlimefunItem<AutonomousMachineHandler> {
BlockState itemBlockState = ((BlockStateMeta) e.getItem().getItemMeta()).getBlockState();
BlockState blockState = block.getState();
if(blockState instanceof Nameable) {
if((blockState instanceof Nameable) && e.getItem().getItemMeta().hasDisplayName()) {
((Nameable) blockState).setCustomName(e.getItem().getItemMeta().getDisplayName());
}