Added Gamemode-check
This commit is contained in:
parent
800032f530
commit
a296a190c6
@ -4,6 +4,7 @@ import eu.ruekov.ruakij.LinkedBeaconTeleporters.Main;
|
||||
import eu.ruekov.ruakij.LinkedBeaconTeleporters.linkedBeaconTeleporter.LinkedBeaconTeleporterBlock;
|
||||
import eu.ruekov.ruakij.LinkedBeaconTeleporters.linkedBeaconTeleporter.LinkedBeaconTeleporterItem;
|
||||
import eu.ruekov.ruakij.LinkedBeaconTeleporters.linkedBeaconTeleporter.LinkedBeaconTeleporterManager;
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.event.block.BlockBreakEvent;
|
||||
|
||||
public class OnBlockBreak {
|
||||
@ -16,9 +17,10 @@ public class OnBlockBreak {
|
||||
e.setExpToDrop(0);
|
||||
|
||||
// Drop custom-item
|
||||
lbtBlock.block().getLocation().getWorld().dropItemNaturally(
|
||||
if(e.getPlayer().getGameMode() != GameMode.CREATIVE)
|
||||
lbtBlock.block().getLocation().getWorld().dropItemNaturally(
|
||||
lbtBlock.block().getLocation(),
|
||||
lbtItem.item()
|
||||
);
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user