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

Support 1.21.1 paper & spigot #11

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

rexlManu
Copy link

This pr addes support for paper & spigot 1.21.1 and closes #10

The most critical change was that the ArgumentParserSelector constructor now also wants a boolean, if at selector is applyable.

This update was a commissioned by mindofsocial

@rexlManu
Copy link
Author

If anyone needs a jar, I created a release with one: https://github.com/rexlManu/CommandHook/releases/tag/3.1.0

@colaman90
Copy link

colaman90 commented Oct 6, 2024

Thank you in advance for this Commit, i downloaded your CommandHock Version and tried it with Paper 1.21.1 Version, but i got this error on Startup:

[10:00:49 INFO]: CommandBlock at 4.863,60,-2.495 issued server command: /teleport @a[x=4837,y=67,z=-2481,dx=2,dy=5,dz=4] 4867 29 -2539 90 0 [10:00:49 ERROR]: Could not pass event ServerCommandEvent to CommandHook v3.1.0 java.lang.IllegalArgumentException: argument type mismatch at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:65) ~[?:?] at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502) ~[?:?] at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:486) ~[?:?] at CommandHook-3.1.0.jar/org.bitbucket._newage.commandhook.mapping.MojangMapping.createEntitySelectorParser(MojangMapping.java:48) ~[CommandHook-3.1.0.jar:?] at CommandHook-3.1.0.jar/org.bitbucket._newage.commandhook.mapping.MojangMapping.getArgumentParser(MojangMapping.java:96) ~[CommandHook-3.1.0.jar:?] at CommandHook-3.1.0.jar/org.bitbucket._newage.commandhook.mapping.MojangMapping.getEntitiesFromSelector(MojangMapping.java:60) ~[CommandHook-3.1.0.jar:?] at CommandHook-3.1.0.jar/org.bitbucket._newage.commandhook.CommandBlockListener.onCommandBlockDispatch(CommandBlockListener.java:39) ~[CommandHook-3.1.0.jar:?] at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor138.execute(Unknown Source) ~[?:?] at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?] at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:84) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:1.21.1-119-7cd4f2c] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?] at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[paper-1.21.1.jar:1.21.1-119-7cd4f2c] at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:131) ~[paper-1.21.1.jar:1.21.1-119-7cd4f2c] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:628) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?] at net.minecraft.commands.Commands.dispatchServerCommand(Commands.java:302) ~[paper-1.21.1.jar:1.21.1-119-7cd4f2c] at net.minecraft.world.level.BaseCommandBlock.performCommand(BaseCommandBlock.java:139) ~[paper-1.21.1.jar:1.21.1-119-7cd4f2c] at net.minecraft.world.level.block.CommandBlock.execute(CommandBlock.java:132) ~[paper-1.21.1.jar:1.21.1-119-7cd4f2c] at net.minecraft.world.level.block.CommandBlock.tick(CommandBlock.java:109) ~[paper-1.21.1.jar:1.21.1-119-7cd4f2c] at net.minecraft.world.level.block.state.BlockBehaviour$BlockStateBase.tick(BlockBehaviour.java:1222) ~[paper-1.21.1.jar:1.21.1-119-7cd4f2c] at net.minecraft.server.level.ServerLevel.tickBlock(ServerLevel.java:1192) ~[paper-1.21.1.jar:1.21.1-119-7cd4f2c] at net.minecraft.world.ticks.LevelTicks.runCollectedTicks(LevelTicks.java:192) ~[paper-1.21.1.jar:1.21.1-119-7cd4f2c] at net.minecraft.world.ticks.LevelTicks.tick(LevelTicks.java:89) ~[paper-1.21.1.jar:1.21.1-119-7cd4f2c] at net.minecraft.server.level.ServerLevel.tick(ServerLevel.java:673) ~[paper-1.21.1.jar:1.21.1-119-7cd4f2c] at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1804) ~[paper-1.21.1.jar:1.21.1-119-7cd4f2c] at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:473) ~[paper-1.21.1.jar:1.21.1-119-7cd4f2c] at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1596) ~[paper-1.21.1.jar:1.21.1-119-7cd4f2c] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1302) ~[paper-1.21.1.jar:1.21.1-119-7cd4f2c] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:329) ~[paper-1.21.1.jar:1.21.1-119-7cd4f2c] at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?] Caused by: java.lang.ClassCastException: class [Ljava.lang.Object; cannot be cast to class java.lang.Number ([Ljava.lang.Object; and java.lang.Number are in module java.base of loader 'bootstrap') at java.base/sun.invoke.util.ValueConversions.primitiveConversion(ValueConversions.java:247) ~[?:?] at java.base/sun.invoke.util.ValueConversions.unboxBoolean(ValueConversions.java:108) ~[?:?] at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62) ~[?:?] ... 28 more

Can you help to fix this ? :)
Kind regards
Cola

@Waterman1001
Copy link

For me, this latest version also does not seem to work unfortunately

@rexlManu
Copy link
Author

I will look into why it doesn't work

@seema84
Copy link

seema84 commented Nov 26, 2024

the problem still exists

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1.21.1 Paper support
4 participants