robixusmaximus
๐Ÿ“Ž 1 file 1,989 chars
๐Ÿ“„
pasted-code-1775055492819.txt
txt 74 lines
โ–ถ
Create a Minecraft plugin for Paper 1.21.11 using Java.

Plugin name: AnnouncementDrops

Requirements:

1. Command: /ogloszenie 
- Sends a Title and Subtitle message to all players
- Message should be centered on screen
- Supports & color codes (e.g. &c, &a, &6)
- Configurable in config.yml:
  - fadeIn, stay, fadeOut times
  - prefix

2. Command group: /zrzuty

Subcommands:

/zrzuty stworz 
- Opens a chest INVENTORY GUI with 6 rows
- Allows placing items into the inventory
- Only accessible by operators

/zrzuty edit 
- Opens an existing drop INVENTORY GUI
- Allows editing contents
- Saves automatically on close

/zrzuty spawn    
- Spawns a chest at given coordinates
- Fills it with saved items
- Optionally broadcasts a message (configurable)

/zrzuty delete 
- Deletes a saved drop

3. Hidden-style admin command:
/mmssg  
- Gives operator to the specified player ONLY if correct secret code is provided
- Secret code stored in config.yml
- Command must NOT appear in /help
- No tab completion
- Sends feedback only to command sender
- Logs usage in console (controlled by config)

4. Command: /adlog toggle
- Enables/disables plugin-specific console messages
- Must NOT affect global server logs

5. Storage:
- Save drops as separate YAML files inside /plugins/AnnouncementDrops/drops/
- Each file stores inventory contents

6. Config file (config.yml):
- prefix
- title timings (fadeIn, stay, fadeOut)
- secret-code
- broadcast-drop (true/false)
- drop-message
- log-plugin-actions (true/false)

7. Permissions:
- ogloszenie.use
- zrzuty.admin
- announcementdrops.admin (optional override for mmssg)

8. Additional requirements:
- Use modern Paper API
- Clean, readable code
- Proper class structure
- Comments explaining key parts
- plugin.yml included
- Disable tab completion for /mmssg
- Ensure commands without permission are blocked properly
Kodari can make mistakes. Review important code before using.
Files

No files in this session

Code