mirror of
https://github.com/Ste3et/furniture.git
synced 2024-11-22 10:36:12 +01:00
Fix log didn't drop ItemStack if it destroyed
This commit is contained in:
parent
dbcd8baac3
commit
3dc190e76e
2
pom.xml
2
pom.xml
@ -7,7 +7,7 @@
|
||||
<furniture.tag></furniture.tag>
|
||||
</properties>
|
||||
|
||||
<version>3.4.6${furniture.tag}</version>
|
||||
<version>3.4.7${furniture.tag}</version>
|
||||
<build>
|
||||
<defaultGoal>clean package install</defaultGoal>
|
||||
<sourceDirectory>src</sourceDirectory>
|
||||
|
@ -55,6 +55,14 @@ public class log extends Furniture implements Listener{
|
||||
if(getObjID().getSQLAction().equals(SQLAction.REMOVE)) return;
|
||||
if(player == null) return;
|
||||
if(canBuild(player)) {
|
||||
fEntity entity = entityByCustomName(this.mode + "");
|
||||
if(entity != null) {
|
||||
if(entity.getItemInMainHand() != null) {
|
||||
if(entity.getItemInMainHand().getType() != Material.AIR) {
|
||||
player.getWorld().dropItemNaturally(getCenter().add(0, 1, 0), entity.getItemInMainHand());
|
||||
}
|
||||
}
|
||||
}
|
||||
this.destroy(player);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user