reenable books

  • 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?

  • vouch, the same functionality can be achieved with a lecturn pretty much

    i fucking put everything into you and you stomped on it.

  • 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.

  • @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.

  • 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.

  • @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.

    Wild1145

    Network Owner at TotalFreedom

    Managing Director at ATLAS Media Group Ltd.

    Founder & Owner at MastodonApp.UK

  • Can someone also confirm that command books and normal books are separate, or do we need to put some more thought into this?

    Wild1145

    Network Owner at TotalFreedom

    Managing Director at ATLAS Media Group Ltd.

    Founder & Owner at MastodonApp.UK

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!