For each present picked up, the player receives a certain reward. Presents are specified manually by the admin. After a certain cycle, they are restored. Also in the config, you can activate the option for random spawning of a present near the player in a certain range near him.
Installation
Stand on the block where you want to place the gift block. But you can create more types.
/present add
Commands
Description
Command
View mode commands
/present help
Adds +1 spawn point for the present
/present add
Removes the present that the player is looking at
/present remove
Adds an item to your hand as a prize when pick up a present. You need to specify the drop chance. Be sure to change the drop type in the config for this mode.
/present additem <chance>
Permissions
You must use a permission manager like LuckPerms which supports .* permissions notation. Bukkit doesn't support this notation by default!
For what
Permission
Gives all mode access to the player
fun.present.*
Gives the player permission to create/delete presents
fun.present.create
Gives the player permission to open presents
fun.present.open
Main config (config.yml)
Presents enable:true#If "false", this mode will not be availablePresents min server online:0#How much online must be on the server in allowed worlds for the mode to workPresents head settings:#As list. [Material or head value, Custom model data, FunGames animation] - ['eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMWI2NzMwZGU3ZTViOTQxZWZjNmU4Y2JhZjU3NTVmOTQyMWEyMGRlODcxNzU5NjgyY2Q4ODhjYzRhODEyODIifX19',0,'PRESENT_1'] - ['eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNDZmMTYyNjEwN2U4MmFmZjlkOWUyMGY0MTc4NmE2YzUwZDllMzY2ZThhYmU5M2MyMWZjOTA4MTVmNWJlOGNjOSJ9fX0',0,'PRESENT_2'] - ['eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZWNhNjQzYTUzOWMyNzU3NTU3MzcwOGM1YTQyNmFkNjIwM2JjNTE5NzQ5ZmIxNDllZjdmMWIyYTY4MzM5OCJ9fX0',0,'PRESENT_3'] - ['eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMmU2ZTY1MmFkYzBhNGY1YmY0MmE3ZjhkOGM3Njk4YjFlYWI4YTZiYzA5YWUzZjJkNzM5NDZiN2UzNTU1MDQ3In19fQ',0,'PRESENT_4'] - ['eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYmQ3ZDQ0ZTg2NDQ4YTk2YmI1YmIyM2UyNGEyMWE2NjViNzNmODU2YmExMGRlNDJmNTc3YzY4OGMxOTE4ZiJ9fX0',0,'PRESENT_1']Presents interval:300#In ticks. How long present will be active and player can pick up itPresents delay:120#In ticks. Delay between intervalsPresents send spawn messages to all worlds:false#Write a message to all the worldsPresents title enable:true#Will the title be displayed when you win?Presents title fade in time:10#In ticksPresents title stay time:40#In ticksPresents title fade out time:10#In ticksPresents fireworks:#Victory animations. You can set 1 and more animations. Or set [] to disable - 'SALUT_3'Presents random enable:false#Will the gift spawn randomly near the player?Presents random interval:60#In seconds. How much time is given to pick up a gift?Presents random delay:1200#In seconds.Presents random chance to spawn near player:0.5#Chance to spawn a present near the player
Mode config (presents.yml)
Presents rewards:Drop mode:MONEYMoney reward:1000.0Items reward: [] #Set by commandCommand reward: []Presents locations: [] #Set by command
You can change the type of reward. Just change it in the config above. Here are what they are:
1) MONEY - Gives only money
2) ITEM - Gives only one item with some chance
3) ALLITEMS - Gives all items in list
4) COMMAND - Executes commands. Example:
Command reward:
- eco give %player% 1000
- say Cool