I needed a plugin to give a random piece of armor or tool.
Couldnt find a suitable plugin online so I decided to upload this plugin.
/randomgift will get you a random item selected from the config file.
TO-DO Files
// Adjustable files
Config.yml
PlayerData.yml
Given_count.yml
All tools and pieces of equipment:
https://justpaste.it/d1yb5
TO-DO Commands
// Commands
/randomgift
Spawns a random item from the config file
/randomgift PLAYERNAME
Spawns a random item from the config file to targeted player
/randomgift stats
Shows the amount of gifts you've received.
/randomgift tier 1-6
Gives a specific gift in a certain tier.
/randomgift reload
Reloads plugin
/randomgift items
Shows how many items are loaded
/randomgiftgui
Open a GUI to see all listed items and enchantments
/randomgift top
Showcase the top 10 items that have been given
/randomgift top reset
Reset stats
TO-DO Permissions
// Permissions
randomgift.give
randomgift.stats
randomgift.give.tier
randomgift.reload
randomgift.items
randomgift.top
Couldnt find a suitable plugin online so I decided to upload this plugin.
/randomgift will get you a random item selected from the config file.
TO-DO Files
// Adjustable files
Config.yml
PlayerData.yml
Given_count.yml
All tools and pieces of equipment:
https://justpaste.it/d1yb5
Code (YAML):
items:
diamond_pickaxe :
#Define the itemname.
#Make sure to use propper item names.
#For example:
#diamond_boots
#elytra
#leather_chestplate
#etc.
#https://mcreator.net/wiki/minecraft-block-and-item-list-registry-and-code-names
#Disclaimer: not my website, just a list of items I often use.
weight : 1.0
#Define the weight for this item to be spawned.
#For example this item has a 1.0 (Always use X.X)
#If another item has a weight of 99.0.
#This item will have 1 in 100 chance to spawn.
max_enchantments : 4
#Define how many enchantments can be applied to the item.
#It is possible to have more enchantments in the list. It just wont apply all of them
enchantments :
#Define all the enchantments you want to applied to the item.
efficiency:
levels:
- level : 1
chance : 50
- level : 2
chance : 40
- level : 3
chance : 4
- level : 4
chance : 3
- level : 5
chance : 2
- level : 6
chance : 2
- level : 7
chance : 2
- level : 8
chance : 2
- level : 9
chance : 1
- level : 10
chance : 1
unbreaking:
levels:
- level : 1
chance : 50
- level : 2
chance : 40
- level : 3
chance : 4
- level : 4
chance : 3
- level : 5
chance : 2
- level : 6
chance : 2
- level : 7
chance : 2
- level : 8
chance : 2
- level : 9
chance : 1
- level : 10
chance : 1
fortune:
levels:
- level : 1
chance : 50
- level : 2
chance : 40
- level : 3
chance : 4
- level : 4
chance : 3
- level : 5
chance : 2
#Set a certain level to 0 to boost the rarity of an enchantment getting applied.
#In this case I dont always want mending to be applied. Setting an enchantment level to 0 will never get the enchantment to be applied aswell.
mending:
levels:
- level : 0
chance : 90
- level : 1
chance : 10
#Enchantment count can be set for each item. Chances can be 0, just keep in mind that the sum of the chances can never be 0.
enchantment_count:
counts:
- count : 1
chance : 65
- count : 2
chance : 20
- count : 3
chance : 15
- count : 4
chance : 1
#Lore will be applied when a number of enchants gets met.
#1 enchantment will add the lore listed at number 1.
#2 enchantments will add the lore listed at number 2.
#Etc.
lore:
1 :
- "&3[Rarity] &a1"
2 :
- "&3[Rarity] &e2"
3 :
- "&3[Rarity] &63"
4 :
- "&3[Rarity] &c4"
#Prefix will be added to the item when the sum of the enchantment levels are met.
#If the number is not specified in the config. It will automaticly target the closest prefix.
#Efficiency 6
#Unbreaking 3
#Mending 1
#Fortune 3
#Sum of levels is 13, this will target the [Rare] prefix (10 is closer to 13 than 20).
#Fully configurable with colorcodes.
#http://ess.khhq.net/mc/
#Disclaimer: not my website, just a list of colour codes I often use.
prefix:
1 : "&a[Common]&1"
5 : "&b[Uncommon]&2"
10 : "&c[Rare]&3"
20 : "&d[Epic]&4"
30 : "&e[Legendary]&5"
#List of enchantments
#Protection (protection)
#Fire Protection (fire_protection)
#Feather Falling (feather_falling)
#Blast Protection (blast_protection)
#Projectile Protection (projectile_protection)
#Respiration (respiration)
#Aqua Affinity (aqua_affinity)
#Thorns (thorns)
#Depth Strider (depth_strider)
#Frost Walker (frost_walker)
#Sharpness (sharpness)
#Smite (smite)
#Bane of Arthropods (bane_of_arthropods)
#Knockback (knockback)
#Fire Aspect (fire_aspect)
#Looting (looting)
#Efficiency (efficiency)
#Silk Touch (silk_touch)
##Unbreaking (unbreaking)
#Fortune (fortune)
#Power (power)
#Punch (punch)
#Flame (flame)
#Infinity (infinity)
#Luck of the Sea (luck_of_the_sea)
#Lure (lure)
#Mending (mending)
diamond_pickaxe :
#Define the itemname.
#Make sure to use propper item names.
#For example:
#diamond_boots
#elytra
#leather_chestplate
#etc.
#https://mcreator.net/wiki/minecraft-block-and-item-list-registry-and-code-names
#Disclaimer: not my website, just a list of items I often use.
weight : 1.0
#Define the weight for this item to be spawned.
#For example this item has a 1.0 (Always use X.X)
#If another item has a weight of 99.0.
#This item will have 1 in 100 chance to spawn.
max_enchantments : 4
#Define how many enchantments can be applied to the item.
#It is possible to have more enchantments in the list. It just wont apply all of them
enchantments :
#Define all the enchantments you want to applied to the item.
efficiency:
levels:
- level : 1
chance : 50
- level : 2
chance : 40
- level : 3
chance : 4
- level : 4
chance : 3
- level : 5
chance : 2
- level : 6
chance : 2
- level : 7
chance : 2
- level : 8
chance : 2
- level : 9
chance : 1
- level : 10
chance : 1
unbreaking:
levels:
- level : 1
chance : 50
- level : 2
chance : 40
- level : 3
chance : 4
- level : 4
chance : 3
- level : 5
chance : 2
- level : 6
chance : 2
- level : 7
chance : 2
- level : 8
chance : 2
- level : 9
chance : 1
- level : 10
chance : 1
fortune:
levels:
- level : 1
chance : 50
- level : 2
chance : 40
- level : 3
chance : 4
- level : 4
chance : 3
- level : 5
chance : 2
#Set a certain level to 0 to boost the rarity of an enchantment getting applied.
#In this case I dont always want mending to be applied. Setting an enchantment level to 0 will never get the enchantment to be applied aswell.
mending:
levels:
- level : 0
chance : 90
- level : 1
chance : 10
#Enchantment count can be set for each item. Chances can be 0, just keep in mind that the sum of the chances can never be 0.
enchantment_count:
counts:
- count : 1
chance : 65
- count : 2
chance : 20
- count : 3
chance : 15
- count : 4
chance : 1
#Lore will be applied when a number of enchants gets met.
#1 enchantment will add the lore listed at number 1.
#2 enchantments will add the lore listed at number 2.
#Etc.
lore:
1 :
- "&3[Rarity] &a1"
2 :
- "&3[Rarity] &e2"
3 :
- "&3[Rarity] &63"
4 :
- "&3[Rarity] &c4"
#Prefix will be added to the item when the sum of the enchantment levels are met.
#If the number is not specified in the config. It will automaticly target the closest prefix.
#Efficiency 6
#Unbreaking 3
#Mending 1
#Fortune 3
#Sum of levels is 13, this will target the [Rare] prefix (10 is closer to 13 than 20).
#Fully configurable with colorcodes.
#http://ess.khhq.net/mc/
#Disclaimer: not my website, just a list of colour codes I often use.
prefix:
1 : "&a[Common]&1"
5 : "&b[Uncommon]&2"
10 : "&c[Rare]&3"
20 : "&d[Epic]&4"
30 : "&e[Legendary]&5"
#List of enchantments
#Protection (protection)
#Fire Protection (fire_protection)
#Feather Falling (feather_falling)
#Blast Protection (blast_protection)
#Projectile Protection (projectile_protection)
#Respiration (respiration)
#Aqua Affinity (aqua_affinity)
#Thorns (thorns)
#Depth Strider (depth_strider)
#Frost Walker (frost_walker)
#Sharpness (sharpness)
#Smite (smite)
#Bane of Arthropods (bane_of_arthropods)
#Knockback (knockback)
#Fire Aspect (fire_aspect)
#Looting (looting)
#Efficiency (efficiency)
#Silk Touch (silk_touch)
##Unbreaking (unbreaking)
#Fortune (fortune)
#Power (power)
#Punch (punch)
#Flame (flame)
#Infinity (infinity)
#Luck of the Sea (luck_of_the_sea)
#Lure (lure)
#Mending (mending)
// Commands
/randomgift
Spawns a random item from the config file
/randomgift PLAYERNAME
Spawns a random item from the config file to targeted player
/randomgift stats
Shows the amount of gifts you've received.
/randomgift tier 1-6
Gives a specific gift in a certain tier.
/randomgift reload
Reloads plugin
/randomgift items
Shows how many items are loaded
/randomgiftgui
Open a GUI to see all listed items and enchantments
/randomgift top
Showcase the top 10 items that have been given
/randomgift top reset
Reset stats
TO-DO Permissions
// Permissions
randomgift.give
randomgift.stats
randomgift.give.tier
randomgift.reload
randomgift.items
randomgift.top
Spoiler: Image
Quick facts
- Edition: Minecraft Java
- File type: .jar
- Minecraft version listed: 1.20
- 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.
RandomGift is a free Minecraft Java mod. Compatible with Minecraft 1.20. Downloaded 247 times (via Spigot). Download it and open it directly in the game.