Module gomint.api

Class BlockPlaceEvent

    • Constructor Detail

      • BlockPlaceEvent

        public BlockPlaceEvent​(EntityPlayer player,
                               Block placedAgainst,
                               Block shouldReplace,
                               ItemStack itemStack,
                               Block replacingBlock)
        Created when a player wants to place a block
        player - which wants to place the block
        placedAgainst - against which block did the player place
        shouldReplace - block which should be replaced with the item
        itemStack - which should replace above block
        replacingBlock - get the block which will replace the shouldReplace block
    • Method Detail

      • getReplacingBlock

        public Block getReplacingBlock()
        Get the block which replaced the getShouldReplace() block after this event. This block can NOT be modified (well you can but the server won't place the block with the modifications made in this event)
        block which replaces the should replace block
      • getPlacedAgainst

        public Block getPlacedAgainst()
        Get the block which the player placed against
        block which got placed against
      • getShouldReplace

        public Block getShouldReplace()
        Get the block which should be replaced
        block which should be replaced
      • getItem

        public ItemStack getItem()
        Get the item which is going to be used to replace the block
        item which should replace the block