Skript

Skript

743k Downloads

ExprName does not work with inventories

wd4q5dy opened this issue ยท 3 comments

commented

Skript/Server Version

[00:46:42 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[00:46:42 INFO]: [Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
[00:46:42 INFO]: [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[00:46:42 INFO]: [Skript] Server Version: 1.20.6-135-79c1ce1 (MC: 1.20.6)
[00:46:42 INFO]: [Skript] Skript Version: 2.9.0-pre1 (skriptlang-github)
[00:46:42 INFO]: [Skript] Installed Skript Addons: 
[00:46:42 INFO]: [Skript]  - skript-placeholders v1.6.0 (https://github.com/APickledWalrus/skript-placeholders)
[00:46:42 INFO]: [Skript]  - skript-reflect v2.4 (https://github.com/SkriptLang/skript-reflect)
[00:46:42 INFO]: [Skript]  - SkBee v3.5.6 (https://github.com/ShaneBeee/SkBee)
[00:46:42 INFO]: [Skript] Installed dependencies: 
[00:46:42 INFO]: [Skript]  - Vault v1.7.3-b131
[00:46:42 INFO]: [Skript]  - WorldGuard v7.0.10+d9424b1

Bug Description

The on inventory click event throws an error

Expected Behavior

The on inventory click event should work

Steps to Reproduce

A simple script like:

on inventory click:
	send "hi" to player

Errors or Screenshots

[00:47:36 ERROR]: Could not pass event InventoryClickEvent to Skript v2.9.0-pre1
java.lang.IncompatibleClassChangeError: Found class org.bukkit.inventory.InventoryView, but interface was expected
	at Skript-2.9.0-pre1.jar/ch.njol.skript.expressions.ExprName.convert(ExprName.java:185) ~[Skript-2.9.0-pre1.jar:?]
	at Skript-2.9.0-pre1.jar/ch.njol.skript.expressions.ExprName.convert(ExprName.java:69) ~[Skript-2.9.0-pre1.jar:?]
	at Skript-2.9.0-pre1.jar/org.skriptlang.skript.lang.converter.Converters.convert(Converters.java:501) ~[Skript-2.9.0-pre1.jar:?]
	at Skript-2.9.0-pre1.jar/org.skriptlang.skript.lang.converter.Converters.convertUnsafe(Converters.java:565) ~[Skript-2.9.0-pre1.jar:?]
	at Skript-2.9.0-pre1.jar/ch.njol.skript.registrations.Converters.convertUnsafe(Converters.java:203) ~[Skript-2.9.0-pre1.jar:?]
	at Skript-2.9.0-pre1.jar/ch.njol.skript.expressions.base.PropertyExpression.get(PropertyExpression.java:119) ~[Skript-2.9.0-pre1.jar:?]
	at Skript-2.9.0-pre1.jar/ch.njol.skript.expressions.base.SimplePropertyExpression.get(SimplePropertyExpression.java:56) ~[Skript-2.9.0-pre1.jar:?]
	at Skript-2.9.0-pre1.jar/ch.njol.skript.expressions.base.PropertyExpression.getAll(PropertyExpression.java:93) ~[Skript-2.9.0-pre1.jar:?]
	at Skript-2.9.0-pre1.jar/ch.njol.skript.conditions.CondMatches.check(CondMatches.java:74) ~[Skript-2.9.0-pre1.jar:?]
	at Skript-2.9.0-pre1.jar/ch.njol.skript.sections.SecConditional.lambda$checkConditions$1(SecConditional.java:380) ~[Skript-2.9.0-pre1.jar:?]
	at java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90) ~[?:?]
	at java.base/java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1685) ~[?:?]
	at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129) ~[?:?]
	at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527) ~[?:?]
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513) ~[?:?]
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?]
	at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230) ~[?:?]
	at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196) ~[?:?]
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
	at java.base/java.util.stream.ReferencePipeline.allMatch(ReferencePipeline.java:637) ~[?:?]
	at Skript-2.9.0-pre1.jar/ch.njol.skript.sections.SecConditional.checkConditions(SecConditional.java:380) ~[Skript-2.9.0-pre1.jar:?]
	at Skript-2.9.0-pre1.jar/ch.njol.skript.sections.SecConditional.walk(SecConditional.java:282) ~[Skript-2.9.0-pre1.jar:?]
	at Skript-2.9.0-pre1.jar/ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:88) ~[Skript-2.9.0-pre1.jar:?]
	at Skript-2.9.0-pre1.jar/ch.njol.skript.lang.Trigger.execute(Trigger.java:52) ~[Skript-2.9.0-pre1.jar:?]
	at Skript-2.9.0-pre1.jar/ch.njol.skript.SkriptEventHandler.lambda$execute$2(SkriptEventHandler.java:183) ~[Skript-2.9.0-pre1.jar:?]
	at Skript-2.9.0-pre1.jar/ch.njol.skript.SkriptEventHandler.lambda$execute$3(SkriptEventHandler.java:194) ~[Skript-2.9.0-pre1.jar:?]
	at Skript-2.9.0-pre1.jar/ch.njol.skript.util.Task.callSync(Task.java:164) ~[Skript-2.9.0-pre1.jar:?]
	at Skript-2.9.0-pre1.jar/ch.njol.skript.util.Task.callSync(Task.java:148) ~[Skript-2.9.0-pre1.jar:?]
	at Skript-2.9.0-pre1.jar/ch.njol.skript.SkriptEventHandler.execute(SkriptEventHandler.java:192) ~[Skript-2.9.0-pre1.jar:?]
	at Skript-2.9.0-pre1.jar/ch.njol.skript.SkriptEventHandler.check(SkriptEventHandler.java:138) ~[Skript-2.9.0-pre1.jar:?]
	at Skript-2.9.0-pre1.jar/ch.njol.skript.SkriptEventHandler$PriorityListener.lambda$new$0(SkriptEventHandler.java:64) ~[Skript-2.9.0-pre1.jar:?]
	at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:81) ~[paper-api-1.20.6-R0.1-SNAPSHOT.jar:1.20.6-135-79c1ce1]
	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-api-1.20.6-R0.1-SNAPSHOT.jar:?]
	at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[paper-1.20.6.jar:1.20.6-135-79c1ce1]
	at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:131) ~[paper-1.20.6.jar:1.20.6-135-79c1ce1]
	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:627) ~[paper-api-1.20.6-R0.1-SNAPSHOT.jar:?]
	at net.minecraft.server.network.ServerGamePacketListenerImpl.handleContainerClick(ServerGamePacketListenerImpl.java:3177) ~[paper-1.20.6.jar:1.20.6-135-79c1ce1]
	at net.minecraft.network.protocol.game.ServerboundContainerClickPacket.handle(ServerboundContainerClickPacket.java:69) ~[paper-1.20.6.jar:1.20.6-135-79c1ce1]
	at net.minecraft.network.protocol.game.ServerboundContainerClickPacket.handle(ServerboundContainerClickPacket.java:33) ~[paper-1.20.6.jar:1.20.6-135-79c1ce1]
	at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:55) ~[paper-1.20.6.jar:1.20.6-135-79c1ce1]
	at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.20.6.jar:1.20.6-135-79c1ce1]
	at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:151) ~[paper-1.20.6.jar:1.20.6-135-79c1ce1]
	at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[paper-1.20.6.jar:1.20.6-135-79c1ce1]
	at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1511) ~[paper-1.20.6.jar:1.20.6-135-79c1ce1]
	at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:195) ~[paper-1.20.6.jar:1.20.6-135-79c1ce1]
	at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:125) ~[paper-1.20.6.jar:1.20.6-135-79c1ce1]
	at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1488) ~[paper-1.20.6.jar:1.20.6-135-79c1ce1]
	at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1411) ~[paper-1.20.6.jar:1.20.6-135-79c1ce1]
	at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:135) ~[paper-1.20.6.jar:1.20.6-135-79c1ce1]
	at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1377) ~[paper-1.20.6.jar:1.20.6-135-79c1ce1]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1238) ~[paper-1.20.6.jar:1.20.6-135-79c1ce1]
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:323) ~[paper-1.20.6.jar:1.20.6-135-79c1ce1]
	at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]

Other

No response

Agreement

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

Join the Skript Testing Server and go to the channel called 2.9.0-beta1 and try that skript-reflect version

commented
[00:58:42 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[00:58:42 INFO]: [Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
[00:58:42 INFO]: [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[00:58:42 INFO]: [Skript] Server Version: 1.20.6-135-79c1ce1 (MC: 1.20.6)
[00:58:42 INFO]: [Skript] Skript Version: 2.9.0-pre1 (skriptlang-github)
[00:58:42 INFO]: [Skript] Installed Skript Addons: 
[00:58:42 INFO]: [Skript]  - skript-placeholders v1.6.0 (https://github.com/APickledWalrus/skript-placeholders)
[00:58:42 INFO]: [Skript]  - skript-reflect v2.4-for-2.9-beta (https://github.com/SkriptLang/skript-reflect)
[00:58:42 INFO]: [Skript]  - SkBee v3.5.6 (https://github.com/ShaneBeee/SkBee)
[00:58:42 INFO]: [Skript] Installed dependencies: 
[00:58:42 INFO]: [Skript]  - Vault v1.7.3-b131
[00:58:42 INFO]: [Skript]  - WorldGuard v7.0.10+d9424b1
[00:59:46 ERROR]: Could not pass event InventoryClickEvent to Skript v2.9.0-pre1
java.lang.IncompatibleClassChangeError: Found class org.bukkit.inventory.InventoryView, but interface was expected
	at Skript-2.9.0-pre1.jar/ch.njol.skript.expressions.ExprName.convert(ExprName.java:185) ~[Skript-2.9.0-pre1.jar:?]
	at Skript-2.9.0-pre1.jar/ch.njol.skript.expressions.ExprName.convert(ExprName.java:69) ~[Skript-2.9.0-pre1.jar:?]
	at Skript-2.9.0-pre1.jar/org.skriptlang.skript.lang.converter.Converters.convert(Converters.java:501) ~[Skript-2.9.0-pre1.jar:?]
	at Skript-2.9.0-pre1.jar/org.skriptlang.skript.lang.converter.Converters.convertUnsafe(Converters.java:565) ~[Skript-2.9.0-pre1.jar:?]
	at Skript-2.9.0-pre1.jar/ch.njol.skript.registrations.Converters.convertUnsafe(Converters.java:203) ~[Skript-2.9.0-pre1.jar:?]
	at Skript-2.9.0-pre1.jar/ch.njol.skript.expressions.base.PropertyExpression.get(PropertyExpression.java:119) ~[Skript-2.9.0-pre1.jar:?]
	at Skript-2.9.0-pre1.jar/ch.njol.skript.expressions.base.SimplePropertyExpression.get(SimplePropertyExpression.java:56) ~[Skript-2.9.0-pre1.jar:?]
	at Skript-2.9.0-pre1.jar/ch.njol.skript.expressions.base.PropertyExpression.getAll(PropertyExpression.java:93) ~[Skript-2.9.0-pre1.jar:?]
	at Skript-2.9.0-pre1.jar/ch.njol.skript.conditions.CondMatches.check(CondMatches.java:74) ~[Skript-2.9.0-pre1.jar:?]
	at Skript-2.9.0-pre1.jar/ch.njol.skript.sections.SecConditional.lambda$checkConditions$1(SecConditional.java:380) ~[Skript-2.9.0-pre1.jar:?]
	at java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90) ~[?:?]
	at java.base/java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1685) ~[?:?]
	at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129) ~[?:?]
	at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527) ~[?:?]
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513) ~[?:?]
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?]
	at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230) ~[?:?]
	at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196) ~[?:?]
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
	at java.base/java.util.stream.ReferencePipeline.allMatch(ReferencePipeline.java:637) ~[?:?]
	at Skript-2.9.0-pre1.jar/ch.njol.skript.sections.SecConditional.checkConditions(SecConditional.java:380) ~[Skript-2.9.0-pre1.jar:?]
	at Skript-2.9.0-pre1.jar/ch.njol.skript.sections.SecConditional.walk(SecConditional.java:282) ~[Skript-2.9.0-pre1.jar:?]
	at Skript-2.9.0-pre1.jar/ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:88) ~[Skript-2.9.0-pre1.jar:?]
	at Skript-2.9.0-pre1.jar/ch.njol.skript.lang.Trigger.execute(Trigger.java:52) ~[Skript-2.9.0-pre1.jar:?]
	at Skript-2.9.0-pre1.jar/ch.njol.skript.SkriptEventHandler.lambda$execute$2(SkriptEventHandler.java:183) ~[Skript-2.9.0-pre1.jar:?]
	at Skript-2.9.0-pre1.jar/ch.njol.skript.SkriptEventHandler.lambda$execute$3(SkriptEventHandler.java:194) ~[Skript-2.9.0-pre1.jar:?]
	at Skript-2.9.0-pre1.jar/ch.njol.skript.util.Task.callSync(Task.java:164) ~[Skript-2.9.0-pre1.jar:?]
	at Skript-2.9.0-pre1.jar/ch.njol.skript.util.Task.callSync(Task.java:148) ~[Skript-2.9.0-pre1.jar:?]
	at Skript-2.9.0-pre1.jar/ch.njol.skript.SkriptEventHandler.execute(SkriptEventHandler.java:192) ~[Skript-2.9.0-pre1.jar:?]
	at Skript-2.9.0-pre1.jar/ch.njol.skript.SkriptEventHandler.check(SkriptEventHandler.java:138) ~[Skript-2.9.0-pre1.jar:?]
	at Skript-2.9.0-pre1.jar/ch.njol.skript.SkriptEventHandler$PriorityListener.lambda$new$0(SkriptEventHandler.java:64) ~[Skript-2.9.0-pre1.jar:?]
	at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:81) ~[paper-api-1.20.6-R0.1-SNAPSHOT.jar:1.20.6-135-79c1ce1]
	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-api-1.20.6-R0.1-SNAPSHOT.jar:?]
	at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[paper-1.20.6.jar:1.20.6-135-79c1ce1]
	at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:131) ~[paper-1.20.6.jar:1.20.6-135-79c1ce1]
	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:627) ~[paper-api-1.20.6-R0.1-SNAPSHOT.jar:?]
	at net.minecraft.server.network.ServerGamePacketListenerImpl.handleContainerClick(ServerGamePacketListenerImpl.java:3177) ~[paper-1.20.6.jar:1.20.6-135-79c1ce1]
	at net.minecraft.network.protocol.game.ServerboundContainerClickPacket.handle(ServerboundContainerClickPacket.java:69) ~[paper-1.20.6.jar:1.20.6-135-79c1ce1]
	at net.minecraft.network.protocol.game.ServerboundContainerClickPacket.handle(ServerboundContainerClickPacket.java:33) ~[paper-1.20.6.jar:1.20.6-135-79c1ce1]
	at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:55) ~[paper-1.20.6.jar:1.20.6-135-79c1ce1]
	at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.20.6.jar:1.20.6-135-79c1ce1]
	at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:151) ~[paper-1.20.6.jar:1.20.6-135-79c1ce1]
	at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[paper-1.20.6.jar:1.20.6-135-79c1ce1]
	at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1511) ~[paper-1.20.6.jar:1.20.6-135-79c1ce1]
	at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:195) ~[paper-1.20.6.jar:1.20.6-135-79c1ce1]
	at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:125) ~[paper-1.20.6.jar:1.20.6-135-79c1ce1]
	at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1488) ~[paper-1.20.6.jar:1.20.6-135-79c1ce1]
	at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1411) ~[paper-1.20.6.jar:1.20.6-135-79c1ce1]
	at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:135) ~[paper-1.20.6.jar:1.20.6-135-79c1ce1]
	at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1377) ~[paper-1.20.6.jar:1.20.6-135-79c1ce1]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1238) ~[paper-1.20.6.jar:1.20.6-135-79c1ce1]
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:323) ~[paper-1.20.6.jar:1.20.6-135-79c1ce1]
	at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
commented

Didn't even notice this issue, but I did open a fix at #6874. Thanks for the report.