@Listener
public void onBlockPlace(ChangeBlockEvent.Place event) {
Optional<Player> optPlayer = event.getCause().first(Player.class);
if (!optPlayer.isPresent()) return;
Player player = optPlayer.get();
int explosivelevel = this.plugin.getConfig().getNode("Explosives", "Level").getInt();
for (Transaction<BlockSnapshot> transaction : event.getTransactions()) {
//transaction.getOriginal(); // Block before change
BlockSnapshot bs = transaction.getFinal(); // Block after change
this.plugin.debugmsg("Player " + player.getName() + " place block " + bs.getExtendedState() , player.getName());
}
Console output:
[10:35:30] [Server thread/INFO] [modfixer]: Player HunterzCZ place block ic2:te[facing=north,type=itnt]
Howto get type itnt inside [] ?