Skript icon indicating copy to clipboard operation
Skript copied to clipboard

on death and on craft events only trigger once for simultaneous kills or bulk crafting

Open asmolfemboi opened this issue 6 months ago • 2 comments

Skript/Server Version

[06:55:39] [Render thread/INFO]: [System] [CHAT] ==============[ Skript+ Info ]==============
[06:55:39] [Render thread/INFO]: [System] [CHAT] Server Version: 1.21.5-113-ba7fb23 (MC: 1.21.5)
[06:55:39] [Render thread/INFO]: [System] [CHAT] [✔] Skript (2.11.2) (skriptlang-github)
[06:55:39] [Render thread/INFO]: [System] [CHAT] 
[06:55:39] [Render thread/INFO]: [System] [CHAT] Addons [12]
[06:55:39] [Render thread/INFO]: [System] [CHAT] [?] skript-yaml (1.6.1)
[06:55:39] [Render thread/INFO]: [System] [CHAT] [✔] SkCord (3.2-RELEASE)
[06:55:39] [Render thread/INFO]: [System] [CHAT] [✔] Floodgate-Skript (2.3)
[06:55:39] [Render thread/INFO]: [System] [CHAT] [✔] PlotSk (1.3.2)
[06:55:39] [Render thread/INFO]: [System] [CHAT] [✔] SkriptPlus (1.0.0)
[06:55:39] [Render thread/INFO]: [System] [CHAT] [?] SkUniversal (2.13)
[06:55:39] [Render thread/INFO]: [System] [CHAT] [✔] skript-placeholders (1.7.0)
[06:55:39] [Render thread/INFO]: [System] [CHAT] [?] SkJson (5.4)
[06:55:39] [Render thread/INFO]: [System] [CHAT] [✔] SkBee (3.11.3)
[06:55:39] [Render thread/INFO]: [System] [CHAT] [✔] DiSky (4.23.0)
[06:55:39] [Render thread/INFO]: [System] [CHAT] [?] SkQuery (4.3.2)
[06:55:39] [Render thread/INFO]: [System] [CHAT] [✔] skript-reflect (2.6)
[06:55:39] [Render thread/INFO]: [System] [CHAT] 
[06:55:39] [Render thread/INFO]: [System] [CHAT] Dependencies [3]
[06:55:39] [Render thread/INFO]: [System] [CHAT] [✔] Vault (1.7.3-b131)
[06:55:39] [Render thread/INFO]: [System] [CHAT] [?] WorldGuard (7.0.13+82fdc65)
[06:55:39] [Render thread/INFO]: [System] [CHAT] [?] GriefPrevention (16.18.4)
[06:55:39] [Render thread/INFO]: [System] [CHAT] 
[06:55:39] [Render thread/INFO]: [System] [CHAT] [Discord]   [GitHub]   [Documentation]

Bug Description

When multiple mobs are killed simultaneously (e.g., using sweeping edge or AoE skills), the on death event is only triggered once — even though multiple entities die at the same time. Similarly, when crafting multiple items at once (e.g., with Shift + Left Click), the on craft event is triggered only once and reports only a single crafted item, even if more were produced.

This leads to inaccurate tracking for kill counters, drops, achievements, or crafting-based systems relying on the event being triggered per mob/item.

Example code:

on death:
	if attacker is a player:
		if attacker is in world "Farmwelt" or "Nether" or "End":
			if attacker has permission "*":
				send "you killed a %type of victim%" to attacker

on craft:
	if oak door is type of event-item:
		if player has permission "*":
			send "you crafted a %event-item%" to player

Expected Behavior

  • on death should trigger once per entity that dies, not once per attack.
  • on craft should trigger once per crafted item, especially when shift-clicking to craft in bulk.

Steps to Reproduce

  1. Use a weapon with AoE effect (like sweeping edge) to kill multiple mobs in one hit.
  2. Observe that the on death event only fires once, despite multiple mobs dying.
  3. Create a recipe like an oak door and craft it with Shift + Left Click.
  4. Observe that only one message is sent by the on craft event, even though multiple doors were crafted.

Errors or Screenshots

nope.

Other

I don’t think on craft and on death are the only events affected — this issue may apply to other events that handle multiple entities or items at once.

Agreement

  • [x] I have read the guidelines above and affirm I am following them with this report.

asmolfemboi avatar Jun 12 '25 13:06 asmolfemboi

I cannot produce the death event issue, but I was able to produce the crafting issue. Looking at the javadocs of the craft event I am not sure if there is a way around this

erenkarakal avatar Jun 12 '25 14:06 erenkarakal

same issue here, try killing 10 rabbits in a hole for example with a chat message - only 5 of 10 rabbits

CityPvP avatar Jun 16 '25 16:06 CityPvP

I cannot replicate the death event issue either, and the crafting issue is just how the craft event works with Bukkit, we can't really get around that.

Image

sovdeeth avatar Jul 02 '25 04:07 sovdeeth

Can't reproduce

sovdeeth avatar Aug 02 '25 03:08 sovdeeth