Items and grenades

ScreenFX items are in items.yml. Give them with /sfx item give <item> [players] [amount] or take them from /sfx → Items (click = one, shift click = a stack). They work together: the bandage stops bleeding, the antidote cures the infection, the gas mask protects from gas, sunglasses from flashbangs.
The 52 items
| Kind | Items |
|---|---|
| Grenades (throw) | flashbang_grenade, smoke_grenade, toxic_gas_grenade, tear_gas_grenade, molotov, stun_grenade, freeze_grenade, emp_grenade, frag_grenade, red_smoke, blue_smoke, sleeping_gas, laughing_gas, hallucinogen_gas, dust_bomb, blizzard_grenade, flare (everyone close glows through walls), holy_water, nightmare_dust, healing_splash, party_popper |
| Arrows (shoot) | smoke_arrow |
| Medical and drinks (use) | bandage, medkit (stop bleeding), antidote (cures the infection and poison), painkillers, adrenaline_shot, energy_drink, iodine_pills (5 minutes of radiation protection), strong_drink, love_potion, blessing_charm (lifts curses), invisibility_cloak |
| Gear (wear) | night_vision_goggles, thermal_goggles, gas_mask, hazmat_suit, sunglasses (no flashbang can blind you), space_helmet |
| Tools (hold, aim, using) | flashlight, detective_lens, scanner (hold); binoculars, sniper_rifle (aim); energy_shield, hunters_bow (using) |
| Weapons (hit) | taser, handcuffs, cursed_blade, poison_dagger, frost_blade, serrated_knife: the one hit gets it |
How an item starts
action | |
|---|---|
throw | where the thrown or shot item lands (snowball, egg, splash potion, wind charge, ender pearl, arrow...) |
use | right click with the item in hand |
hit | hitting a player or mob with the item: the one hit gets it |
hold | while the item is held in the main hand |
aim | while held in the main hand and the player sneaks (or holds right click, with use-animation) |
using | while right click is held: a shield up, a bow drawn, a spyglass |
wear | while the item is worn (helmet, chestplate...) |
Options
my_item:
material: SNOWBALL
name: "<white>Name" # MiniMessage, & codes, hex
lore: ["&7Line"]
glow: false
color: "#FF8800" # leather armor and potions
item-model: minecraft:spyglass # looks like another item (also of your own resource pack)
custom-model-data: 0
use-animation: spyglass # right click holds it up: spyglass, bow, crossbow, block, spear, eat, drink, toot_horn, brush
action: throw
preset: flashbang # hold, aim, using, wear: while it lasts; the others: once
duration: 30s # use, throw, hit: how long the preset plays
potions: ["speed 10s 2"] # held and worn items keep them while held or worn
stops: [bleeding] # presets it stops
commands: ["eco give {player} 5"] # console commands: {player}, {uuid}, {thrower}
protection-time: 5m # use, throw: counts as wearing this item for that long
protected-by: [sunglasses] # players protected by one of these get nothing from this item
radius: 8 # throw: players within this many blocks
facing: true # throw: only players looking toward the impact (a flash)
self: true # throw: the thrower gets it too
harmful: true # throw: reaches other players only where they can fight
consume: true # use (default true), hit (default false): one item is used up
cooldown: 3s # the same player can use it again after this (shown in the hotbar)
permission: "" # needed to use it
protected-by takes items of items.yml (worn if they are wear items, held otherwise), materials, potion:<effect> and items of other plugins (nexo:<id>...).
Clouds
A thrown item can leave a cloud where it lands. The preset plays while a player is inside.
cloud:
radius: 4
time: 10s
particle: DUST # DUST uses color and size
color: "#9ACD32"
size: 3
amount: 50 # particles every quarter of a second
potions: ["poison 3s"] # given every second to the ones inside
burn: 4s # sets the ones inside on fire
mobs: true # potions and fire reach mobs too
protected-by: [gas_mask, hazmat_suit]
sound: entity.splash_potion.break # where it lands
layers: # more particles: smoke rising over the cloud
- {particle: large_smoke, amount: 3, speed: 0.005}
loop-sound: block.fire.extinguish # every second inside the cloud
Clouds are capped on the whole server (safety.max-clouds); an item landing in a cloud of the same item renews it instead of adding one.
Impact
What happens where a thrown item lands (items with a cloud: nothing by default).
impact:
explosion: big # none, small or big: only to see, no block breaks and nobody is hurt
sound: entity.generic.explode
shake: 4 # cameras around shake, less the farther they are
Fair play
- Harmful thrown items reach other players only where they can fight: PvP on in the world and allowed by WorldGuard. A grenade thrown out of a place without PvP never hurts other players.
- Mobs: monsters always; tamed pets never; animals and villagers only where WorldGuard lets the thrower hurt them. Items fired by a dispenser leave animals of a region alone, unless the region allows it.
- A dispenser firing nonstop can't flash a player more than twice a second.
- ScreenFX items are never placed as blocks, used in crafting or brewing, or burnt as fuel.
Items of other plugins
match: nexo:gas_mask makes an item of another plugin do it (oraxen:<id>, itemsadder:<namespace>:<id>, craftengine:<namespace>:<id>). /sfx item give gives that item when the plugin allows it (Nexo, Oraxen, ItemsAdder), or use its own command.
Last updated