TeleportPads

TeleportPads 1.0.1

Error Description: The issue lied within the onBlockBreak method within the TeleportPads class. Originally, this method was sending the message "Teleport pad removed" every time a block was broken, without checking whether the broken block was a teleport pad or not. This caused the message to be displayed even when non-teleport pad blocks were broken, which was not the desired behavior.

Solution: The solution involved modifying the onBlockBreak method to check if the broken block is a teleport pad before sending the "Teleport pad removed" message. If the broken block is a teleport pad, then the message is sent; otherwise, no message is sent. This was achieved by adding an if condition that checks if the block is a teleport pad before sending the message.

Additionally, I added a return statement after sending the message in the case where a teleport pad is broken, to prevent the message from being sent for non-teleport pad blocks.

This solution ensures that the "Teleport pad removed" message is sent only when a teleport pad is broken, improving the accuracy and clarity of the plugin.
Top