Create a complete Minecraft PaperMC plugin (Java, version 1.21+) named "SMPControl".
MAIN GOAL:
The SMP should ONLY start when the command "/smp start" is executed.
---
FEATURES:
- BEFORE "/smp start":
- PvP must be disabled
- Nether must be locked
- Diamond armor must NOT be allowed
- SMP is not active yet
---
- COMMAND: "/smp start"
When executed:
- Set "smpStarted = true"
- Start a 30-minute grace period ("gracePeriod = true")
Effects for ALL players:
- Show big TITLE: "&a&lSMP STARTING"
- Launch players slightly upward (Y velocity ~1.2)
- Apply slow falling effect (no fall damage)
- Spawn particles around players (PORTAL, FLAME, END_ROD)
After 3 seconds:
- Show titles:
- "Grace period ends after 30 minutes"
---
- GAME RULES AFTER START:
- During grace period:
- PvP must be disabled
- After 30 minutes:
- PvP automatically enabled
- Nether:
- Must be locked until "/neth unlock"
- Armor restriction:
- Only iron armor allowed until "/dia unlock" - Prevent equipping diamond armor
---
- COMMAND: "/dia unlock"
- Allow diamond armor
- Broadcast TITLE:
"&b&lDiamond Armor is Allowed"
---
- COMMAND: "/neth unlock"
- Unlock Nether portals
- Broadcast TITLE:
"&6&lNether is Unlocked"
---
- COMMAND: "/showcords"
- Show arena coordinates as TITLE to all players
- Coordinates must come from config.yml
---
CONFIG.YML:
arena: x: 100 y: 64 z: 200
---
EVENT LISTENERS REQUIRED:
- EntityDamageEvent:
- Cancel fall damage
- EntityDamageByEntityEvent:
- Disable PvP if: - SMP not started OR - gracePeriod is active
- PlayerPortalEvent:
- Cancel Nether teleport if locked
- InventoryClickEvent / Armor equip:
- Block diamond armor if not allowed
---
TECH REQUIREMENTS:
- Use Bukkit/Spigot/Paper API
- Use BukkitRunnable for timers (30 min grace period)
- Use Title API for messages
- Use clean OOP structure:
- Main class - Command handler - Event listener
---
OUTPUT REQUIRED:
- Full Java source code
- plugin.yml
- config.yml
- Package name: me.abir.smp
- Fully working without errors
---
IMPORTANT:
- SMP must NOT start automatically
- "/smp start" is the ONLY trigger
- Code must be optimized and production-ready
The generation was stopped before any content could be produced.
No files in this session