TownyAdvanced / TownyCombat

A combat plugin for Towny
Other
8 stars 5 forks source link

Ignore passable blocks in blockgitching prevention listeners #132

Closed jwkerr closed 10 months ago

jwkerr commented 10 months ago

This PR returns early in the TownyDestroyEvent and TownyBuildEvent listeners if the block in question returns true for an isPassable check.

The build listener additionally checks the block also isn't liquid to make sure that the user can't use water/lava to blockglitch.

The intention of this is to ignore blocks that don't make blockglitching possible and are annoying when you accidentally break such as grass, they are mostly blocks that instantly break too making it a very common occurrence.