Books are disabled, even though you can easily block any illegal symbols from books by adding a character whitelist
Also allow Command Books if they dont include any click commands with admin commands, would it be possible, if yes do you vouch or object?
reenable books
-
Noah -
November 8, 2020 at 4:07 PM -
Closed
Please Note: The TotalFreedom Forum has now been put into a read-only mode. Total Freedom has now closed down and will not be returning in any way, shape or form. It has been a pleasure to lead this community and I wish you all the best for your futures.
-
-
vouch, the same functionality can be achieved with a lecturn pretty much
-
object for command books, there's way too much potential for misuse that it'd be a bad idea to introduce it
Vouch for books
-
I remember books were disabled because they were used to easily create crash chunks/inventories. I'm not saying we shouldn't enable them; I'm just bringing that concern up because it's something that needs to be dealt with if we are to re-enable books.
-
There are two issues we would need to address if we were to enable both.
-
Command books would need to be restricted based on permissions if possible. They are notoriously exploitable and extremely easy to pull off. This would be a top priority fix to ensure that nothing fucks up.
-
We would need to find a way to ensure that books can't get too big. There are many ways we could do this (restricting book page counts, page lengths, etc) but the most optimal would be a fix that doesn't interfere with the gameplay, but still fixes the issue.
-
-
I have no idea what command books are. Is this a new 1.16 thing? I had no idea books were blocked. That's kind of ridiculous. I think this should work: https://www.spigotmc.org/resources/booklimiter.68120/
I'll get a bunch of stuff patched once we get a new damn owner and I can have access to the server files. You know, so I can do my job.
-
@Telesphoreo#612 Command books literally have been here since 1.8
-
@Telesphoreo#612 They are referring to books with a ClickEvent that runs a command. Players used to troll others by telling them to click in the book, which immediately executes the command without revealing what it is.
-
@StevenNL2000#615 ah i see. i really can't find much about these stupid "click events". they can be done to weapons in death messages so if you click on a weapon name on a death message "player 1 killed player 2 with [click me]" and you click it it'll run a command. no idea if theres a listener that can cancel all these click events. i looked and i can't seem to hardly find any documentation on it. i have a feeling i can do it in a similar way that the sign blocker works but i have no idea. command books seem pretty useless so if they're blocked let's keep them blocked. although are they a separate item? or are command books just books and if i unblocked books would command books also be unblocked?
-
@Telesphoreo#616 Command books are just books that happen to have ClickEvents in them that run commands. That is why "regular" books are currently unavailable as well.
What you should do is try to get an understanding of the chat component API:
https://www.spigotmc.org/wiki/the-chat-component-api/Then, use getPages() in BookMeta.Spigot to iterate over the BaseComponents of the book and override all the ClickEvents to do nothing. There is no event that is called when a player executes a command as a result of a ClickEvent, other than the regular PlayerCommandPreprocessEvent.
-
I’ll vouch but only if all click events are disabled, I still remember the time when that one guy tricked a bunch of people into clicking on links with CP in them using those.
-
You can allow ClickEvents by only allowing Commands to be executed that are whitelisted, and just copying stuff. If anyone gets up to no good, we have admins for a reason.
-
Quote
@Noah#643 If anyone gets up to no good, we have admins for a reason.
You see, while this is true for a lot of things, it isn't that true for books, as a book can be edited to have litterly anyone as the author, meaning that you could potentialy frame someone (this has happened before), same goes with books and quils as those don't have any uuids or igns attached to them.
-
DragonSlayer2189 Then remove the ability to edit book authors.
-
@Noah#657 that's like saying we should just remove all of the bugs in Windows 10, how can you say something so ignorant jeez. it can be done via a command or even a custom client.
-
If books can be enabled in a sensible way that doesn't cause us to risk crashing things, then I'm happy with that.
The command books I'm less sure on because as has been highlighted, we would need it to either honour the existing permissions system, or alternatively we would need to lock them down so they can only run a set of whitelisted commands that only ops could run.
Once I've got some guidance from Telesphoreo on what looks to be practical, we can go from there I'd say.
-
For command books:
Vouch for OP-only commands.
For Books in general:
Vouch (just maybe disallow more than one in a chest or something idk) -
Can someone also confirm that command books and normal books are separate, or do we need to put some more thought into this?
-
@wild1145#2180 There is no such thing as a "command book" other than it being a regular book that just happens to contain a command.
-
I dont know if im able to bump because im not an admin: just remove this post if im wrong but bump.
-