Dynamic Difficulty icon

Dynamic Difficulty -----

Allows new & experienced players to play on the same server without difficulty issues!



About DynamicDifficulty
DynamicDifficulty allows new and experienced players to play on your server without them having to worry about it being too difficult or too easy. New players can stroll through the game without being killed every few seconds and experienced players will get a more challenging experience and can potentially get more loot and XP.

Motivation for making DynamicDifficulty
I have a small Minecraft server that I play on with my friends. Some of them are experienced and most of them are bad at the killing mobs part. Most of the inexperienced players stopped coming to the server when I changed the difficulty to Hard mode. I couldn't find any recent dynamic difficulty plugins that had a lot of customizability, so I made this plugin so all my friends can play at the same time without them ragequitting on me :)

Additional information
  • DynamicDifficulty currently supports Spigot and Paper server implementation. Other server implementations may work, but it has not been tested so I won't know for sure.
  • Supports 1.13 - 1.20 (< 1.8) and 1.21 (1.9+) version of a Minecraft server.
  • Supports SQLite, MySQL, PostGreSQL and MariaDB
Featured videos
hqdefault.jpg FullGuide.jpg


Config file and permissions
A lot can be changed in this plugin. You can even make custom difficulties! If you, for example, want mobs to deal more damage on certain difficulties you can change that or you can change it so mobs have a higher chance to drop more loot and XP. Please look at the Github page or the video for more information on all the config settings.

Code (Text):
You can also add .other or .self after the permissions to only allow commands for oneself.
affinity.*.self / affinity.*.other is also allowed.
If you don't provide a user in the commands, the player executing the command will be selected

/Affinity set <user?> <number>
perm: affinity.set
The amount of affinity an user will be set to.

/Affinity difficulties
perm: affinity.difficulties
See all the config values of the difficulties in the game

/Affinity get <user?>
perm: affinity.get
Get the maximum and current affinity of an user.

/Affinity add <user?> <number>
perm: affinity.add
Adds an amount of affinity to an user.

/Affinity remove <user?> <number>
perm: affinity.remove
Removes an amount of affinity to an user.

/Affinity delMax <user?> <number>
perm: affinity.delmax
Removes the maximum Affinity limit for an user.

/Affinity setMax <user?> <number>
perm: affinity.setmax
Sets a maximum Affinity limit for an user.

/Affinity delMin <user?> <number>
perm: affinity.delmin
Removes the minimum Affinity limit for an user.

/Affinity setMin <user?> <number>
perm: affinity.setmin
Sets a minimum Affinity limit for an user.

/Affinity author
perm: affinity.author
Mentions DynamicDifficulty, my name and the person who translated the language you selected

/Affinity reload
perm: affinity.reload
Reloads the config.

/Affinity forceSave
perm: affinity.forcesave
Force saves the current data to the yml or database.

/Affinity playergui
perm: affinity.playergui
Allows you to change all player settings in a chestGUI.

/Affinity help
perm: affinity.help
Sends all the commands in DD to the player.

/Affinity info
perm: affinity.info
Returns some info about stuff that was saved or calculated in the app

Support
If you're having some sort of trouble please check the FAQ underneath this text or come to the Discord server so I can help you set it up or fix any issues you're having.
Does the difficulty of the server matter?
Kind of... it is recommended to put the difficulty on Hard, because I scaled the custom difficulties based on the Hard difficulty. Mobs would become too weak otherwise.

How often does my data save?
It saves every 5 minutes and when a player leaves.

How will Dynamic Difficulty affect mob farms?
Only players can affect the amount of loot and xp dropped. So if a wolf or TNT for example kills a mob nothing about the drops or xp will be changed and will use the default difficulty settings you chose as the standard difficulty with /difficulty.

Does Dynamic Difficulty have Multiverse Support?
Yes, you don't have to install Multiverse to disable DD in The End or the Nether though. You can disable mob changes or receiving affinity points when players are in certain worlds. Make sure that all the worlds where the players are allowed to roam with DD are set to Hard difficulty.
Code (Text):
# Line 87 in the config
disabled-worlds:
- admin_world
- main_hub
- etc...

How much will Dynamic Difficulty affect performance?
Not a whole lot I think (I've never really tested it on a big server), I've tried to optimize everything as best I could by using miscellaneous optimization methods, disabling unused methods and adding aSync whenever possible.

How would I make a peaceful mode?
First, you'll have to make a peaceful mode. I recommend you also change the easy difficulty to change the affinity required, to spare you the pain I've made one here:
Code (Text):
Peaceful:
  enabled: true
  affinity-required: 0
  damage-done-by-mobs: 25
  damage-done-on-mobs: 100
  damage-done-on-tamed: 25
  hunger-drain-chance: 0
  damage-done-by-ranged-mobs: 25
  double-durability-damage-chance: 0
  experience-multiplier: 100
  double-loot-chance: 0
  allow-pvp: false
  keep-inventory: true
  allow-natural-regen: true
  effects-when-attacked: false
  prefix: '&7&l[&b&lPeaceful&7&l]&r'
  mobs-ignore-player:
  - BLAZE
  - CAVE_SPIDER
  - CREEPER
  - ENDERMAN
  - SKELETON
  - SPIDER
  - WITCH
  - WITHER_SKELETON
  - ZOMBIE
  enchanting:
    max-enchants: 1
    max-level: 1
    chance-to-have-armor: 5.0
    chance-to-enchant-a-piece: 15
    armor-drop-chance: 10.0
    weapon-drop-chance: 5.0
    weapon-chance: 1.0
    helmet-chance: 100.0
    chest-chance: 75.0
    leggings-chance: 56.25
    boots-chance: 42.19
Easy:
  enabled: true
  affinity-required: 1
  damage-done-by-mobs: 50
  damage-done-on-mobs: 100
  damage-done-on-tamed: 75
  hunger-drain-chance: 60
  damage-done-by-ranged-mobs: 75
  double-durability-damage-chance: 0
  experience-multiplier: 70
  double-loot-chance: 0
  allow-pvp: true
  keep-inventory: true
  allow-natural-regen: true
  effects-when-attacked: false
  prefix: '&7&l[&b&lEasy&7&l]&r'
  extra-damage-for-certain-armor-types:
    nothing: -3
    leather: -1
  mobs-ignore-player:
  - CREEPER
  enchanting:
    max-enchants: 1
    max-level: 1
    chance-to-have-armor: 5.0
    chance-to-enchant-a-piece: 15
    armor-drop-chance: 10.0
    weapon-drop-chance: 5.0
    weapon-chance: 1.0
    helmet-chance: 100.0
    chest-chance: 75.0
    leggings-chance: 56.25
    boots-chance: 42.19
After adding this to the config, you'll have to set the max affinity of the player you want to allow to play in peaceful mode: /dd setmax player 0

How do I make a custom difficulty? [ video]
Just copy and paste one of the other difficulties and change anything you want, using spaces may break some of the commands, so try not to use any spaces in the names:
Code (Text):
Hard:
  enabled: true
  affinity-required: 1100
  damage-done-by-mobs: 100
  damage-done-on-mobs: 100
  damage-done-on-tamed: 100
  hunger-drain-chance: 100
  damage-done-by-ranged-mobs: 125
  double-durability-damage-chance: 5
  experience-multiplier: 125
  double-loot-chance: 5
  allow-pvp: true
  keep-inventory: false
  allow-natural-regen: true
  effects-when-attacked: true
  prefix: '&7&l[&4&lHard&7&l]&r'
  commands-not-allowed-on-difficulty:
    - gotohome
    - help 34
  extra-damage-for-certain-armor-types:
    golden: 1
    chainmail: 1
    iron: 2
    diamond: 4
    netherite: 5
  enchanting:
    max-enchants: 3
    max-level: 2
    chance-to-have-armor: 20.0
    chance-to-enchant-a-piece: 45
    armor-drop-chance: 20.0
    weapon-drop-chance: 15.0
    weapon-chance: 5.0
    helmet-chance: 100.0
    chest-chance: 90.0
    leggings-chance: 81.0
    boots-chance: 72.9
Very_hard:
  enabled: true
  affinity-required: 1200
  damage-done-by-mobs: 150
  damage-done-on-mobs: 100
  damage-done-on-tamed: 100
  hunger-drain-chance: 100
  damage-done-by-ranged-mobs: 150
  double-durability-damage-chance: 25
  experience-multiplier: 250
  double-loot-chance: 25
  allow-pvp: true
  keep-inventory: false
  allow-natural-regen: false
  effects-when-attacked: true
  prefix: '&7&l[&4&lVery Hard&7&l]&r'
  commands-not-allowed-on-difficulty:
    - gotohome
    - help 34
  extra-damage-for-certain-armor-types:
    golden: 2
    chainmail: 2
    iron: 4
    diamond: 8
    netherite: 10
  enchanting:
    max-enchants: 5
    max-level: 4
    chance-to-have-armor: 50.0
    chance-to-enchant-a-piece: 75
    armor-drop-chance: 25.0
    weapon-drop-chance: 20.0
    weapon-chance: 20.0
    helmet-chance: 100.0
    chest-chance: 95.0
    leggings-chance: 85.0
    boots-chance: 80.0

What are the Placeholders for PAPI? [ video]
%dd_text_difficulty%
- Returns the difficulty of a player.

%dd_affinity_points%
- Returns the affinity points of a player.

%dd_world_text_difficulty%
- Returns the difficulty of the world.

%dd_world_affinity_points%
- Returns the affinity points of the world.

%dd_max_affinity%
- Returns the maximum affinity you can acquire.

%dd_min_affinity%
- Returns the minimum affinity you can acquire.
%dd_user_difficulty%
- Returns the difficulty of a player.

%dd_user_progress%
- The progress between this and the next difficulty.

%dd_user_next_difficulty%
- The next difficulty the user will get.

%dd_user_affinity%
- Returns the affinity points of a player.

%dd_user_min_affinity%
- Returns the minimum affinity a user can acquire.

%dd_user_max_affinity%
- Returns the maximum affinity a user can acquire.

Where can I request new ideas or give errors?
I'd prefer it if you come to the Discord Server. There are 2 channels. 1 for new idea's and 1 for support or questions. You may also submit errors in the resource thread [ here]
- Added executing commands upon changing difficulty (Thank you elteammate)
- Added max and min affinity gain per minute (Thank you elteammate)
- Fixed damage calculations
- Added /dd me (to see the stats of the difficulty you're in)
- TONS of bugs fixed
- Added MythicMob support
- Added max-health option for players
- Added minimum starvation health left for players
- Added a new difficulty inventory
- Changed the locations of the lang files
- Added cancel death for players
- Added some light GeyserMC support
- Disenbugment
- Complete code refactor (Whole plugin has been remade from the ground up)
- Improved performance a little extra
- Improved plugin stability and error catching
- /dd reload, reloads both lang.yml and config.yml now
- Added /dd info
- Added support for switching between languages (Thanks Kuzuanpa, ItsRea1Pers0n and Ale2512 for providing 2 languages)
- Added enabled, damage-done-on-tamed-wolves, health-regen to the config
- Added affinity-per-heart-loss and calculations for wolves
- Updated PAPI, removed a few items and changed the names of others
- Removed unused features (randomize, difficulty-type)
- Stop buggin' me, Amenadiel!
- Added Damage received per Armor types
- Seperated Damage done by Ranged & Normal mobs
- Added lang.yml so you can change Command messages :'(
- Overhauled the commands (You can use "/af set 400" & "/af get" again)
- Added /help
- Added <cmd>.other & <cmd>.self functionality in permissions
- Added functionality for disabling Commands per Difficulty
- Improved performance overall
- Removed disabling bStats from the config (You can still disable it by disabling it in /plugins/bStats/, but not for DynamicDifficulty seperately)
- Added double durability damage chance
- Bug me down Scotty!!
- Added Difficulty per biome & Difficulty in a radius field
- Added PvP setting
- Added Hunger Drain setting
- Added Selectors (@a, @p, @s & @r)
- Added Auto Calculating Features for Min- and Max Affinity
- Added Custom Spawn and Enchant chances for Armor and Items on mobs.
- Enabled Auto Reconnecting for SQL databases.
- BUGS, BUGS, BUGS, BUGS, BUGS, BUGS
-Added PostGreSQL
-Added MongoDB
-Added 'none' save type
-Added SQLite
-Made the Database calls Async to improve performance
-Added a minAffinity setting
-Added /playerGUI & /force-save
-Fixed more bugs
-Added MySQL Support
-1.17 support
-Chosen mobs can now ignore players on certain difficulties
-Minor bugfixes
-More aggressive affinity defaults (config.yml)
-Added difficulty randomizer
-Added multipliers in the config
-Added support for PlaceholderAPI (PAPI)
-Added bStats
-Reworked a lot of the code
-Remade some of the commands to work better
-You can now disable DynamicDifficulty for certain worlds
-You can use custom prefixes for PAPI
-Fixed a few small miscellaneous bugs
[x] 500 downloads
[x] 1000 downloads
[ ] 2500 downloads
[ ] 5000 downloads
[ ] 10000 downloads
------Besides downloads------
[x] Featured in a video besides mine
[ ] Featured in a my top x video
[ ] 50 people in the Discord Server

[​IMG] Discord.png Review.png
Resource Information
Author:
----------
Total Downloads: 5,174
First Release: May 4, 2021
Last Update: Jan 19, 2025
Category: ---------------
All-Time Rating:
12 ratings
Find more info at github.com...
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings