So I tried it without the player == player but not even this code works:
@SubscribeEvent
public void onBlockPlace(PlaceEvent e) {
plugin.sendMessage("ASDASDSd");
}
It seems like the Event doesn't get called once a player places a block. But all the other Events in this class get fired... I have a KeyInputEvent who works fine
I'm trying to get the position of the placed block out of the PlaceEvent. How is this possible?
@SubscribeEvent
public void onBlockPlace(PlaceEvent e) {
if(e.player == plugin.getPlayer()) {
if(e.placedBlock == Blocks.redstone_torch.getDefaultState()) {
BlockPos bp = ?;
}
}
}
4 replies
Important Information
By using this site, you agree to our Terms of Use.