Skip to content

Plugin Server Software Commands(ex. /restart) do not work in functions. #6441

@Bowswa

Description

@Bowswa

Expected behavior

Expected behavior is that when i use the /restart command inside of a function the server restarts just fine.

Observed/Actual behavior

When using the /restart command in a function it produces this error:
[ERROR] Failed to load function sched_restart:restart/paper

java.util.concurrent.CompletionException: java.lang.IllegalArgumentException: Whilst parsing command on line 1: Unknown or incomplete command, see below for error at position 0: <--[HERE] **Where the restart command is.

at java.util.concurrent.CompletableFuture.encodeThrowable(Unknown Source) ~[?:?]

at java.util.concurrent.CompletableFuture.completeThrowable(Unknown Source) [?:?]

at java.util.concurrent.CompletableFuture$AsyncSupply.run(Unknown Source) [?:?]

at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:?]

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:?]

at java.lang.Thread.run(Unknown Source) [?:?]

Caused by: java.lang.IllegalArgumentException: Whilst parsing command on line 1: Unknown or incomplete command, see below for error at position 0: <--[HERE]

at net.minecraft.commands.CustomFunction.a(CustomFunction.java:68) ~[patched_1.17.1.jar:git-Paper-196]

at net.minecraft.server.CustomFunctionManager.lambda$reload$3(CustomFunctionManager.java:86) ~[patched_1.17.1.jar:git-Paper-196]

... 4 more

Steps/models to reproduce

https://github.com/Razboy20/version-proxy-mc-datapack
Auto Restart Message v1.0.0.zip
Use these datapacks on a paper server.

This will produce the error on startup.

Plugin list

None

Paper version

This server is running Paper version git-Paper-196 (MC: 1.17.1) (Implementing API version 1.17.1-R0.1-SNAPSHOT) (Git: 59d449d)

You are running the latest version

Agreements

  • I am running the latest version of Paper available from https://papermc.io/downloads.
  • I have searched for and ensured there isn't already an open issue regarding this.
  • My version of Minecraft is supported by Paper.

Other

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: acceptedDisputed bug is accepted as valid or Feature accepted as desired to be added.type: bugSomething doesn't work as it was intended to.version: 1.19Game version 1.19

    Type

    No fields configured for Bug.

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions