jodeks-datapacks / AFK-Announcer

Simple AFK datapack to track and announce who is AFK
https://modrinth.com/datapack/afk-announcer
Other
0 stars 0 forks source link

Failed to load function afkannouncer:afk_kick/announce_afk_kick #4

Closed bearaujus closed 1 month ago

bearaujus commented 1 month ago

I downloaded the datapack and install on the server side. But during my server initialization I got this error

Sep 29 23:39:53 server bash[1336143]: [23:39:53] [main/ERROR]: Failed to load function afkannouncer:afk_kick/announce_afk_kick
Sep 29 23:39:53 server bash[1336143]: java.util.concurrent.CompletionException: java.lang.IllegalArgumentException: Whilst parsing command on line 2: Unknown or incomplete command, see below for error at position 0: <--[HERE]
Sep 29 23:39:53 server bash[1336143]:         at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315) ~[?:?]
Sep 29 23:39:53 server bash[1336143]:         at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320) ~[?:?]
Sep 29 23:39:53 server bash[1336143]:         at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1770) ~[?:?]
Sep 29 23:39:53 server bash[1336143]:         at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1760) ~[?:?]
Sep 29 23:39:53 server bash[1336143]:         at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387) ~[?:?]
Sep 29 23:39:53 server bash[1336143]:         at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312) ~[?:?]
Sep 29 23:39:53 server bash[1336143]:         at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843) ~[?:?]
Sep 29 23:39:53 server bash[1336143]:         at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808) ~[?:?]
Sep 29 23:39:53 server bash[1336143]:         at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188) ~[?:?]
Sep 29 23:39:53 server bash[1336143]: Caused by: java.lang.IllegalArgumentException: Whilst parsing command on line 2: Unknown or incomplete command, see below for error at position 0: <--[HERE]
Sep 29 23:39:53 server bash[1336143]:         at net.minecraft.class_2158.method_9195(class_2158.java:80) ~[server-intermediary.jar:?]
Sep 29 23:39:53 server bash[1336143]:         at net.minecraft.class_5349.method_29451(class_5349.java:89) ~[server-intermediary.jar:?]
Sep 29 23:39:53 server bash[1336143]:         at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?]
Sep 29 23:39:53 server bash[1336143]:         ... 6 more

Or can you put description that describe should I install the mod and datapack on the server side at the same time? or I just need to install the datapack only? (*Im very newbie at this)

Thank you!

Jodekq commented 1 month ago

Hey there! You only need to install either the mod or the datapack. (I suggest the datapack) To fix the error, you probably have to set the function-permission-level to 3 in the server.properties

bearaujus commented 1 month ago

Yay it's working now, thank you!

Sep 30 00:15:09 server bash[1344681]: [00:15:09] [Worker-Main-3/INFO]: Loaded Fabric Permissions
Sep 30 00:15:09 server bash[1344681]: [00:15:09] [main/INFO]: Loaded 1290 recipes
Sep 30 00:15:09 server bash[1344681]: [00:15:09] [main/INFO]: Loaded 1406 advancements
Sep 30 00:15:10 server bash[1344681]: [00:15:10] [main/INFO]: Applied 0 biome modifications to 0 of 64 new biomes in 1.086 ms
Sep 30 00:15:10 server bash[1344681]: [00:15:10] [Server thread/INFO]:         __
Sep 30 00:15:10 server bash[1344681]: [00:15:10] [Server thread/INFO]:   |    |__)   LuckPerms v5.4.140
Sep 30 00:15:10 server bash[1344681]: [00:15:10] [Server thread/INFO]:   |___ |      Running on Fabric - fabric@0.104.0+1.21.1
Sep 30 00:15:10 server bash[1344681]: [00:15:10] [Server thread/INFO]:
Sep 30 00:15:10 server bash[1344681]: [00:15:10] [Server thread/INFO]: Loading configuration...
Sep 30 00:15:11 server bash[1344681]: [00:15:11] [Server thread/INFO]: Loading storage provider... [H2]
Sep 30 00:15:11 server bash[1344681]: [00:15:11] [Server thread/INFO]: Loading internal permission managers...
Sep 30 00:15:11 server bash[1344681]: [00:15:11] [Server thread/INFO]: Performing initial data load...
Sep 30 00:15:11 server bash[1344681]: [00:15:11] [Server thread/INFO]: Successfully enabled. (took 1110ms)
Sep 30 00:15:11 server bash[1344681]: [00:15:11] [Server thread/INFO]: Starting minecraft server version 1.21.1
Sep 30 00:15:11 server bash[1344681]: [00:15:11] [Server thread/INFO]: Loading properties
Sep 30 00:15:11 server bash[1344681]: [00:15:11] [Server thread/INFO]: Default game type: CREATIVE
Sep 30 00:15:11 server bash[1344681]: [00:15:11] [Server thread/INFO]: Generating keypair
Sep 30 00:15:11 server bash[1344681]: [00:15:11] [Server thread/INFO]: Starting Minecraft server on 0.0.0.0:25566
Sep 30 00:15:11 server bash[1344681]: [00:15:11] [Server thread/INFO]: Using epoll channel type
Sep 30 00:15:11 server bash[1344681]: [00:15:11] [Server thread/INFO]: Preparing level "world"
Sep 30 00:15:11 server bash[1344681]: [00:15:11] [Server thread/INFO]: Preparing start region for dimension minecraft:overworld
Sep 30 00:15:12 server bash[1344681]: [00:15:12] [Worker-Main-6/INFO]: Preparing spawn area: 0%
Sep 30 00:15:12 server bash[1344681]: [00:15:12] [Server thread/INFO]: Time elapsed: 365 ms
Sep 30 00:15:12 server bash[1344681]: [00:15:12] [Server thread/INFO]: Done (0.618s)! For help, type "help"
bearaujus commented 1 month ago

Conclusion: When you execute

$JAVA_PATH -Xms$JAVA_XMS -Xmx$JAVA_XMX -jar $SERVER_JAR_PATH -initSettings

The default value for function-permission-level on server.properties is set to 2. What you need to do is adjust the function-permission-level to 3 or higher! Ref