Write a complete Java source code for a Minecraft Paper/Spigot plugin (version 1.20+) in a single class file. The plugin should be a lightweight Anti-Crash tool. Include event listeners to: 1. Prevent Book-and-Quill crashes by limiting page count and character limits. 2. Block Lectern packet spam by adding a small cooldown (250ms) to lectern interactions. 3. Delete items with massive NBT data (over 5000 characters) when a player clicks them in their inventory. 4. Prevent 'Offhand Swapping' packet spam. Provide the code for the Main class and the corresponding plugin.yml file. Use professional coding standards and add comments explaining each fix.