Nightmare icon

Nightmare -----

There's a random chance the player will get a nightmare when they sleep




The plugin will now work on 1.20.1, I haven't tested it on 1.20.2 but I believe it will also work correctly.

I have also added a way to persist the player data that are currently in the nightmare

WARNING: When enabling the Save Inventory option, make sure you have a backup of your world or the player data.
----------, Oct 28, 2023

I re-wrote the code to a much cleaner one.

Remove the option of changing Gamemode

Added a multi world support.
You can now set multiple Nightmare world, when player got nightmare they will get teleported in one of those worlds. Player will now only escape nightmare if they returned to their original world instead of just exiting the nightmare world.

Warning:
Only use this on a stable version of Spigot
You will get Error if you use this on 1.16.5
----------, Apr 4, 2021

I just found out now that after fixing something on the previous update, it created a new bug. It's fixed now

But please don't use this yet on 1.16.5, since I think it's not stable yet therefore creating a bug. Still looking on this one
----------, Mar 2, 2021

New Options:

Disable Commands:

If you want to disable some commands during nightmare, like for example any teleport command, just put the command here, by default and also as an example, I only added the /tp, /spawn, /warp, /home. If the player is currently in Nightmare, they should not be able to use those commands.

Fix Bugs:
There's a dupping bug where, when the server has AngelChest plugin and is enabled, then the "Keep Inventory" is set to true, player's inventory will duplicate upon death. As a temporary fix, if you have the AngelChest plugin, keep inventory won't work even if it is set to true.

Note:
I change the version format from 1.3 to 1.3.1, the other .1 will be for small fix/updates.
----------, Feb 19, 2021

Added a few options

Keep Inventory:
When the players teleports, their items will be stored, then the items in their inventory will be replace to just, by default a wooden pickaxe and bread. After they escape, the wooden pickaxe and bread will be replace by their original item.

Add Timer:
You can choose to either add a timer to their nightmare and if this runs out, the player will be forcefully awaken and will experience Nausea and Hunger.
- I also added a scoreboard to display the remaining time before you get forcefully awaken.

Bug Fix:
There was a bug before that when you set the "Force Death" and "Keep Inventory" to true, then you use a portal, even if you still have nightmare, your item will be return to you.

Current Bug:
Right now there's a bug where, if you sleep and got a nightmare and at the same time also got damage, i.e, while sleeping a zombie hit you and you got a nightmare, then you will glitch, players won't be able to see you and you won't be able to send any messages, sometimes you will also get a "Error executing task on Server" error. Quick fix is the player just need to logout and log back in.

Not sure if I can fix this one, since I only started learning Java just a few days ago

WARNING:
Have not tried this in a medium to large server or a multi world server, be careful, if the server stops or crash and some player are still in nightmare, all of their items will be gone.
----------, Feb 18, 2021

Added an option where you can configure it if you want the player to teleport randomly or if you want them to teleport in a specific location. Don't forget to change the world name if you want them to teleport in a specific location in a world
----------, Feb 17, 2021

Fix the bug where, when the player escape the nightmare, they will still get message every time they respawn
----------, Feb 17, 2021

Resource Information
Author:
----------
Total Downloads: 698
First Release: Feb 17, 2021
Last Update: Oct 28, 2023
Category: ---------------
All-Time Rating:
3 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings