Skip to content

Can't use certain items with "if player's tool is" or "if player's offhand tool is" #5022

Description

@Zaphara94

Skript/Server Version

[09:45:31 INFO]: Skript version 2.6.3
[09:45:31 INFO]: Customize Minecraft's mechanics with simple scripts written in plain English sentences.
[09:45:31 INFO]: Website: https://skriptlang.github.io/Skript
[09:45:31 INFO]: Authors: Njol, Mirreski, SkriptLang Team and Contributors
[09:46:37 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[09:46:37 INFO]: [Skript] Skript's documentation can be found here: https://skriptlang.github.io/Skript
[09:46:37 INFO]: [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[09:46:37 INFO]: [Skript] Server Version: git-Paper-118 (MC: 1.19.2)
[09:46:37 INFO]: [Skript] Skript Version: 2.6.3
[09:46:37 INFO]: [Skript] Installed Skript Addons: 
[09:46:37 INFO]: [Skript]  - skript-placeholders v1.5.2 (https://github.com/APickledWalrus/skript-placeholders)
[09:46:37 INFO]: [Skript]  - skRayFall v1.9.28 (https://sk.rayfall.net/)
[09:46:37 INFO]: [Skript]  - SkBee v1.17.3 (https://github.com/ShaneBeee/SkBee)
[09:46:37 INFO]: [Skript]  - WolvSK v1.7.2
[09:46:37 INFO]: [Skript] Installed dependencies: 
[09:46:37 INFO]: [Skript]  - Vault v1.7.3-b131
[09:46:37 INFO]: [Skript]  - WorldGuard v7.0.8-beta-01+cbb2ba7

Bug Description

on place of beacon:
	if off hand item is lingering potion or sponge or dragon head or totem:
		set {_beacon.player} to nbt of off hand item
		if off hand item is sponge:
			set {_nbt.beacon.player} to "{Levels:1,Primary:4}"
		else if off hand item is totem of undying:
			set {_nbt.beacon.player} to "{Levels:1,Primary:31}"
		else if off hand item is dragon head:
			set {_nbt.beacon.player} to "{Levels:1,Primary:32}"

on right click:
	if player's target is horse:
		if player's tool is end rod:
			set {_horse.%player%.nbt} to nbt of player's target

These two sections of code, which used to work before, now fail and disable the scripts that they were a part of with the error "Line 188: (SilkSpawners.sk)
Can't compare a slot with particle
Line: else if off hand item is totem of undying:"

So far, these are the only two items that have this issue, and we have disabled a few scripts, and sections of other scripts, to initialize all our scripts.

Expected Behavior

The scripts were supposed to initialize without error, and allow us to check what items a player is holding for certain things.

Steps to Reproduce

This happens no matter which alias I use for the items in question, they keep saying that the item is a particle.

Errors or Screenshots

No response

Other

No response

Agreement

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    addon-relatedAn issue that is related to an addon and not Skript.waiting for replyThe report needs a response from the reporter to determine course of action.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions