titanchis
๐Ÿ“Ž 1 file 1,880 chars
๐Ÿ“„
pasted-code-1782383864106.txt
txt 21 lines
โ–ถ
Create a stealth survival plugin called "PermanentParanoia" for Paper 1.21. Use Java 21.

Core Mechanics:
1. No Chat Announcements: There must be NO public start or stop messages in chat. Paranoia is an invisible global state that is always active on the server.

2. Symptoms of Paranoia (Active for all online players):
   - Bed/Sleep Restriction: If any player tries to enter a bed, cancel the event and show the vanilla system message: "You may not rest now, there are monsters nearby".
   - Panic Actions: Every time a player right-clicks a CHEST or CRAFTING_TABLE, there is a 30% chance to cancel it and say: "You are too paranoid to focus right now!".
   - Panic Eating: Every time a player tries to eat regular food, there is a 30% chance to cancel the event and say: "Fear grips your throat, you cannot eat...".
   - Hallucinations: Every 60 seconds, play a random fake sound (entity.creeper.primed, entity.phantom.flap, or entity.enderman.stare) directly to each player individually.

3. The Cure (Chamomile Tea / Suspicious Stew):
   - When a player consumes a SUSPICIOUS_STEW, check if it has the specific NBT/item data for the Oxeye Daisy flower effect (In vanilla, Oxeye Daisy stew gives the Regeneration effect).
   - If the player eats this specific Oxeye Daisy stew, there is a 50% chance it successfully "cures" them.
   - Upon a successful cure: Temporarily immunize this specific player from all paranoia symptoms (sleep block, chest block, eating block, and fake sounds) for the next 20 minutes.
   - Send them a comforting message: "The warm chamomile tea calms your mind. The paranoia fades...".

Requirements:
- Compile into a single working .jar file for the plugins folder.
- Ensure efficient tracking of cured players using a clean timer/scheduler that removes them from the immune list after 20 minutes.
Kodari can make mistakes. Review important code before using.
Files

No files in this session

Code