Rumsfield / konquest

Konquest plugin for Spigot Minecraft territory control
GNU General Public License v3.0
7 stars 2 forks source link

Update animal protections in towns #209

Closed Rumsfield closed 5 months ago

Rumsfield commented 5 months ago

Currently, all towns have hard-coded protections for animals which prevent players for right-clicking on animals inside of other kingdom towns, or friendly kingdom towns that are closed and the player is not a resident. The exceptions are for other players and villagers, which always allow right-click interaction. This approach prevents players from interacting with tamed animals like horses.

Update the entity interaction logic to always allow players to interact with tamed animals for which they are the owner, as well as players, villagers, boats, and minecarts. For all other animals, block interaction inside of non-friendly towns and closed towns where the player is not a resident.

Rumsfield commented 5 months ago

Horses keep track of the player that tamed them by UUID. https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/entity/Tameable.html#getOwner()