Nyctophobia is a plugin which I made for fun! If you want to have new features please open a conversation or join my Discord: https://discord.gg/8QWmU4ebCC
Whats Nyctophobia?
With Nyctophobia you can scare players with e.g. effects, messages, etc. when they're is in the dark! The plugin is 99% adjustable and offers many small features that can be activated and configured in the config! It also offers a small API for developers.
Features:
• Allow certain actions to be performed when the player is in darkness (Title, Messages, Potions, Sounds, Commmands)
• Change Largest BlockLightning
• Send Random Titles, Messages, ...
• World Blacklist
• Enable Cooldowns, Chances, ...
• There's also a really big config
• 1.19 Support
• Challange System (
NyctoChallenge | SpigotMC - High Performance Minecraft)
TODO:
• Fix some bugs
• Your Ideas
How to use custom music with NoteBlockAPI?
1. To play custom music just follow the tutorial "How to get .nbs" on the following spigot site and put the plugin into the plugins folder of your Minecraft-Server:
https://www.spigotmc.org/resources/noteblockapi.19287/
2. If you followed the tutorial on the spigot site and got a
YOURMUSIC.nbs file put this file in the music folder, which got created (if you've installed the NoteBlockAPI plugin and reloaded the Nyctophobia plugin) in the music folder path (plugins/Nyctophobia/music). Now you're ready!
Config:
Code (YAML):
###############################################################################################
# ███╗░░██╗██╗░░░██╗░█████╗░████████╗░█████╗░██████╗░██╗░░██╗░█████╗░██████╗░██╗░█████╗░ #
# ████╗░██║╚██╗░██╔╝██╔══██╗╚══██╔══╝██╔══██╗██╔══██╗██║░░██║██╔══██╗██╔══██╗██║██╔══██╗ #
# ██╔██╗██║░╚████╔╝░██║░░╚═╝░░░██║░░░██║░░██║██████╔╝███████║██║░░██║██████╦╝██║███████║ #
# ██║╚████║░░╚██╔╝░░██║░░██╗░░░██║░░░██║░░██║██╔═══╝░██╔══██║██║░░██║██╔══██╗██║██╔══██║ #
# ██║░╚███║░░░██║░░░╚█████╔╝░░░██║░░░╚█████╔╝██║░░░░░██║░░██║╚█████╔╝██████╦╝██║██║░░██║ #
# ╚═╝░░╚══╝░░░╚═╝░░░░╚════╝░░░░╚═╝░░░░╚════╝░╚═╝░░░░░╚═╝░░╚═╝░╚════╝░╚═════╝░╚═╝╚═╝░░╚═╝ #
###############################################################################################
#Change to false if you want to disable the plugin
Enabled
: true
#Change to false if you want to disable bStats (What's bStats? https://bstats.org/)
bStats
: true
#Put a number from 0-15 in the field to set the intensity of the light (if this light level is reached the event will be triggered) (0 = lowest, 15 = highest)
MaxLighting
: 0
#Same as MaxLighting, but it's the value how strong e.g. a torch may shine (again, only the values 0-15 may be used)
MaxBlockLighting
: 1
#Set to true if you want the action to only happen at night
MustBeNightInWorld
: false
#Enable this feature if you want that the action occurs by chance
Chance
:
#Set to true if you want to enable this feature
Enabled
: false
#Set the chance (Chance: 1/YOURCHANCE)
#(on this example chance: 1/10)
ChanceNumber
: 10
#Activate the function if you want the action to only happen when there are a certain number of monsters nearby!
MonsterRequirement
:
#Enable the feature
Enabled
: false
#Set the minimum of monsters which need to be spawned in a certain radius
MinMonsters
: 2
#Set the radius of blocks in which a certain number of monsters must be spawned
RadiusInBlocks
: 10
#Set the actions to take place when you fall into the darkness (There's also the DarknessEnterEvent for this if you're using the API)
#IMPORTANT: This actions will be triggered if a player has entered the darkness
Events
:
#Activate this if you want to send a random title from the titles below
RandomTitle
: false
#Activate this if you want to send a random message to the player from the messages below
RandomMessage
: false
#Activate this if you want to apply a random potions from the potions below
RandomPotion
: false
#Activate this if you want to play a random sound from the sounds below
RandomSound
: false
#Activate this if you want to send a random command from the commands below
RandomCommand
: false
#Set the titles, which you want to get displayed
#Add " - " (with the subtitle behind it) if you want to add a subtitle!
Titles
:
- '&8&lIt is so dark! - &0Dark
...'
#Set the messages, which you want to get sended
Messages
:
- '&8Why it is so dark here? &0Help me!'
- '&eGet a torch to light up!'
#Set the potions, which you want to get applied
#Add " - AMOUNTOFAMPLIFIER" at the end of the potions to set the amount of amplifier (Default: 99999999/Unlimited)
#All Minecraft-PotionEffectTypes can you find here: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/potion/PotionEffectType.html
Potions
:
- BLINDNESS - 5
- WEAKNESS
#Set the sounds, which you want to get played
#All Minecraft-Sounds can you find here: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Sound.html
Sounds
:
- BLOCK_ANVIL_BREAK
#You can also play custom noteblock music (ONLY IF YOU HAVE INSTALLED NOTEBLOCKAPI: https://www.spigotmc.org/resources/noteblockapi.19287/)
#To play custom music just follow the tutorial "How to get .nbs" on this spigot site and put the plugin
#into the plugins folder of THIS Minecraft-Server: https://www.spigotmc.org/resources/noteblockapi.19287/
#If you followed the tutorial on the spigot site and got a YOURMUSIC.nbs file put this file in the music folder,
#which got created (if you've installed the NoteBlockAPI plugin and reloaded THIS plugin) in the same path
#as this config.yml (plugins/Nyctophobia/music). Now you're ready!
Music
:
#To enable this feature change this to true! (You must have followed the instructions above to get this working)
Enabled
: false
#Change this to true if you want to play (NBS)Music randomly (if you've added 1 or more musicfiles to the list below)
RandomMusic
: false
#If the music is already started you can decide if it should restart true or false
RestartIfRunning
: true
#Just add all .nbs you've added in the music folder (if you enabled RandomMusic, if not it will play the first song on the list below)
Files
:
- YOURNBSMUSICFILENAME.nbs
#Set the Commands, which you want to get sended
#Add " - console" at the end if you want to send this command in the console!
#There are also some placeholders: %player% = The playername, %uuid% = The UUID of the player
Commands
:
- give
%player% black_wool 1 - console
#Set the actions when you get out of the darkness
#IMPORTANT: This actions will be triggered if a player has left the darkness
#Information: If you want to have more leave event features, write me on discord: TimeCode#0001
LeaveEvents
:
#IMPORTANT: This are the same features as in the Events function, but THIS events will get triggered if you leave
#the darkness
#Activate this if you want to send a random title from the titles below
RandomTitle
: false
#Activate this if you want to send a random message to the player from the messages below
RandomMessage
: false
#Activate this if you want to apply a random potions from the potions below
RandomPotion
: false
#Activate this if you want to play a random sound from the sounds below
RandomSound
: false
#Activate this if you want to send a random command from the commands below
RandomCommand
: false
#Set the titles, which you want to get displayed
#Add " - " (with the subtitle behind it) if you want to add a subtitle!
Titles
:
- '&e&lFINALLY! - &eI am out of the darkness!'
#Set the messages, which you want to get sended
Messages
:
- '&eFinally I am out here!'
#Set the potions, which you want to get applied
#Add " - AMOUNTOFAMPLIFIER" at the end of the potions to set the amount of amplifier (Default: 99999999/Unlimited)
#Add " _ TIMEINSECONDS" to set the time of the potion (Default: 9999999/Unlimited)
#All Minecraft-PotionEffectTypes can you find here: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/potion/PotionEffectType.html
Potions
:
- HEAL - 1 _ 10
- GLOWING _ 5
#Set the sounds, which you want to get played
#All Minecraft-Sounds can you find here: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Sound.html
Sounds
:
- ENTITY_PLAYER_LEVELUP
#Option for the MusicSystem (ONLY IF YOU HAVE INSTALLED NOTEBLOCKAPI)
Music
:
#Stop music after leaving (if you disable this it will play the music till the end)
Stop
: true
#Set a cooldown if the action should only happen every few seconds!
Cooldown:
Enabled
: false
InSeconds
: 5
#WorldBlacklist (if you add a world to this list (if you enabled this feature), this plugin won't work in this worlds)
Blacklist
:
#Set this to true if you want to enable this feature
Enabled
: true
#Set this to true if you want to have a whitelist instead of a BlackList
TurnIntoWhitelist
: false
#Add all blacklisted or whitelisted worlds to this list
Worlds
:
- world_nether
- world_the_end
#Change the Permission of some Commands or the BYPASSPERMISSION
Permission
:
#Command: /nyc help (If you don't have this permission, you also get a no permission message if you typed the wrong syntax)
HelpCommand
: nyctophobia.help
#Command: /nyc reload
ReloadCommand
: nyctophobia.reload
#If you enable this and give a player this permission he won't get darknessevents
Bypass
:
#Enable the Bypass Permission
Enabled
: false
#Set the permission
Permission
: nyctophobia.bypass
#Enable or Disable the Auto Updater
AutoUpdater
: true
#DO NOT CHANGE THIS!!!
#If you change this, the config will reset itself
config-version
: 1.3.1
Commands:
/nyc reload | Reloads the Config (Permission you can change in the config)
/nyc help | Displays the help site (Permission you can change in the config)
API (for developers):
There are 2 Events included in the API (just put the JAR in your buildpath of your project), the DarknessEnterEvent and the DarknessLeaveEvent! Here's a example how to use it:
Code (Java):
public
class DarkEvent
implements Listener
{
@EventHandler
public
void onDarknessEnter
(DarknessEnterEvent event
)
{
//Cancel the Event if you don't want to trigger the events in the config
event.
setCancelled
(
true
)
;
//Get the player which ran into the darkness
Player player
= event.
getPlayer
(
)
;
//And for example send him a message
player.
sendMessage
(
"WOOOOOAH! It's dark here..."
)
;
}
@EventHandler
public
void onDarknessLeave
(DarknessLeaveEvent event
)
{
//Like the DarknessEnterEvent, cancel the Event if you don't want to remove for example the
//effects (which you configurated in the config)
event.
setCancelled
(
true
)
;
//Get the player which ran out of the darkness
Player player
= event.
getPlayer
(
)
;
//And for example give him a potioneffect
player.
addPotionEffect
(
new PotionEffect
(PotionEffectType.
GLOWING,
5,
5
)
)
;
}
}
![[IMG]](/proxy/image?url=https%3A%2F%2Fbstats.org%2Fsignatures%2Fbukkit%2FNyctophobia.svg)
I would be happy if you leave a positive rating on this plugin 