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

NMS-related error when using ParticleArgument class #383

Closed
CubBossa opened this issue Dec 18, 2022 · 2 comments
Closed

NMS-related error when using ParticleArgument class #383

CubBossa opened this issue Dec 18, 2022 · 2 comments
Labels
bug Something isn't working implemented for next release This has been implemented in the current dev build for the next public release

Comments

@CubBossa
Copy link

CubBossa commented Dec 18, 2022

CommandAPI version

8.7.0

Minecraft version

1.19.3

Are you shading the CommandAPI?

Yes

What I did

  • I initialized the API
		CommandAPI.onLoad(new CommandAPIConfig()
				.verboseOutput(configuration.isVerbose())
				.useLatestNMSVersion(true)
				.initializeNBTAPI(NBTContainer.class, NBTContainer::new));
  • I used a ParticleArtgument in a CommandTree
return super.appendEditCommand(tree, visualizerIndex, argumentOffset)
				.then(new LiteralArgument("particle")
						.then(new ParticleArgument("particle")
								.executes((commandSender, objects) -> {
									ParticleVisualizer visualizer = (ParticleVisualizer) objects[visualizerIndex];
									onSetParticle(commandSender, visualizer, (ParticleData) objects[argumentOffset], null, null, null);
								})
  • I built the plugin as usually with maven and started the server

What actually happened

An error occured when loading the plugin. This did not happen before while the code did not change.

[21:42:26 INFO]: [CommandAPI] Chat preview is not available
[21:42:26 ERROR]: Error occurred while enabling PathFinder v1.5.2 (Is it up to date?)                                                                                                                          java.lang.NoSuchMethodError: 'net.minecraft.commands.arguments.ArgumentParticle net.minecraft.commands.arguments.ArgumentParticle.a()'                                                                                 at de.cubbossa.pathfinder.commandapi.nms.NMS_Common._ArgumentParticle(NMS_Common.java:254) ~[?:?]                
at de.cubbossa.pathfinder.commandapi.arguments.ParticleArgument.<init>(ParticleArgument.java:41) ~[?:?]          
at de.cubbossa.pathfinder.module.visualizing.visualizer.ParticleVisualizerType.appendEditCommand(ParticleVisualizerType.java:49) ~[?:?]
at de.cubbossa.pathfinder.module.visualizing.command.PathVisualizerCommand.register(PathVisualizerCommand.java:76) ~[?:?] 
at de.cubbossa.pathfinder.PathPlugin.onEnable(PathPlugin.java:243) ~[?:?]                                        
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[paper-api-1.19.3-R0.1-SNAPSHOT.jar:?]     
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:371) ~[paper-api-1.19.3-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:544) ~[paper-api-1.19.3-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_19_R2.CraftServer.enablePlugin(CraftServer.java:578) ~[paper-1.19.3.jar:git-Paper-345]       
at org.bukkit.craftbukkit.v1_19_R2.CraftServer.enablePlugins(CraftServer.java:492) ~[paper-1.19.3.jar:git-Paper-345]      
at org.bukkit.craftbukkit.v1_19_R2.CraftServer.reload(CraftServer.java:1038) ~[paper-1.19.3.jar:git-Paper-345]   
at org.bukkit.Bukkit.reload(Bukkit.java:930) ~[paper-api-1.19.3-R0.1-SNAPSHOT.jar:?]                             
at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:54) ~[paper-api-1.19.3-R0.1-SNAPSHOT.jar:?]       
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:155) ~[paper-api-1.19.3-R0.1-SNAPSHOT.jar:?]        
at org.bukkit.craftbukkit.v1_19_R2.CraftServer.dispatchCommand(CraftServer.java:929) ~[paper-1.19.3.jar:git-Paper-345]    
at org.bukkit.craftbukkit.v1_19_R2.CraftServer.dispatchServerCommand(CraftServer.java:892) ~[paper-1.19.3.jar:git-Paper-345]
at net.minecraft.server.dedicated.DedicatedServer.bg(DedicatedServer.java:494) ~[paper-1.19.3.jar:git-Paper-345] 
at net.minecraft.server.dedicated.DedicatedServer.b(DedicatedServer.java:441) ~[paper-1.19.3.jar:git-Paper-345]  
at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1397) ~[paper-1.19.3.jar:git-Paper-345]           
at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1173) ~[paper-1.19.3.jar:git-Paper-345]           
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:316) ~[paper-1.19.3.jar:git-Paper-345]
at java.lang.Thread.run(Thread.java:833) ~[?:?]

What should have happened

Plugin load as usual

Server logs and CommandAPI config

No response

Other

No response

@CubBossa CubBossa added the bug Something isn't working label Dec 18, 2022
@JorelAli
Copy link
Owner

NMS implementation changed in 1.19.3 and this went unnoticed. Fixed in 937c796 for 8.7.1.

@JorelAli JorelAli added the implemented for next release This has been implemented in the current dev build for the next public release label Dec 19, 2022
@JorelAli
Copy link
Owner

Fixed in 8.7.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working implemented for next release This has been implemented in the current dev build for the next public release
Projects
None yet
Development

No branches or pull requests

2 participants