It should have shown the command on the first join instead of saying its unknown
Server logs and CommandAPI config
I start the server with this bat file:
@echo off
java -Xms2G -Xmx2G -jar paper-1.20.2-234.jar --nogui
Server Log:
Starting org.bukkit.craftbukkit.Main
System Info: Java 21 (OpenJDK 64-Bit Server VM 21+35-LTS) Host: Windows 10 10.0 (amd64)
Loading libraries, please wait...
[17:07:23 INFO]: Environment: Environment[accountsHost=https://api.mojang.com, sessionHost=https://sessionserver.mojang.com, servicesHost=https://api.minecraftservices.com, name=PROD]
[17:07:24 INFO]: Loaded 7 recipes
[17:07:24 INFO]: Starting minecraft server version 1.20.2
[17:07:24 INFO]: Loading properties
[17:07:24 INFO]: This server is running Paper version git-Paper-234 (MC: 1.20.2) (Implementing API version 1.20.2-R0.1-SNAPSHOT) (Git: f613437)
[17:07:25 INFO]: Server Ping Player Sample Count: 12
[17:07:25 INFO]: Using 4 threads for Netty based IO
[17:07:25 WARN]: [!] The timings profiler has been enabled but has been scheduled for removal from Paper in the future.
We recommend installing the spark profiler as a replacement: https://spark.lucko.me/
For more information please visit: https://github.com/PaperMC/Paper/issues/8948
[17:07:25 INFO]: [ChunkTaskScheduler] Chunk system is using 1 I/O threads, 5 worker threads, and gen parallelism of 5 threads
[17:07:25 INFO]: Default game type: SURVIVAL
[17:07:25 INFO]: Generating keypair
[17:07:25 INFO]: Starting Minecraft server on *:25565
[17:07:25 INFO]: Using default channel type
[17:07:25 INFO]: Paper: Using Java compression from Velocity.
[17:07:25 INFO]: Paper: Using Java cipher from Velocity.
[17:07:25 INFO]: [Test] Loading server plugin Test v1.0
[17:07:25 INFO]: [CommandAPI] Loaded platform NMS_1_20_R2 > NMS_Common > CommandAPIBukkit
[17:07:25 WARN]: [CommandAPI] Could not hook into the NBT API for NBT support. Download it from https://www.spigotmc.org/resources/nbt-api.7939/
[17:07:25 INFO]: [CommandAPI] Hooked into Spigot successfully for Chat/ChatComponents
[17:07:25 INFO]: [CommandAPI] Hooked into Adventure for AdventureChat/AdventureChatComponents
[17:07:25 INFO]: [CommandAPI] Hooked into Paper for paper-specific API implementations
[17:07:25 INFO]: [CommandAPI] Registering command /ping
[17:07:25 INFO]: Server permissions file permissions.yml is empty, ignoring it
[17:07:25 INFO]: Preparing level "world"
[17:07:25 INFO]: Preparing start region for dimension minecraft:overworld
[17:07:25 INFO]: Time elapsed: 153 ms
[17:07:25 INFO]: Preparing start region for dimension minecraft:the_nether
[17:07:26 INFO]: Time elapsed: 20 ms
[17:07:26 INFO]: Preparing start region for dimension minecraft:the_end
[17:07:26 INFO]: Time elapsed: 13 ms
[17:07:26 WARN]: Plugin Test v1.0 tried to register permission 'test.permission' but it's already registered
[17:07:26 INFO]: [Test] Enabling Test v1.0
[17:07:26 INFO]: [CommandAPI] Hooked into Paper ServerResourcesReloadedEvent
[17:07:26 INFO]: Running delayed init tasks
[17:07:26 INFO]: [CommandAPI] Linking permissions to commands:
[17:07:26 INFO]: [CommandAPI] test.permission -> /ping
[17:07:26 INFO]: [CommandAPI] Linked 1 Bukkit permissions to commands
[17:07:26 INFO]: [CommandAPI] Reloading datapacks...
[17:07:26 INFO]: Loaded 7 recipes
[17:07:26 INFO]: [CommandAPI] Finished reloading datapacks
[17:07:26 INFO]: Done (2.265s)! For help, type "help"
[17:07:26 INFO]: Timings Reset
[17:07:35 INFO]: UUID of player TheStegosaurus_ is f1bb7d85-a529-481e-b931-12cd33887cca
[17:07:36 INFO]: TheStegosaurus_ joined the game
[17:07:36 INFO]: TheStegosaurus_[/127.0.0.1:58666] logged in with entity id 218 at ([world]-51.781821034020716, 64.0, -69.66196735495392)
[17:07:39 INFO]: TheStegosaurus_ issued server command: /ping
[17:07:40 INFO]: TheStegosaurus_ lost connection: Disconnected
[17:07:40 INFO]: TheStegosaurus_ left the game
[17:07:44 INFO]: UUID of player TheStegosaurus_ is f1bb7d85-a529-481e-b931-12cd33887cca
[17:07:44 INFO]: TheStegosaurus_ joined the game
[17:07:44 INFO]: TheStegosaurus_[/127.0.0.1:58675] logged in with entity id 226 at ([world]-51.781821034020716, 64.0, -69.66196735495392)
[17:07:46 INFO]: TheStegosaurus_ issued server command: /ping
CommandAPI version
9.2.0
Minecraft version
1.20
Are you shading the CommandAPI?
Yes
What I did
When joining the game i give the player the
test.permission
permissionThis permission is also registered in my plugin.yml file:
test.permission
permissionWhat actually happened
CommandAPI says, that the command has been registered with the right permission.
When I first join, it shows me that the command is unknown but if I send it, I get a response:
Rejoining the Server makes it show up as a command:
Heres a video of it happening: https://github.com/JorelAli/CommandAPI/assets/131478851/9d5c1fd0-a165-4d91-82f6-14549a2e5f9c
What should have happened
It should have shown the command on the first join instead of saying its unknown
Server logs and CommandAPI config
I start the server with this bat file:
Server Log:
Other
My entire Test.java file:
My entire build.gradle file:
My entire plugin.yml file: