[Suggestion] Use real info instead a generic Fake Player on the build checks
Eufranio opened this issue ยท 3 comments
At the moment, Mekanism uses the generic [Mekanism]
fake player to perform build checks. By relying on this generic Fake Player, other mods listening to this event won't be able to proccess the event as it would do for real players, since it doesn't store any reference to the player.
My suggestion is that the builder blocks store who placed them (as it does right now, with the security system, maybe you don't even need a separate system for that) and use this info in the events. So, instead using the Mekanism Fake Player, it would use a custom FakePlayer with the GameProfile (or only UUID) of the player who placed the block in the event. That way, ANY other mods listening to the break event will have the right info instead just a generic FakePlayer to handle.
From #4820 (which you would have found if you searched)
Currently the ownership system in Mekanism is not set up properly to handle all cases of giving a FakePlayer a UUID it can return. And if something has block protection it can either allow fake players or not, that's for the user to configure.
If something has block protection, it can either allow who is breaking to break or not, up to the user to configure. The protection is blind about who is breaking a block, so it can only deny ALL or allow ALL, something that isn't good for any server or mod out of here.
The Mekanism ownership system is good enough to provide an real UUID for the fake player, I don't see your point here. This is also another topic, different from that issue.
I know why you want it. And yes its exactly the same, user wanted to break stuff in their colony but couldnt because the fakeplayer didnt have their UUID.
I'll be the judge of whether its good enough, thanks. Needs to be investigated about change of ownership, as last I checked it didn't seem to change if another user placed the block once the ownership was assigned.