ModsJava
Luck - Adds a luck factor with many events! [1.9]
Luck Adds a luck factor with many events!…
⬇ Download on SpigotLuck
Adds a luck factor with many events!
-------------------------------------------------------------------------------------------------------------
This plugin adds luck to your server!
There are many events which can occur based on luck.
Each event has a percentage range for example 5-20%
It will be 5% if the player doesn't have any luck and 20 if the player has max luck.
Players get luck by having luck gems in their inventory.
Luck gems can be crafted with a configurable recipe by default glowstone dust surounded by 4 emeralds.
You can set how many luck gems are needed to have max luck (default 64).
Features
Installation
Just drop the plugin jar file in your plugins folder and restart the server.
The plugin is developed for 1.8.8 but it might work for other versions too.
If not let me know and I might make it backwards compatible.
Bugs & Suggestions
If something isn't working please let me know and I'll fix it as soon as I can.
Also if you have suggestions for changes or new features let me know!
As long as it's related to lucky events I don't mind adding more things to the plugin.
Planned features
You can follow the development and check out the source at my BitBucket page.
https://bitbucket.org/worstboy32/luck
Commands
-------------------------------------------------------------------------------------------------------------
/luck
Permission: luck.cmd.luck
Displays the current luck percentage.
/luck help
Permission: luck.cmd.help
Displays all the luck commands.
/luck give [player] [amt]
Permission: luck.cmd.give
Spawn in gems for yourself or other players.
/luck events
Permission: luck.cmd.events
Displays all the luck events.
/luck event {event}
Permission: luck.cmd.event
Displays information about the specified event like percentages etc.
It will also display the exact percentage the user has for that event based on his luck so it's recommended to give people permissions for these commands.
/luck reload
Permission: luck.cmd.reload
Reload all the configurations.
/luck info
Displays plugin information.
Permissions
-------------------------------------------------------------------------------------------------------------
Apart from the command permissions these are the permissions.
luck.luck.* - Required to have luck events occur.
luck.luck.{event} - Permission for each event can be given seperate if you want different ranks to have different luck events. Replace {event} with the name of the event.
luck.craft - Required to craft lucky gems.
Configuration
-------------------------------------------------------------------------------------------------------------
There are 3 configuration files in the plugin folder.
For messages and such make sure you don't put single quotes!
Use a single quote twice like I''m to get a single quote!
Also make sure the indenting and such is correct!
If there are errors it's most likely because you made a mistake in the configs!
Messages.yml
This file contains all the messages that you can configure.
I believe every single message in game can be configured including colors and prefix and everything.
The only message you can't configure is /luck info so that you can't get rid of the credits.
But apart from that feel free to change everything or translate it.
Event descriptions and messages are listed in events.yml!
Luck.yml
This is the main configuration file.
There aren't a lot of options in here because most of the options are event specific.
max_luck_gems
The amount of gems required to get maximum luck for each event.
Recipes
The main thing is that you can configure the recipe.
A recipe can have 9 symbols (you can put any symbol you want) 3 on each row.
Each symbol represents a slot in the workbench.
Use spaces for empty slots in the pattern.
In the second section at gem_recipe_items you set what each symbol means.
The material must be a valid material name from the list.
Materials https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html
# Define the pattern with 9 symbols
gem_recipe:
row1 : ' $ '
row2 : '$@$'
row3 : ' $ '
# Define the ingredients.
# Each symbol gets an material assigned.
gem_recipe_items:
'2' : #This can be anything as long as it's an unique index name
char : '@'
material : GLOWSTONE_DUST
'1':
char : $
material : EMERALD
Events.yml
This config file contains all the event specific options.
All events have a default set of options like a description, chances etc.
But most events also have their own event specific options.
Those event specific options are described in the even list below.
lucky:
enabled : true # Set to false to disable the event completely
displayName : Lucky # The name that is used in game.
description : Get a lucky gem when breaking emerald ore. # The description that is displayed when using /luck event {event}
message : Get a lucky gem when breaking emerald ore. # The message that is displayed when the event triggers.
chance:
min : 4.0 # The chance it can trigger with 0 gems.
max : 20.0 # The chance it can trigger with maximum configured gems.
Events
-------------------------------------------------------------------------------------------------------------
These are all the events that can occur.
Each event can be disabled in the config and you can fully customize each event in the Events.yml config.
FAQ
-------------------------------------------------------------------------------------------------------------
It doesn't work...
Check your console/log if there are any errors and if there are report them to me so i can fix it.
Before you report make sure there are no errors in your configs!
If there aren't any errors which would be strange tell me what doesn't work, what version you're using, what Spigot/Bukkit version you're using and any other useful information.
Can I use something else than emeralds?
Currently that's not configurable and I'm not really planning to make it configurable.
I've blocked everything like crafting,trading etc with lucky gems so it's for visuals only.
What about bad luck?
It's planned for later!
Can I remove the message when luck triggers?
Of course! Just leave the message entry blank in the Events.yml file.
Will players lose the gems if they die?
That's kinda the thing about this plugin.
Will you risk it to carry a lot gems to get more luck? Or do you keep them at your home and get less luck?
If people really want it I'll add an option to keep the gems on death but I think it adds another great aspect to the plugin.
How many gems do I need for max luck?
You can configure this amount.
By default you need 4 emeralds to craft one gem and you need 64 gems for max luck.
Which means 4 stacks of emeralds but all of this can be changed.
Can you add xxx event?
Most likely yes, just ask me and I'll let you know if I can add it.
I don't want xxx event!
You can disable any event you want in the config.
The plugin is designed very efficient so it will use up less resources if you disable events as well.
I'm a developer can I add events?
Yes, the plugin is open source so just look in the events package/folder and look at the current events how they are made.
You can do exactly the same to add events to the plugin.
Just make sure you register the event! (see main class)
Servers
Here are some public servers using the plugin so you can test it out!
Adds a luck factor with many events!
-------------------------------------------------------------------------------------------------------------
This plugin adds luck to your server!
There are many events which can occur based on luck.
Each event has a percentage range for example 5-20%
It will be 5% if the player doesn't have any luck and 20 if the player has max luck.
Players get luck by having luck gems in their inventory.
Luck gems can be crafted with a configurable recipe by default glowstone dust surounded by 4 emeralds.
You can set how many luck gems are needed to have max luck (default 64).
Features
- Adds an unique new luck factor
- 15+ events and more are added all the time
- Animations, particles and sound effects for all the events.
- Everything is fully configurable. (percentages, recipe, messages etc)
- Extremely user friendly and easy to use
Installation
Just drop the plugin jar file in your plugins folder and restart the server.
The plugin is developed for 1.8.8 but it might work for other versions too.
If not let me know and I might make it backwards compatible.
Bugs & Suggestions
If something isn't working please let me know and I'll fix it as soon as I can.
Also if you have suggestions for changes or new features let me know!
As long as it's related to lucky events I don't mind adding more things to the plugin.
Planned features
- Many more events! (obviously... Feel free to suggest events too)
- Block (Block incoming damage) [0.4]
- Bait (Instantly catch a fish when you throw hook)
- Disarm (Make target drop current held item)
- Cleave (Deal AOE damage when attacking)
- Smelt (Smelt ores when breaking them)
- Volley (Fire multiple arrows when shooting with bow)
- Drill (Break all ores in a vein when breaking ores) [0.5]
- Commands to spawn gems. [0.5]
- Option to show messages on the action bar instead of chat.
- Display event specific config options in /luck event {event}
- Bad luck!
Spoiler: Some bad luck ideas
Source
When placing TnT it blows up.
When jumping in water you sink.
When hit by a cactus you get poisoned.
When leashing a mob it escapes.
When taming a wolf it runs away.
When emptying bucket it disappears.
When in a minecart it dereals.
When in a boat it breaks.
When killing a squid you get blindness.
When trowing a negative potion it bounces back.
When shooting an arrow it bounces back.
When eating a cake it disappears.
When playing a record it disappears.
When milking a cow it explodes.
When catching a fish you get pulled in the water.
When jumping in water you sink.
When hit by a cactus you get poisoned.
When leashing a mob it escapes.
When taming a wolf it runs away.
When emptying bucket it disappears.
When in a minecart it dereals.
When in a boat it breaks.
When killing a squid you get blindness.
When trowing a negative potion it bounces back.
When shooting an arrow it bounces back.
When eating a cake it disappears.
When playing a record it disappears.
When milking a cow it explodes.
When catching a fish you get pulled in the water.
You can follow the development and check out the source at my BitBucket page.
https://bitbucket.org/worstboy32/luck
Commands
-------------------------------------------------------------------------------------------------------------
/luck
Permission: luck.cmd.luck
Displays the current luck percentage.
/luck help
Permission: luck.cmd.help
Displays all the luck commands.
/luck give [player] [amt]
Permission: luck.cmd.give
Spawn in gems for yourself or other players.
/luck events
Permission: luck.cmd.events
Displays all the luck events.
/luck event {event}
Permission: luck.cmd.event
Displays information about the specified event like percentages etc.
It will also display the exact percentage the user has for that event based on his luck so it's recommended to give people permissions for these commands.
/luck reload
Permission: luck.cmd.reload
Reload all the configurations.
/luck info
Displays plugin information.
Permissions
-------------------------------------------------------------------------------------------------------------
Apart from the command permissions these are the permissions.
luck.luck.* - Required to have luck events occur.
luck.luck.{event} - Permission for each event can be given seperate if you want different ranks to have different luck events. Replace {event} with the name of the event.
luck.craft - Required to craft lucky gems.
Configuration
-------------------------------------------------------------------------------------------------------------
There are 3 configuration files in the plugin folder.
For messages and such make sure you don't put single quotes!
Use a single quote twice like I''m to get a single quote!
Also make sure the indenting and such is correct!
If there are errors it's most likely because you made a mistake in the configs!
Messages.yml
This file contains all the messages that you can configure.
I believe every single message in game can be configured including colors and prefix and everything.
The only message you can't configure is /luck info so that you can't get rid of the credits.
But apart from that feel free to change everything or translate it.
Event descriptions and messages are listed in events.yml!
Luck.yml
This is the main configuration file.
There aren't a lot of options in here because most of the options are event specific.
max_luck_gems
The amount of gems required to get maximum luck for each event.
Recipes
The main thing is that you can configure the recipe.
A recipe can have 9 symbols (you can put any symbol you want) 3 on each row.
Each symbol represents a slot in the workbench.
Use spaces for empty slots in the pattern.
In the second section at gem_recipe_items you set what each symbol means.
The material must be a valid material name from the list.
Materials https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html
Code (YAML):
# Define the pattern with 9 symbols
gem_recipe:
row1 : ' $ '
row2 : '$@$'
row3 : ' $ '
# Define the ingredients.
# Each symbol gets an material assigned.
gem_recipe_items:
'2' : #This can be anything as long as it's an unique index name
char : '@'
material : GLOWSTONE_DUST
'1':
char : $
material : EMERALD
This config file contains all the event specific options.
All events have a default set of options like a description, chances etc.
But most events also have their own event specific options.
Those event specific options are described in the even list below.
Code (YAML):
lucky:
enabled : true # Set to false to disable the event completely
displayName : Lucky # The name that is used in game.
description : Get a lucky gem when breaking emerald ore. # The description that is displayed when using /luck event {event}
message : Get a lucky gem when breaking emerald ore. # The message that is displayed when the event triggers.
chance:
min : 4.0 # The chance it can trigger with 0 gems.
max : 20.0 # The chance it can trigger with maximum configured gems.
Events
-------------------------------------------------------------------------------------------------------------
These are all the events that can occur.
Each event can be disabled in the config and you can fully customize each event in the Events.yml config.
Spoiler: Event List
FellTree
Chop down the entire tree when breaking the bottom blocks.
It wont trigger if there is an air block below the bottom log.
It will remove nearby branches on the top if the main log is at least 3 blocks tall.
There are quite a lot checks to make sure it's a tree but in most cases it works fine. (There might be a few exceptions with some tree especially acacia trees)
Config options:
treeTypes [string list]
A list of tree types that can be felled.
Valid options: (OAK, SPRUCE, BIRCH, JUNGLE, ACACIA, DARK_OAK)
breakBelow [boolean=false]
If set to true it will also break blocks below the initial broken block.
animateFall [boolean=true]
If set to true blocks will actually fall and break when they hit the ground instead of braking instantly. It just looks a little nicer if you have this enabled.
blocksBelowAllowed [number=2]
The amount of blocks allowed at the bottom to trigger the event.
For example if it's set to two the tree can only be felled by breaking the bottom 3 blocks.
If you break the 4th block from the bottom it will never trigger.
felltree:
treeTypes :
- OAK
- SPRUCE
- BIRCH
- JUNGLE
- ACACIA
- DARK_OAK
breakBelow : false
blocksBelowAllowed : 2
animateFall : true
https://gfycat.com/ScaryGracefulBarnswallow
------------------------------------------------------------------
Smash
Break a block instantly when you hit it.
It can only trigger on the first hit on a block so spam clicking a block wont help.
Config options:
blocks [string list]
A list of Material names that can be broken instantly.
Materials https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html
smash:
blocks :
- OBSIDIAN
- ENDER_STONE
------------------------------------------------------------------
Haste
Gain a haste effect when you break blocks.
Config options:
blocks [string list]
A list of Material names that can give the haste effect when broken.
Materials https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html
stackEffects [boolean=false]
If set to true you can get haste effect while the haste effect is active and it will reset the time. This can mean infinite haste once it triggers depending on your setup.
amplifier [number=5]
The amplifier of the haste potion effect.
durationTicks[number=100]
The duration in ticks how long the haste potion effect lasts.
There are 20 ticks in a second usually.
haste:
blocks :
- OBSIDIAN
- ENDER_STONE
- SAND
- DIRT
- GRAVEL
- STONE
- NETHERRACK
- SOUL_SAND
amplifier : 5
durationTicks : 100
stackEffects : false
------------------------------------------------------------------
Spawner
Get the spawner item from the spawner you broke.
Config options:
entityTypes [string list]
A list of EntityType names of spawners that can be broken.
You can add any living entity(mob) type to this list. (This means like SNOWBALL is invalid obviously)
Entities https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/EntityType.html
spawner:
entityTypes :
- ZOMBIE
- SKELETON
- SPIDER
- CAVE_SPIDER
- SILVERFISH
- BLAZE
https://gfycat.com/JovialDearGorilla
------------------------------------------------------------------
Fortune
Get extra loot from breaking blocks.
Please remember that with most blocks the actual block drops which means the player could just repeat breaking and placing to farm items.
So it's recommended to only add loot to blocks that don't drop the block form.
Config options:
loot [-]
A list of materials and each material can have multiple items.
Out of the listed items it randomly picks one and drops it.
Each entry key under the loot entry must be a material name.
Materials https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html
For items you can use this syntax: {item}[:data] {amount} {meta:value ...}
Pretty similar to Essentials.
Examples:
- stone
- wool:10
- 35:10
- stick name:Test_name
- stick name:Test knockback:
Enchantments: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/enchantments/Enchantment.html
fortune:
loot:
OBSIDIAN :
- obsidian
- obsidian 2
MELON_BLOCK :
- glisteringmelon
DIAMOND_ORE :
- diamond
- diamond 2
QUARTZ_ORE :
- quartz 3
- quartz 4
- quartz 5
GLASS :
- glass
https://gfycat.com/WhimsicalFlawlessArmyworm
------------------------------------------------------------------
Loot
Get extra loot from killing mobs.
Pretty much the same as fortune but then for mobs.
Config options:
loot [-]
The same format as Fortune but instead of material names as entry keys you have to type the entity names.
Entities https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/EntityType.html
loot:
loot:
HORSE :
- saddle
- leash
- ironbarding
- goldbarding
- diamondbarding
BUNNY :
- goldencarrot
WITHER :
- '397:1'
# etc... (Not all mobs have extra loot by default but quite a lot do)
------------------------------------------------------------------
Growth
Grow crops, trees and other plants instantly when you plant them.
Config options:
plants [string list]
A list of plants/seeds etc that can be grown instantly.
This needs to be the item in your hand and not the plant itself.
So for example a valid option is SEEDS and not CROPS.
By default it already lists all the possible plants.
growth:
plants :
- SUGAR_CANE
- CACTUS
- SAPLING
- RED_MUSHROOM
- BROWN_MUSHROOM
- SEEDS
- PUMPKIN_SEEDS
- MELON_SEEDS
- CARROT_ITEM
- POTATO_ITEM
- INK_SACK
- NETHER_STALK
https://gfycat.com/WildBreakableAmphiuma
------------------------------------------------------------------
Snack
Restore extra hunger and saturation when eating food.
Config options:
hungerMultiplier [decimal=2.0]
For example if you normally restore 2 hunger it would restore 4 with a multiplier of 2.
saturationMultiplier [decimal=2.0]
For example if you normally restore 2 saturation it would restore 4 with a multiplier of 2.
snack:
hungerMultiplier : 2.0
saturationMultiplier : 2.0
------------------------------------------------------------------
Rush
Gain a speed boost when you start sprinting.
Config options:
amplifier [number=2]
The amplifier of the speed potion effect.
durationTicks[number=100]
The duration in ticks how long the speed potion effect lasts.
There are 20 ticks in a second usually.
rush:
amplifier : 2
durationTicks : 100
------------------------------------------------------------------
Salvage
Get all items back when an item breaks.
Config options:
plants [string list]
A list of materials that can be salvaged.
Only items that have durability will work (all of them are listed as default)
Chainmail has no recipe so those items won't work either.
salvage:
items :
- DIAMOND_SWORD
- SHEARS
# etc...
https://gfycat.com/SleepyElatedCanadagoose
------------------------------------------------------------------
RetainExp
Keep all your experience when you die.
No experience will be dropped either.
Config options:
none
------------------------------------------------------------------
Lucky
Get a lucky gem when breaking emerald ore.
Config options:
none
https://gfycat.com/NewWeepyBeardedcollie
------------------------------------------------------------------
Extinguish
Get a temporary fire resistance buff when you take damage by lava.
It can only trigger on the first interaction with lava.
Config options:
durationTicks[number=200]
The duration in ticks how long the fire resistance potion effect lasts.
There are 20 ticks in a second usually.
extinguish:
durationTicks : 200
https://gfycat.com/SaneNastyBronco
------------------------------------------------------------------
Crit
Deal extra damage when you hit a player/mob.
Config options:
critMultiplier [decimal=2.0]
The initial damage will be multiplied by this number.
If the original damage is 1 (regular punch) it will become 2 if the multiplier is 2.
crit:
critMultiplier : 2.0 [/COLOR ] [/I ]
------------------------------------------------------------------
Roll
Roll when you take fall damage to stop the damage.
Config options:
None
https://gfycat.com/ThirstyThoroughBluefish
------------------------------------------------------------------
Block
Reduce damage taken or block it completely.
By default it blocks full damage when also blocking with a sword and it blocks 50% damage normally.
Config options:
damageMultiplier: [decimal=0.5]
The initial damage will be multiplied by this number.
If the original damage is 2 it will become 1 if the multiplier is 0.5.
damageMultiplierBlocking: [decimal=0.0]
The initial damage will be multiplied by this number when blocking with a sword.
If the original damage is 2 it will become 0 if the multiplier is 0.0.
damageCauses [string list]
A list of damage causes that can be blocked.
The damage causes listed by default are all the possible damage causes.
See the list below for the causes with explanations.
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityDamageEvent.DamageCause.html
block: [/COLOR ] [/I ]
damageMultiplier : 0.5
damageMultiplierBlocking : 0.0
damageCauses :
- CONTACT
- ENTITY_ATTACK
- PROJECTILE
- SUFFOCATION
- FALL
- FIRE
- FIRE_TICK
- MELTING
- LAVA
- DROWNING
- BLOCK_EXPLOSION
- ENTITY_EXPLOSION
- VOID
- LIGHTNING
- SUICIDE
- STARVATION
- POISON
- MAGIC
- WITHER
- FALLING_BLOCK
- THORNS
- CUSTOM
[I ] [COLOR=rgb (64, 64, 64 ) ]
------------------------------------------------------------------
Drill
When breaking a block nearby blocks of the same type will be broken too.
By default ores and gravel can be drilled but pretty much any block can be configured.
Config options:
maxBlocks: [number=20]
The maximum amount of blocks that can be broken.
Don't put it too high as it will lag your server!
damageMultiplierBlocking: [decimal=3.0]
The maximum distance between the broken block and the drilled block.
Don't put it too high as it will lag your server!
blocks [string list]
A list of blocks that can be drilled.
Materials https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html
------------------------------------------------------------------
Chop down the entire tree when breaking the bottom blocks.
It wont trigger if there is an air block below the bottom log.
It will remove nearby branches on the top if the main log is at least 3 blocks tall.
There are quite a lot checks to make sure it's a tree but in most cases it works fine. (There might be a few exceptions with some tree especially acacia trees)
Config options:
treeTypes [string list]
A list of tree types that can be felled.
Valid options: (OAK, SPRUCE, BIRCH, JUNGLE, ACACIA, DARK_OAK)
breakBelow [boolean=false]
If set to true it will also break blocks below the initial broken block.
animateFall [boolean=true]
If set to true blocks will actually fall and break when they hit the ground instead of braking instantly. It just looks a little nicer if you have this enabled.
blocksBelowAllowed [number=2]
The amount of blocks allowed at the bottom to trigger the event.
For example if it's set to two the tree can only be felled by breaking the bottom 3 blocks.
If you break the 4th block from the bottom it will never trigger.
Code (YAML):
felltree:
treeTypes :
- OAK
- SPRUCE
- BIRCH
- JUNGLE
- ACACIA
- DARK_OAK
breakBelow : false
blocksBelowAllowed : 2
animateFall : true
------------------------------------------------------------------
Smash
Break a block instantly when you hit it.
It can only trigger on the first hit on a block so spam clicking a block wont help.
Config options:
blocks [string list]
A list of Material names that can be broken instantly.
Materials https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html
Code (YAML):
smash:
blocks :
- OBSIDIAN
- ENDER_STONE
------------------------------------------------------------------
Haste
Gain a haste effect when you break blocks.
Config options:
blocks [string list]
A list of Material names that can give the haste effect when broken.
Materials https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html
stackEffects [boolean=false]
If set to true you can get haste effect while the haste effect is active and it will reset the time. This can mean infinite haste once it triggers depending on your setup.
amplifier [number=5]
The amplifier of the haste potion effect.
durationTicks[number=100]
The duration in ticks how long the haste potion effect lasts.
There are 20 ticks in a second usually.
Code (YAML):
haste:
blocks :
- OBSIDIAN
- ENDER_STONE
- SAND
- DIRT
- GRAVEL
- STONE
- NETHERRACK
- SOUL_SAND
amplifier : 5
durationTicks : 100
stackEffects : false
------------------------------------------------------------------
Spawner
Get the spawner item from the spawner you broke.
Config options:
entityTypes [string list]
A list of EntityType names of spawners that can be broken.
You can add any living entity(mob) type to this list. (This means like SNOWBALL is invalid obviously)
Entities https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/EntityType.html
Code (YAML):
spawner:
entityTypes :
- ZOMBIE
- SKELETON
- SPIDER
- CAVE_SPIDER
- SILVERFISH
- BLAZE
------------------------------------------------------------------
Fortune
Get extra loot from breaking blocks.
Please remember that with most blocks the actual block drops which means the player could just repeat breaking and placing to farm items.
So it's recommended to only add loot to blocks that don't drop the block form.
Config options:
loot [-]
A list of materials and each material can have multiple items.
Out of the listed items it randomly picks one and drops it.
Each entry key under the loot entry must be a material name.
Materials https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html
For items you can use this syntax: {item}[:data] {amount} {meta:value ...}
Pretty similar to Essentials.
Examples:
- stone
- wool:10
- 35:10
- stick name:Test_name
- stick name:Test knockback:
Enchantments: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/enchantments/Enchantment.html
Code (YAML):
fortune:
loot:
OBSIDIAN :
- obsidian
- obsidian 2
MELON_BLOCK :
- glisteringmelon
DIAMOND_ORE :
- diamond
- diamond 2
QUARTZ_ORE :
- quartz 3
- quartz 4
- quartz 5
GLASS :
- glass
------------------------------------------------------------------
Loot
Get extra loot from killing mobs.
Pretty much the same as fortune but then for mobs.
Config options:
loot [-]
The same format as Fortune but instead of material names as entry keys you have to type the entity names.
Entities https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/EntityType.html
Code (YAML):
loot:
loot:
HORSE :
- saddle
- leash
- ironbarding
- goldbarding
- diamondbarding
BUNNY :
- goldencarrot
WITHER :
- '397:1'
# etc... (Not all mobs have extra loot by default but quite a lot do)
------------------------------------------------------------------
Growth
Grow crops, trees and other plants instantly when you plant them.
Config options:
plants [string list]
A list of plants/seeds etc that can be grown instantly.
This needs to be the item in your hand and not the plant itself.
So for example a valid option is SEEDS and not CROPS.
By default it already lists all the possible plants.
Code (YAML):
growth:
plants :
- SUGAR_CANE
- CACTUS
- SAPLING
- RED_MUSHROOM
- BROWN_MUSHROOM
- SEEDS
- PUMPKIN_SEEDS
- MELON_SEEDS
- CARROT_ITEM
- POTATO_ITEM
- INK_SACK
- NETHER_STALK
------------------------------------------------------------------
Snack
Restore extra hunger and saturation when eating food.
Config options:
hungerMultiplier [decimal=2.0]
For example if you normally restore 2 hunger it would restore 4 with a multiplier of 2.
saturationMultiplier [decimal=2.0]
For example if you normally restore 2 saturation it would restore 4 with a multiplier of 2.
Code (YAML):
snack:
hungerMultiplier : 2.0
saturationMultiplier : 2.0
------------------------------------------------------------------
Rush
Gain a speed boost when you start sprinting.
Config options:
amplifier [number=2]
The amplifier of the speed potion effect.
durationTicks[number=100]
The duration in ticks how long the speed potion effect lasts.
There are 20 ticks in a second usually.
Code (YAML):
rush:
amplifier : 2
durationTicks : 100
------------------------------------------------------------------
Salvage
Get all items back when an item breaks.
Config options:
plants [string list]
A list of materials that can be salvaged.
Only items that have durability will work (all of them are listed as default)
Chainmail has no recipe so those items won't work either.
Code (YAML):
salvage:
items :
- DIAMOND_SWORD
- SHEARS
# etc...
------------------------------------------------------------------
RetainExp
Keep all your experience when you die.
No experience will be dropped either.
Config options:
none
------------------------------------------------------------------
Lucky
Get a lucky gem when breaking emerald ore.
Config options:
none
https://gfycat.com/NewWeepyBeardedcollie
------------------------------------------------------------------
Extinguish
Get a temporary fire resistance buff when you take damage by lava.
It can only trigger on the first interaction with lava.
Config options:
durationTicks[number=200]
The duration in ticks how long the fire resistance potion effect lasts.
There are 20 ticks in a second usually.
Code (YAML):
extinguish:
durationTicks : 200
------------------------------------------------------------------
Crit
Deal extra damage when you hit a player/mob.
Config options:
critMultiplier [decimal=2.0]
The initial damage will be multiplied by this number.
If the original damage is 1 (regular punch) it will become 2 if the multiplier is 2.
Code (YAML):
crit:
critMultiplier : 2.0 [/COLOR ] [/I ]
------------------------------------------------------------------
Roll
Roll when you take fall damage to stop the damage.
Config options:
None
https://gfycat.com/ThirstyThoroughBluefish
------------------------------------------------------------------
Block
Reduce damage taken or block it completely.
By default it blocks full damage when also blocking with a sword and it blocks 50% damage normally.
Config options:
damageMultiplier: [decimal=0.5]
The initial damage will be multiplied by this number.
If the original damage is 2 it will become 1 if the multiplier is 0.5.
damageMultiplierBlocking: [decimal=0.0]
The initial damage will be multiplied by this number when blocking with a sword.
If the original damage is 2 it will become 0 if the multiplier is 0.0.
damageCauses [string list]
A list of damage causes that can be blocked.
The damage causes listed by default are all the possible damage causes.
See the list below for the causes with explanations.
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityDamageEvent.DamageCause.html
Code (YAML):
block: [/COLOR ] [/I ]
damageMultiplier : 0.5
damageMultiplierBlocking : 0.0
damageCauses :
- CONTACT
- ENTITY_ATTACK
- PROJECTILE
- SUFFOCATION
- FALL
- FIRE
- FIRE_TICK
- MELTING
- LAVA
- DROWNING
- BLOCK_EXPLOSION
- ENTITY_EXPLOSION
- VOID
- LIGHTNING
- SUICIDE
- STARVATION
- POISON
- MAGIC
- WITHER
- FALLING_BLOCK
- THORNS
- CUSTOM
[I ] [COLOR=rgb (64, 64, 64 ) ]
------------------------------------------------------------------
Drill
When breaking a block nearby blocks of the same type will be broken too.
By default ores and gravel can be drilled but pretty much any block can be configured.
Config options:
maxBlocks: [number=20]
The maximum amount of blocks that can be broken.
Don't put it too high as it will lag your server!
damageMultiplierBlocking: [decimal=3.0]
The maximum distance between the broken block and the drilled block.
Don't put it too high as it will lag your server!
blocks [string list]
A list of blocks that can be drilled.
Materials https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html
Code (YAML):
[/COLOR
]
[/I
]
drill:
blocks :
- IRON_ORE
- GOLD_ORE
- COAL_ORE
- DIAMOND_ORE
- EMERALD_ORE
- LAPIS_ORE
- QUARTZ_ORE
- REDSTONE_ORE
- GRAVEL
maxBlocks : 20
maxDistance : 3 [I ] [COLOR=rgb (64, 64, 64 ) ]
drill:
blocks :
- IRON_ORE
- GOLD_ORE
- COAL_ORE
- DIAMOND_ORE
- EMERALD_ORE
- LAPIS_ORE
- QUARTZ_ORE
- REDSTONE_ORE
- GRAVEL
maxBlocks : 20
maxDistance : 3 [I ] [COLOR=rgb (64, 64, 64 ) ]
FAQ
-------------------------------------------------------------------------------------------------------------
It doesn't work...
Check your console/log if there are any errors and if there are report them to me so i can fix it.
Before you report make sure there are no errors in your configs!
If there aren't any errors which would be strange tell me what doesn't work, what version you're using, what Spigot/Bukkit version you're using and any other useful information.
Can I use something else than emeralds?
Currently that's not configurable and I'm not really planning to make it configurable.
I've blocked everything like crafting,trading etc with lucky gems so it's for visuals only.
What about bad luck?
It's planned for later!
Can I remove the message when luck triggers?
Of course! Just leave the message entry blank in the Events.yml file.
Will players lose the gems if they die?
That's kinda the thing about this plugin.
Will you risk it to carry a lot gems to get more luck? Or do you keep them at your home and get less luck?
If people really want it I'll add an option to keep the gems on death but I think it adds another great aspect to the plugin.
How many gems do I need for max luck?
You can configure this amount.
By default you need 4 emeralds to craft one gem and you need 64 gems for max luck.
Which means 4 stacks of emeralds but all of this can be changed.
Can you add xxx event?
Most likely yes, just ask me and I'll let you know if I can add it.
I don't want xxx event!
You can disable any event you want in the config.
The plugin is designed very efficient so it will use up less resources if you disable events as well.
I'm a developer can I add events?
Yes, the plugin is open source so just look in the events package/folder and look at the current events how they are made.
You can do exactly the same to add events to the plugin.
Just make sure you register the event! (see main class)
Servers
Here are some public servers using the plugin so you can test it out!
- pvp.hydrafactions.com
Quick facts
- Edition: Minecraft Java
- File type: .jar
- How to install: Install the matching mod loader (Forge, Fabric or NeoForge) for your Minecraft version. → Download the .jar. → Put it in the .minecraft/mods folder and launch that loader profile.
- Where to get it: Opens on Spigot — not every file is mirrored on our own servers.
Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.
Luck - Adds a luck factor with many events! [1.9] is a free Minecraft Java mod. Downloaded 750 times (via Spigot). Download it and open it directly in the game.