Create a custom Minecraft SMP plugin featuring 8 different types of custom swords.
Main Command
The main command for this plugin must be /gleamsmp.
When a player executes /gleamsmp, a custom GUI menu should open, allowing them to access and manage all 8 custom swords.
Core Requirements
- Add 8 different types of custom swords to the plugin.
- Create a custom GUI menu that displays all 8 swords.
- Each sword must have its own unique slot, name, and design in the GUI.
- Players should be able to access the available swords through the main
/gleamsmpcommand. - Organize the GUI properly so that all 8 swords are easy to view and select.
- Make the GUI visually appealing and suitable for a Minecraft SMP server.
- Ensure the command and GUI work smoothly without errors or conflicts.
- Keep the plugin optimized and compatible with the server's Minecraft version.
Important: For now, create only the basic plugin structure, the main /gleamsmp command, and the GUI containing 8 custom sword slots. Do not decide the swords' abilities, damage, enchantments, crafting recipes, or special effects yet. I will provide the specific details for each sword in the next instructions.
Make the plugin clean, reliable, and easy to expand with additional custom features later.
Gleam SMP Plugin — Start Command and Grace Period System
Create a second command for the existing Minecraft plugin: /gleamsmp start.
This command will control the SMP startup sequence, display announcements to all online players, and automatically enable the Grace Period after 15 minutes.
1. Start Announcement
When an authorized administrator executes /gleamsmp start:
- Display a small, clean Minecraft title on every online player's screen.
- The message should say: "Gleam SMP STARTING!"
- Keep the text short, centered, and easy to read.
- Do not use an excessively large or cluttered display.
- Play a suitable notification sound.
2. Countdown System
After the initial announcement, wait exactly 2 seconds before starting the countdown.
Display the following messages to every online player:
- 3
- 2
- 1
Each number should appear for 1 second before the next number appears. Use suitable countdown sounds.
Important: Do not start the countdown immediately. The initial 2-second delay must be respected.
3. Start Now Announcement
After the countdown finishes, wait another 1–2 seconds, then display:
"Gleam SMP START NOW!"
Display this message to every online player with a suitable sound effect.
At this point, the SMP officially begins. Record the exact start time so the Grace Period can be enabled automatically 15 minutes later.
4. Grace Period Status Message
Immediately after the "GLIM SMP START NOW!" announcement, wait approximately 1–2 seconds and display this message:
"GRACE PERIOD IS CURRENTLY DISABLED! IT WILL ACTIVATE IN 15 MINUTES."
Show the message clearly to all online players using a title, subtitle, or action bar.
During these 15 minutes:
- The Grace Period must remain disabled.
- Players should be able to play normally according to the server's existing rules.
- Display the remaining time when appropriate, such as through an action bar countdown.
- Do not enable the Grace Period early.
5. Automatic Grace Period Activation
Exactly 15 minutes after the SMP officially starts, automatically enable the Grace Period within the plugin.
When the timer reaches zero:
- Set the Grace Period status to ON.
- Display a title to every online player saying "GRACE PERIOD ACTIVATED!"
- Display a subtitle saying "Players are now protected. PvP is disabled."
- Play a suitable activation sound.
- Update the plugin's internal Grace Period state.
- Ensure the existing PvP protection system actually blocks player-versus-player damage while the Grace Period is active.
The Grace Period must activate automatically without requiring an administrator to execute another command.
6. Technical Requirements
- Integrate the complete system directly into the existing Glim SMP plugin.
- Use the existing
/gleamsmpcommand structure. - Only authorized administrators can execute
/gleamsmp start. - Prevent multiple countdowns or start sequences from running simultaneously.
- If the command is executed while the SMP is already running, show an appropriate message instead of restarting the timer.
- Ensure all timers and scheduled tasks are handled safely.
- If the server restarts, handle the saved SMP start time and Grace Period state correctly so the 15-minute timer cannot be accidentally reset or exploited.
- Make the Grace Period status persistent where appropriate.
- Ensure compatibility with the existing custom swords, GUI, and other plugin features.
- Avoid blocking the main server thread or causing TPS drops.
Expected Sequence
- Administrator executes
/gleamsmp start. - Display "Gleam SMP STARTING SOON!"
- Wait 2 seconds.
- Display countdown: 3 → 2 → 1.
- Wait 1–2 seconds.
- Display "Gleam SMP START NOW!"
- Wait 1–2 seconds.
- Display "GRACE PERIOD IS CURRENTLY DISABLED! IT WILL ACTIVATE IN 15 MINUTES."
- Keep Grace Period disabled for 15 minutes from the official start time.
- Automatically enable Grace Period and announce "GRACE PERIOD ACTIVATED!"
Implement this as a complete, working feature inside the plugin, not merely as a visual announcement. The countdown, timer, Grace Period state, and PvP protection must all function correctly together.
I started the Gleam SMP plugin work: the eight-sword placeholder GUI and /gleamsmp start sequence with a persistent 15-minute Grace Period and PvP protection. I’ll compile it once the implementation is finished.
Add the
/gleamsmpsword-placeholder GUI and command behavior.Add the persisted, restart-safe start sequence and PvP grace protection.1.
/gleamsmpopens a protected GUI with eight uniquely named, styled sword placeholders. Clicks and drags are blocked; the entries grant no items or abilities./gleamsmp startis restricted togleamsmp.admin(default: op), with console access. The countdown and grace lifecycle are persisted for restart recovery; PvP damage from players, including their projectiles, is cancelled while grace is active.
The plugin is implemented and compiled successfully. It includes the protected eight-sword placeholder GUI, the admin-only /gleamsmp start sequence, restart-safe Grace Period persistence, and PvP protection while Grace Period is active.
📄
pasted-code-1792347813565.txt
txt
51 lines
▶
## Fix the Glim SMP Start Command and Grace Period System
Please fix the existing `/glimsmp start` command in my Minecraft plugin. The command currently works only once, and the Grace Period (PP) status is not updating correctly.
### 1. Fix the Start Command
- Make `/glimsmp start` work every time an authorized administrator executes it.
- Currently, the command runs successfully only once. Fix the internal state, boolean flags, and task handling that prevent it from running again.
- Every time I execute the command, the complete startup sequence must run again:
1. Display **"GLIM SMP STARTING SOON!"**
2. Wait exactly 2 seconds.
3. Display the countdown: **3 → 2 → 1**.
4. Display **"GLIM SMP START NOW!"**
5. Display the Grace Period status message.
6. Start the 15-minute Grace Period activation timer.
- Do not permanently lock the command after its first execution.
- If a previous countdown or startup sequence is still running, prevent overlapping sequences and display an appropriate message. Once the sequence is finished, the command must be available again.
### 2. Fix the Grace Period (PP) Status
The Grace Period status must correctly reflect the actual state of the SMP.
**When Grace Period is OFF:**
- Display **"GRACE PERIOD: OFF"** to players when they join the server.
- Keep PvP enabled according to the server's existing rules.
- After the SMP starts, keep Grace Period OFF for 15 minutes.
**When Grace Period turns ON:**
- Automatically change the internal Grace Period state to ON after 15 minutes.
- Display **"GRACE PERIOD: ON"** to all online players.
- When new players join, show them the correct current status: **"GRACE PERIOD: ON"**.
- Disable player-versus-player damage while Grace Period is ON.
- Ensure the displayed status and actual PvP protection always match.
### 3. Fix the State and Timer Logic
- Check for variables such as `isStarted`, `isGracePeriod`, and `isCountdownRunning` that might be preventing the command from executing again.
- Reset temporary countdown and task flags correctly when a sequence finishes or is cancelled.
- Do not leave old scheduled tasks running or allow multiple timers to conflict.
- When a new startup sequence is intentionally started, reset the previous Grace Period timer and initialize the new 15-minute timer.
- Save the current Grace Period state and start time where necessary to handle server restarts correctly.
- Ensure player join messages always read the actual current Grace Period state instead of displaying a hardcoded message.
### 4. Important Requirements
- Fix the existing plugin code instead of creating a separate, duplicate plugin.
- Keep the existing `/glimsmp` GUI and all eight custom swords working.
- Do not change unrelated features.
- Ensure all state changes, countdowns, and PvP protection work correctly without causing server lag or errors.
**Expected result:** I should be able to execute `/glimsmp start` repeatedly, and each valid execution should trigger the complete startup sequence and restart the 15-minute Grace Period timer. Players must always see the correct **"GRACE PERIOD: ON"** or **"GRACE PERIOD: OFF"** status, and PvP protection must match that status.
I’ve started fixing the existing Gleam SMP plugin: the start sequence will be restartable once it finishes, Grace Period status will be shown accurately to players, and /glimsmp will work as an alias for /gleamsmp. I’ll compile the changes when they’re complete.
No files in this session