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

[BUG] Command /pr undo [ID] does not work #7

Closed
szyha opened this issue Jun 30, 2023 · 3 comments · May be fixed by prism/PrismRefracted#63
Closed

[BUG] Command /pr undo [ID] does not work #7

szyha opened this issue Jun 30, 2023 · 3 comments · May be fixed by prism/PrismRefracted#63
Assignees
Labels
bug Something isn't working

Comments

@szyha
Copy link

szyha commented Jun 30, 2023

Describe the bug
The command "/pr undo [id]" does not work, but "/pr undo last" works. It also seems to me the command "/pr undo", is incorrectly displayed.

To Reproduce
Steps to reproduce the behavior:

  1. Type the command "/pr undo [id]"
  2. An error message pops up in the chat.

Expected behavior
After entering the ID correctly, it should run the command.

Screenshots
javaw_B5eAZrKLWj

Server (please complete the following information):

  • Prism Version: 3.7.0-CN-b2
  • Server Type: Purpur
  • Server Version: git-Purpur-2004 (MC: 1.20.1)

Additional context
The same error also occurs in the English version.
Log from console:

[09:59:02] [Server thread/INFO]: szyhownica issued server command: /pr undo 1
[09:59:02] [Server thread/ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing command 'pr' in plugin Prism v3.7.0-CN-b2
	at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47) ~[purpur-api-1.20.1-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:168) ~[purpur-api-1.20.1-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.craftbukkit.v1_20_R1.CraftServer.dispatchCommand(CraftServer.java:1017) ~[purpur-1.20.1.jar:git-Purpur-2004]
	at org.bukkit.craftbukkit.v1_20_R1.command.BukkitCommandWrapper.run(BukkitCommandWrapper.java:64) ~[purpur-1.20.1.jar:git-Purpur-2004]
	at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:265) ~[purpur-1.20.1.jar:?]
	at net.minecraft.commands.Commands.performCommand(Commands.java:332) ~[?:?]
	at net.minecraft.commands.Commands.performCommand(Commands.java:316) ~[?:?]
	at net.minecraft.server.network.ServerGamePacketListenerImpl.performChatCommand(ServerGamePacketListenerImpl.java:2392) ~[?:?]
	at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChatCommand$21(ServerGamePacketListenerImpl.java:2352) ~[?:?]
	at net.minecraft.util.thread.BlockableEventLoop.lambda$submitAsync$0(BlockableEventLoop.java:59) ~[?:?]
	at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?]
	at net.minecraft.server.TickTask.run(TickTask.java:18) ~[purpur-1.20.1.jar:git-Purpur-2004]
	at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153) ~[?:?]
	at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[?:?]
	at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1366) ~[purpur-1.20.1.jar:git-Purpur-2004]
	at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:197) ~[purpur-1.20.1.jar:git-Purpur-2004]
	at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?]
	at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1343) ~[purpur-1.20.1.jar:git-Purpur-2004]
	at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1336) ~[purpur-1.20.1.jar:git-Purpur-2004]
	at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?]
	at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1314) ~[purpur-1.20.1.jar:git-Purpur-2004]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1202) ~[purpur-1.20.1.jar:git-Purpur-2004]
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:323) ~[purpur-1.20.1.jar:git-Purpur-2004]
	at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.lang.NullPointerException: Cannot read field "processType" because "this.actionData" is null
	at network.darkhelmet.prism.actions.PrismProcessAction.getProcessChildActionType(PrismProcessAction.java:55) ~[Prism-3.7.0-CN-b2.jar:?]
	at network.darkhelmet.prism.commands.UndoCommand.handle(UndoCommand.java:73) ~[Prism-3.7.0-CN-b2.jar:?]
	at network.darkhelmet.prism.commandlibs.Executor.onCommand(Executor.java:97) ~[Prism-3.7.0-CN-b2.jar:?]
	at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[purpur-api-1.20.1-R0.1-SNAPSHOT.jar:?]
	... 23 more
@Rothes Rothes self-assigned this Jun 30, 2023
@Rothes Rothes added the bug Something isn't working label Jun 30, 2023
@Rothes
Copy link
Owner

Rothes commented Jun 30, 2023

Use /pr lookup r:10 a:prism-process -extended
The ID used for undo is
image
Will add a check for the issue.

@Rothes
Copy link
Owner

Rothes commented Jun 30, 2023

Fixed on 132678e

@Rothes Rothes closed this as completed Jun 30, 2023
@szyha
Copy link
Author

szyha commented Jun 30, 2023

Ok, thanks for the quick fix. As I test my English version I'm looking to see if there are any major bugs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants