Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Track which player "owns" a turtle #518
When a player places a turtle, they are marked as its owner. Any actions they perform (such as breaking blocks, moving, etc...) are performed using this player's game profile.
This allows turtles to work correctly with various permissions/claim mods. Previously you would have to whitelist all turtles in order for them to function within a claimed area.
See SquidDev-CC/CC-Tweaked#8 for the original issue & explanation. It's worth noting that the SwitchCraft server has been running a build of CC with this patch applied and it has solved all permissions issues. I'll updated the PR should any issues arise.
I assume turtles which are placed by turtles inherit the placing turtle's ownership?
What happens if I place a turtle using another mod? I would assume the mod's fake player get's ownership. (I may be wrong, but can a mod place blocks without a fake player? What about that?)
Yep. You can have turtles all the way down!
It depends. If other mods are doing things "correctly" and tracking a tile's owner, then it'll inherit the owner from there too. Otherwise it'll either use that mod's fake user* or CC's fallback fake user.
*By "fake user" I mean a fabricated