Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detecting armor doesnt work #7524

Closed
1 task done
Imnahha opened this issue Jan 25, 2025 · 1 comment
Closed
1 task done

Detecting armor doesnt work #7524

Imnahha opened this issue Jan 25, 2025 · 1 comment
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. completed The issue has been fully resolved and the change will be in the next Skript update. patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version.

Comments

@Imnahha
Copy link

Imnahha commented Jan 25, 2025

Skript/Server Version

[03:53:34 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[03:53:34 INFO]: [Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
[03:53:34 INFO]: [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[03:53:34 INFO]: [Skript] Server Version: 1.21.1-131-84281ce (MC: 1.21.1)
[03:53:34 INFO]: [Skript] Skript Version: 2.10.0 (skriptlang-github)
[03:53:34 INFO]: [Skript] Installed Skript Addons: None
[03:53:34 INFO]: [Skript] Installed dependencies: 
[03:53:34 INFO]: [Skript]  - Vault v1.7.3-b131
[03:53:34 INFO]: [Skript]  - WorldGuard v7.0.11-beta1+a801a9d
[03:53:34 INFO]: [Skript]  - GriefPrevention v16.18.4

Bug Description

when I put try to detect if a player has an armor piece, it gives an error in console and doesnt work. I tried uninstalling all the plugins suggested in the error below and still didnt work.

Expected Behavior

should have detected armor piece.

Steps to Reproduce

on step on tinted glass:
player is wearing diamond chestplate
apply potion of wither of tier 1 to player for 15 seconds

create that Skript using the same Skript dependencies and Skript version and minecraft server version that I did, and it should not work when you step on tinted glass and wear a diamond chest plate.

Errors or Screenshots

03:55:57 ERROR: #!#! [Skript] Severe Error:
03:55:57 ERROR: #!#!
03:55:57 ERROR: #!#! An unexpected error occurred with Skript. This issue is likely not your fault.
03:55:57 ERROR: #!#! You are using some plugins that alter how Skript works (addons).
03:55:57 ERROR: #!#! Full list of addons:
03:55:57 ERROR: #!#! DiscordSRV v1.28.0-SNAPSHOT (https://github.com/DiscordSRV/DiscordSRV)
03:55:57 ERROR: #!#! Graves v4.9.6
03:55:57 ERROR: #!#! We could not identify related addons, it might also be a Skript issue.
03:55:57 ERROR: #!#! Try temporarily removing the listed plugins one by one to identify the cause.
03:55:57 ERROR: #!#! If removing a plugin resolves the issue, please report the problem to the plugin developer.
03:55:57 ERROR: #!#!
03:55:57 ERROR: #!#! Stack trace:
03:55:57 ERROR: #!#! Caused by: java.lang.IllegalArgumentException: BODY is not valid for players!
03:55:57 ERROR: #!#! at org.bukkit.craftbukkit.inventory.CraftInventoryPlayer.getItem(CraftInventoryPlayer.java:176)
03:55:57 ERROR: #!#! at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
03:55:57 ERROR: #!#! at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:1024)
03:55:57 ERROR: #!#! at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
03:55:57 ERROR: #!#! at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
03:55:57 ERROR: #!#! at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:575)
03:55:57 ERROR: #!#! at java.base/java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:260)
03:55:57 ERROR: #!#! at java.base/java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:616)
03:55:57 ERROR: #!#! at Skript-2.10.0.jar//ch.njol.skript.conditions.CondIsWearing.lambda$check$2(CondIsWearing.java:63)
03:55:57 ERROR: #!#! at Skript-2.10.0.jar//ch.njol.skript.lang.util.SimpleExpression.check(SimpleExpression.java:148)
03:55:57 ERROR: #!#! at Skript-2.10.0.jar//ch.njol.skript.lang.util.SimpleExpression.check(SimpleExpression.java:136)
03:55:57 ERROR: #!#! at Skript-2.10.0.jar//ch.njol.skript.conditions.CondIsWearing.check(CondIsWearing.java:56)
03:55:57 ERROR: #!#! at Skript-2.10.0.jar//ch.njol.skript.lang.Condition.run(Condition.java:83)
03:55:57 ERROR: #!#! at Skript-2.10.0.jar//ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:40)
03:55:57 ERROR: #!#! at Skript-2.10.0.jar//ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:67)
03:55:57 ERROR: #!#! at Skript-2.10.0.jar//ch.njol.skript.lang.Trigger.execute(Trigger.java:33)
03:55:57 ERROR: #!#! at Skript-2.10.0.jar//ch.njol.skript.events.EvtMoveOn.lambda$static$0(EvtMoveOn.java:82)
03:55:57 ERROR: #!#! at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:84)
03:55:57 ERROR: #!#! at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70)
03:55:57 ERROR: #!#! at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54)
03:55:57 ERROR: #!#! at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:131)
03:55:57 ERROR: #!#! at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:628)
03:55:57 ERROR: #!#! at net.minecraft.server.network.ServerGamePacketListenerImpl.handleMovePlayer(ServerGamePacketListenerImpl.java:1561)
03:55:57 ERROR: #!#! at net.minecraft.network.protocol.game.ServerboundMovePlayerPacket.handle(ServerboundMovePlayerPacket.java:34)
03:55:57 ERROR: #!#! at net.minecraft.network.protocol.game.ServerboundMovePlayerPacket$Pos.handle(ServerboundMovePlayerPacket.java:75)
03:55:57 ERROR: #!#! at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:56)
03:55:57 ERROR: #!#! at net.minecraft.server.TickTask.run(TickTask.java:18)
03:55:57 ERROR: #!#! at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:151)
03:55:57 ERROR: #!#! at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24)
03:55:57 ERROR: #!#! at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1535)
03:55:57 ERROR: #!#! at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:201)
03:55:57 ERROR: #!#! at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:125)
03:55:57 ERROR: #!#! at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1512)
03:55:57 ERROR: #!#! at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1505)
03:55:57 ERROR: #!#! at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:135)
03:55:57 ERROR: #!#! at net.minecraft.server.MinecraftServer.managedBlock(MinecraftServer.java:1464)
03:55:57 ERROR: #!#! at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1471)
03:55:57 ERROR: #!#! at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1316)
03:55:57 ERROR: #!#! at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:329)
03:55:57 ERROR: #!#! at java.base/java.lang.Thread.run(Thread.java:1583)
03:55:57 ERROR: #!#!
03:55:57 ERROR: #!#! Skript: 2.10.0 (latest)
03:55:57 ERROR: #!#! Flavor: skriptlang-github
03:55:57 ERROR: #!#! Date: 17:18:40.825111800
03:55:57 ERROR: #!#! Bukkit: 1.21.1-R0.1-SNAPSHOT
03:55:57 ERROR: #!#! Minecraft: 1.21.1
03:55:57 ERROR: #!#! Java: 21.0.3 (OpenJDK 64-Bit Server VM 21.0.3+9-LTS)
03:55:57 ERROR: #!#! OS: Linux amd64 5.10.0-10-amd64
03:55:57 ERROR: #!#!
03:55:57 ERROR: #!#! Server platform: Paper
03:55:57 ERROR: #!#!
03:55:57 ERROR: #!#! Current node: null
03:55:57 ERROR: #!#! Current item: the player is wearing [[itemtype:diamond chestplate]]
03:55:57 ERROR: #!#! Current trigger: step on tinted glass (walk on tinted glass) (oil_features.sk, line 1)
03:55:57 ERROR: #!#! Thread: Server thread
03:55:57 ERROR: #!#! Language: english
03:55:57 ERROR: #!#! Link parse mode: DISABLED
03:55:57 ERROR: #!#! End of Error.
03:55:57 ERROR: #!#!

Other

No response

Agreement

  • I have read the guidelines above and affirm I am following them with this report.
@sovdeeth sovdeeth added the bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. label Jan 25, 2025
@sovdeeth
Copy link
Member

CondIsWearing Line 61 runs through all EquipmentSlot values. Should be limited based on player/entity input.

@sovdeeth sovdeeth added the PR available Issues which have a yet-to-be merged PR resolving it label Jan 25, 2025
@APickledWalrus APickledWalrus added completed The issue has been fully resolved and the change will be in the next Skript update. patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version. and removed PR available Issues which have a yet-to-be merged PR resolving it labels Feb 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. completed The issue has been fully resolved and the change will be in the next Skript update. patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version.
Projects
None yet
Development

No branches or pull requests

3 participants