This plugin allows a player to throw an item as a grenade. Server owners can define their own grenade (different items, different explosion size, different tick length). You also have an option of treating the exploded blocks as "mined" blocks.
For a player to throw a grenade, s/he needs to have a permission node for the particular grenade. For instance, in order to throw an Eye_of_Ender as a Grenade_Large, you need to give vkgrenade.use.grenade_large permission node to a player.
You can also configure the appearance of the grenade (name and lore).
Video demo:
Commands:
- /grenade list : lists available grenade types (you can create your own grenade types in config.yml)
- /grenade give <player> <type> <num> : gives <num> of grenades (of <type>) to <player>."
Permissions:
- vkgrenade.admin : allows you to use /grenade give command
- vkgrenade.relload : allows you to reload config.yml file
- vkgrenade.use.<grenade_id> : allows you to use the grenade type <grenade_id> (for example, in the sample config, <grenade_id> are "grenade_small", "grenade_medium", and "grenade_large" : all lowercase of grenade types defined in the config.yml)
Installation:
Just install VKGrenade.jar in the plugin folder. Then you can either "restart the server" or "reload the plugin.
Sample Configuration:
# This is a template config file
# define your parameter and its value like:
Messages:
ErrorMsg : "&c[VKGrenade] : Some error occurred."
Cooldown: "&a[VKGrenade] You have to wait for &b%remaining% &aseconds."
CannotThrow: "&c[VKGrenade] You do not have a permission to throw %material%!. Ask an admin to give you a permission (%perm%)!"
NoPlayer: "&c[VKGrenade] Player &e%player% &c is not online!"
NoSuchGrenade: "&c[VKGrenade] No such Grenade (&e%type% &c) is available!"
GrenadeGiven: "&a[VKGrenade] %player% received %amount% grenades of type %type%!"
HelpMessages:
banner:
msg: "=== &e[&aVKGrenade Commands List (%version%)&e] &r==="
help:
msg: "&a/grenade help : displays this help menu."
reload:
msg: "&a/grenade reload : reloads config file."
permission: "vkgrenade.reload"
debug:
msg: "&a/grenade debug <true|false> : turn on / off the debug mode."
permission: "vkgrenade.debug"
give:
msg: "&a/grenade give <player> <type> <num> : gives <num> of grenade (of <type>) to <player>."
permission: "vkgrenade.admin"
list:
msg: "&a/grenade list : lists available grenade types."
# if the process of events listed below are affected by other plugin
# you can adjust the priority value (LOWEST, LOW, NORMAL, HIGH, HIGHEST, MONITOR)
# to find the right priority value for your server.
# LOWEST -> this plugin will try to process the event before anyone else.
# MONITOR-> this plugin will try to process the event after everyone processed it.
EventPriorityMap:
BlockBreakEvent: "MONITOR"
BlockExplodeEvent: "NORMAL"
EntityDamageByBlockEvent: "NORMAL"
TEBlockExplodeEvent: "MONITOR"
PlayerInteractEvent: "NORMAL"
# if this option is true, TokenEnchant's Explosion event is used instead of
# generating individual BlockBreakEvent for each exploded block.
UseTEBlockExplodeEvent: true
# the delay time to start rebuilding process
RestoreDelay: 3 #in seconds
# the rate used to rebuild exploded blocks
RestoreRate: 1 # in seconds
# whether grenade will give damage to entities or not
NoDamage: false
# whether you wish to use this grenade for mining purpose
# if it's true, other autopickup plugin can pick up exploded blocks.
UseForMining: true
# Explosion exempted blocks:
ExemptedBlocks:
- ENDER_CHEST
# in order to use each grenade, a player needs to have a use permission:
# vkgrenade.use.grenade_small, vkgrenade.use.grenade_middle,
# the level = the size of explosion. level 4 = 1 TNT
Grenades:
Grenade_Small:
item: EGG
level: 1
tick: 3
cooldown: 0
name: "&aSmall Grenade"
lore:
- "&bType: %type%"
- "&bLevel: %level%"
- "&eRight-Click to throw!"
Grenade_Middle:
item: ENDER_PEARL
level: 4
tick: 3
cooldown: 0
restore: true
Grenade_Large:
item: EYE_OF_ENDER
level: 8
tick: 5
cooldown: 0
sticky: true