Skip to content
This repository was archived by the owner on Jan 2, 2023. It is now read-only.

Commit 0dc450f

Browse files
author
CodeDoctorDE
committed
add null checks
1 parent 4a316fa commit 0dc450f

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/main/java/com/github/codedoctorde/itemmods/api/block/CustomBlock.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ public void setType(String type) {
6969
public void breakBlock(BlockDropType dropType) {
7070
getBlock().setType(Material.AIR);
7171
getBlock().getDrops().clear();
72+
if (config == null || dropType == null) return;
7273
Location dropLocation = getBlock().getLocation().clone().add(0.5, 0, 0.5);
7374
if (dropType == BlockDropType.SILK_TOUCH && config.getReferenceItemConfig() != null)
7475
getBlock().getWorld().dropItemNaturally(dropLocation, config.getReferenceItemConfig().giveItemStack());

0 commit comments

Comments
 (0)