-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Suggestion] Entity protection (e.g. Item Frames and Paintings) #392
Comments
Of course, if it works and is secure, then there's no reason for me not to. When I last looked at protecting paintings it wasn't feasible (something to do with either the event wasn't that good or there wasn't a persisted unique ID however the latter definitely isn't an issue now). Mind you when I last looked at something like this it was probably at least a year ago so it's probably safe to say it's possible now :)
It could be like redstone: either always allow it or always deny it. Trying to figure that out would probably have false positives at times which isn't always the best when trying to decide if they can destroy it or not :( If you do manage to look at it before I do (given you were quick to resubmit this I imagine you realise how long I can take for things at times) and you have questions about anything feel free to hop in IRC I can answer anything there ;) |
Ah sweet, good to know this may someday be a reality. I'm a bit swamped in schoolwork, so I wouldn't actually be able to start working on it anytime soon (last time I did any work on plugins was during summer break). But I'll likely try come winter break, if it isn't already being done by then. Also, yeah, I was thinking redstone-like protection would be afforded to protectable entities. There is another matter - for paintings and item frames, sign-like protection would also be necessary (so the entity imparts its protection onto the blocks it is attached to, as signs do). That detail may be tricky for variable-sized paintings, of course. I wonder, should all protected entities be immune to all forms of damage? Perhaps aside from void damage, that is. Default protectable entities could be simply paintings, item frames, boats, and all forms of minecarts - damage immunity may be overpowered for mobs. Also, right and left-click interactions can be fully analogous to how they apply to blocks (so, for example, a cpublic minecart could be ridden by anybody but only destroyed by the owner, and a cpublic sheep could be sheared by anybody, but only attacked by the owner). It seems most things would translate well in terms of gameplay, though I'd imagine some bits will be hairier in the code. Anyways, thanks for the response, and thanks for keeping up the good work! |
You can make the "Pig wih saddle" protection with /cprivate, /cpassword, /cpublic. I think that will allow RolePlay servers to make something like a cars. [Sorry for my english; I came from Poland] |
Couldn't you get the UUID for the Item Frame/Entity and then when another player interacts with it ie: hitting or just plain interacting in the case of a villager then it checks perms for that specific UUID? This would make my server shop better as they wouldn't be able to break the itemframes. |
the introduction of item frames is defiantly something of a security risk and if lwc doesn't start expanding beyond chests and start allowing the protection of valuable blocks than it is going to start lagging behind in player controlled protection to be honest i will never use item frames until they are safe because frankly their current implementation is just asking for someone to steal your set of enchanted dia armor or whatever you want to show off. this needs ti be added to make frames viable because unless your on a server with region wide protections for your property lwc doesn't cut it anymore |
It is more of a technical problem. I'm also looking into allowing Storage Minecarts to be protected and have working test versions of that (although need to be heavily improved to be release/dev build ready). Item frames are something I want to look into soon. LWC was designed for blocks so getting it to work with entities requires a bit of fancy footwork ;) The rewrite should support it a lot more easily but obviously I want to have it in the current version as the rewrite is still a few months away With exams starting very soon it will be difficult to get much work in so I can't make any guarantees for dates. |
What you need to do is get the UUID and use that to lock the entity right? :D On Nov 29, 2012, at 4:28 PM, Tyler Blair notifications@github.com wrote:
|
Correct however you would need to understand that LWC depends on protections being a "Block" in many places so it of course can be done using a hack (which I've already done for storage minecarts which can be extended to item frames) or a semi-hack (by making it work properly for just actions you'd want to use on them anyway -- likely what I'd be okay) and the proper solution which just wouldn't be possible on the current version. |
I understand... :D On Nov 29, 2012, at 4:57 PM, Tyler Blair notifications@github.com wrote:
|
Looking forward to this, actually it is one of the reasons my server is still on 1.3.2-R3.0 :-) |
Is not having item frames not protectable really that bad? Can't players simply just not use them if they don't want to be stolen? (not saying that to justify not doing it BTW just curious) |
Wow, excellent progress! :D |
@tyler the same could be said about doors and other blocks, don't use them if you don't want them stolen :D On Nov 30, 2012, at 11:52 AM, Tyler Blair notifications@github.com wrote:
|
Well I did say, one of the reasons :-) We are always "slow" to update, to make sure everything is working as we expect. Besides, this is a "free server" no donating or such, so we dont need to update on first CB dev build as many others... |
Indeed - although it doesn't support preventing the block behind it from being destroyed. If a frame (or any protected entity, really) is destroyed by the world (e.g removing a block from behind it) should the frame just stay there? Or should LWC try and prevent the block from being broken in the first place? admittedly the former seems safer because it prevents stuff such as water from sending it into oblivion. |
Yeah, it would probably be a lot safer and easier to implement "ignore the destruction of this entity", even if it does lead to floating item frames. As a bonus, paintings would be able to ride on the exact same implementation. Otherwise, you'd have to worry about the different blocks a large painting is attached to. And honestly, now that you mention it, it would be neat to see an underwater room with paintings/frames that don't pop off :p |
oh man the horror |
…TE THE FOLLOWING: THIS HAS NOT BEEN FULLY TESTED OR EXPLORED. This extends LWC protections to the following major entities: Storage Minecarts, Portraits, and Item Frames. LWC has been originally designed to work with clean Block & Material objects. Making it work with entities is interesting so I _expect bugs_! * All wall entities should be protectable: portraits, item frames * => To interact with them you need to try to destroy them. * => You yourself cannot destroy a protected entity. You need to /cremove it * => Protected entities will NEVER BE DESTROYED unless /cremove'd at the moment. That means if the wall backing them is removed, the entity stays! And if water fills your beautiful palace, the entities again stay. * STORAGE MINECARTS are protectable * => Furthermore, /cmagnet WILL work on storage minecarts * => When interacting with the cart, try to open the inventory (right click) * /lwc admin cleanup has been tested and properly checks for entities but has not been fully examined * There *may* be entities that I don't know of that can be protected. I've tried protecting MOBs and it didn't work so you don't need to try that! (although LWC could probably protect mobs really easily now, but that's a different story) Again, bugs are expected at this point so PLEASE DO NOT RUN ON HUGE 300+ PLAYER PRODUCTION SERVERS! As much as I would love that, you'll probably hit a brick wall very quickly. This addresses #392 for the most part. There is s till more left to do for a full implementation however this is a good start.
This is now a part of #783+. Please read the commit above carefully because I simply cannot guarantee what happens if you use this build. I can however provide a relatively good chance that you'll be able to protect entities ;) |
…TE THE FOLLOWING: THIS HAS NOT BEEN FULLY TESTED OR EXPLORED. This extends LWC protections to the following major entities: Storage Minecarts, Portraits, and Item Frames. LWC has been originally designed to work with clean Block & Material objects. Making it work with entities is interesting so I _expect bugs_! * All wall entities should be protectable: portraits, item frames * => To interact with them you need to try to destroy them. * => You yourself cannot destroy a protected entity. You need to /cremove it * => Protected entities will NEVER BE DESTROYED unless /cremove'd at the moment. That means if the wall backing them is removed, the entity stays! And if water fills your beautiful palace, the entities again stay. * STORAGE MINECARTS are protectable * => Furthermore, /cmagnet WILL work on storage minecarts * => When interacting with the cart, try to open the inventory (right click) * /lwc admin cleanup has been tested and properly checks for entities but has not been fully examined * There *may* be entities that I don't know of that can be protected. I've tried protecting MOBs and it didn't work so you don't need to try that! (although LWC could probably protect mobs really easily now, but that's a different story) Again, bugs are expected at this point so PLEASE DO NOT RUN ON HUGE 300+ PLAYER PRODUCTION SERVERS! As much as I would love that, you'll probably hit a brick wall very quickly. This addresses #392 for the most part. There is s till more left to do for a full implementation however this is a good start.
adding '389': to the list of protectable blocks doesnt allow me to add a protecting, instead the item frame pops off and nothing happens using the latest dev build #836 |
Any update on this, maybe Armour Stands as well, as we have been having issues with people stealing form those. |
Reposting this after the bulk closing; sorry if this one falls under the "will never see the light of day" category, but I'm still hopeful.
Basically, if LWC can let players protect entities, then paintings and the upcoming Item Frame (and perhaps other interesting things, such as storage minecarts, or even general minecarts) could be protected. As players tend to think of paintings as blocks, and will invariably do the same for Item Frames, they'd be disappointed to learn there are no protection options out there.
Obviously, adding entity protection is a big thing, and likely rather complicated (especially once you start considering special cases such as checking if a player shot an arrow at their own item frame), but I still feel it would be better within LWC (instead of a separate plugin with its own database and commands).
Also, is anybody allowed to contribute? I.e. if nobody else tries to work on this, and I decide to take it up, would my pull request be considered? (assuming of course it isn't buggy and does the job right)
The text was updated successfully, but these errors were encountered: