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:
parent
8cc822429d
commit
691256cefe
@ -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());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user