Web-API - Provides an admin panel and API for your Minecraft server

Aw yiss ! Really nice, I will try to add more php examples.

A new version has been released for Web-API, it is available for download here.


Release notes

  • Beautify server address in /info endpoint
  • Fix various settings not working (https, customKeyStorePassword and customKeyStoreManagerPassword)
  • Fix /server/stats not respecting cache limits
  • Fix incorrect permission names (/chunk and /permissions)
  • Allow creating/editing/deleting users through /user route
  • Allow disabling servlets. Implements #94
  • Add crymates as contributor
  • Update to AdminPanel v5.1.1
    • Add users page to manage Web-API users
    • Fix commands autocomplete not working in IE

Route changes

Type From To Notes
Moved POST /user POST /user/login
Added GET /user/logout Supports a redirect query parameter
Added GET /user Gets a list of Web-API users
Added POST /user Creates a new Web-API user
Added PUT /user/{name} Modifies a Web-API user
Added DELETE /user/{name} Removes a Web-API user
1 Like

A new version has been released for Web-API, it is available for download here.


Release notes

  • Fix missing separation of host and port
  • Show process RAM and CPU usage instead of the whole system (drop oshi dependency)
  • Start adding CmdScheduler integration [WIP]
  • Update to AdminPanel v5.1.2
    • More fixes for IE
    • Fix Command history timestamps

Route changes

Type From To Notes
Added GET /cmd-scheduler Gets a list of scheduled commands
1 Like

Using SpongeForge 3002, Forge 2611, and WebAPI 5.1.1 for Minecraft 1.12.2. Currently getting these warnings from WebAPI.

[23:43:11] [qtp1471673026-265/WARN] [webapi]: Illegal character 0x16 in state=START for buffer HeapByteBuffer@24b0b3d3[p=1,l=334,c=8192,r=333]={\x16<<<\x03\x01\x01I\x01\x00\x01E\x03\x03\xC70\xE2n\x12\xF3`...\x03\x02\x03\x03\x02\x01\x02\x02\x02\x03\x00\x0f\x00\x01\x01>>>l,application/xht...\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00}
[23:43:11] [qtp1471673026-200/WARN] [webapi]: Illegal character 0x16 in state=START for buffer HeapByteBuffer@24b0b3d3[p=1,l=334,c=8192,r=333]={\x16<<<\x03\x01\x01I\x01\x00\x01E\x03\x03\xAc\xCa\xCb\x15\x15\xD4\xAd...\x03\x02\x03\x03\x02\x01\x02\x02\x02\x03\x00\x0f\x00\x01\x01>>>l,application/xht...\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00}
[23:43:12] [qtp1471673026-199/WARN] [webapi]: Illegal character 0x16 in state=START for buffer HeapByteBuffer@24b0b3d3[p=1,l=226,c=8192,r=225]={\x16<<<\x03\x01\x00\xDd\x01\x00\x00\xD9\x03\x02(X\x9d\xF6;2\x86...\x00\x0c\x00\t\x00\n\x00#\x00\x00\x00\x0f\x00\x01\x01>>>\x00\x15\x00\x00\x12www.poke-cra...\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00}
[23:43:12] [qtp1471673026-199/WARN] [webapi]: Illegal character 0x16 in state=START for buffer HeapByteBuffer@24b0b3d3[p=1,l=226,c=8192,r=225]={\x16<<<\x03\x01\x00\xDd\x01\x00\x00\xD9\x03\x01\x14g\x8c\xDd\x17`\xAb...\x00\x0c\x00\t\x00\n\x00#\x00\x00\x00\x0f\x00\x01\x01>>>\x00\x15\x00\x00\x12www.poke-cra...\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00}
[23:43:12] [qtp1471673026-200/WARN] [webapi]: Illegal character 0x16 in state=START for buffer HeapByteBuffer@24b0b3d3[p=1,l=148,c=8192,r=147]={\x16<<<\x03\x00\x00\x8f\x01\x00\x00\x8b\x03\x00U\xC1Z{\xFa\x00\x12...\x13\x00\x10\x00\r\xC0\r\xC0\x03\x00\n\x00\xFf\x01\x00>>>\x00L\x00\x00\x00\x17\x00\x15\x00\x00\x12www.po...\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00}
[23:46:11] [qtp1471673026-200/WARN] [webapi]: Illegal character 0x16 in state=START for buffer HeapByteBuffer@24b0b3d3[p=1,l=334,c=8192,r=333]={\x16<<<\x03\x01\x01I\x01\x00\x01E\x03\x03S\t\xAb]>\xEe\x17...\x03\x02\x03\x03\x02\x01\x02\x02\x02\x03\x00\x0f\x00\x01\x01>>>l,application/xht...\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00}
[23:46:11] [qtp1471673026-265/WARN] [webapi]: Illegal character 0x16 in state=START for buffer HeapByteBuffer@24b0b3d3[p=1,l=334,c=8192,r=333]={\x16<<<\x03\x01\x01I\x01\x00\x01E\x03\x03\x12;"\n\xA6\x80\xD9...\x03\x02\x03\x03\x02\x01\x02\x02\x02\x03\x00\x0f\x00\x01\x01>>>l,application/xht...\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00}
[23:46:12] [qtp1471673026-200/WARN] [webapi]: Illegal character 0x16 in state=START for buffer HeapByteBuffer@24b0b3d3[p=1,l=226,c=8192,r=225]={\x16<<<\x03\x01\x00\xDd\x01\x00\x00\xD9\x03\x02\xC7\xDf\xB5\xEa"\xD4\xE7...\x00\x0c\x00\t\x00\n\x00#\x00\x00\x00\x0f\x00\x01\x01>>>\x00\x15\x00\x00\x12www.poke-cra...\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00}
[23:46:12] [qtp1471673026-265/WARN] [webapi]: Illegal character 0x16 in state=START for buffer HeapByteBuffer@24b0b3d3[p=1,l=226,c=8192,r=225]={\x16<<<\x03\x01\x00\xDd\x01\x00\x00\xD9\x03\x01!m\n\xBc\xAf\xE3\xE8...\x00\x0c\x00\t\x00\n\x00#\x00\x00\x00\x0f\x00\x01\x01>>>\x00\x15\x00\x00\x12www.poke-cra...\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00}
[23:46:13] [qtp1471673026-200/WARN] [webapi]: Illegal character 0x16 in state=START for buffer HeapByteBuffer@24b0b3d3[p=1,l=148,c=8192,r=147]={\x16<<<\x03\x00\x00\x8f\x01\x00\x00\x8b\x03\x00\x91>\xA0\xA4\te\xE2...\x13\x00\x10\x00\r\xC0\r\xC0\x03\x00\n\x00\xFf\x01\x00>>>\x00L\x00\x00\x00\x17\x00\x15\x00\x00\x12www.po...\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00}
[23:51:11] [qtp1471673026-200/WARN] [webapi]: Illegal character 0x16 in state=START for buffer HeapByteBuffer@24b0b3d3[p=1,l=334,c=8192,r=333]={\x16<<<\x03\x01\x01I\x01\x00\x01E\x03\x03\xB8\x1e\xCfF\xB4\xDa|...\x03\x02\x03\x03\x02\x01\x02\x02\x02\x03\x00\x0f\x00\x01\x01>>>l,application/xht...\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00}
[23:51:11] [qtp1471673026-201/WARN] [webapi]: Illegal character 0x16 in state=START for buffer HeapByteBuffer@24b0b3d3[p=1,l=334,c=8192,r=333]={\x16<<<\x03\x01\x01I\x01\x00\x01E\x03\x03\xB3\xB4\xD0|\xE2\xA5\xF7...\x03\x02\x03\x03\x02\x01\x02\x02\x02\x03\x00\x0f\x00\x01\x01>>>l,application/xht...\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00}
[23:51:12] [qtp1471673026-200/WARN] [webapi]: Illegal character 0x16 in state=START for buffer HeapByteBuffer@24b0b3d3[p=1,l=226,c=8192,r=225]={\x16<<<\x03\x01\x00\xDd\x01\x00\x00\xD9\x03\x02\xEc\xEe\xAb\x86\x0e\xE3p...\x00\x0c\x00\t\x00\n\x00#\x00\x00\x00\x0f\x00\x01\x01>>>\x00\x15\x00\x00\x12www.poke-cra...\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00}
[23:51:12] [qtp1471673026-201/WARN] [webapi]: Illegal character 0x16 in state=START for buffer HeapByteBuffer@24b0b3d3[p=1,l=226,c=8192,r=225]={\x16<<<\x03\x01\x00\xDd\x01\x00\x00\xD9\x03\x01Y\xFe\xBaf)"2...\x00\x0c\x00\t\x00\n\x00#\x00\x00\x00\x0f\x00\x01\x01>>>\x00\x15\x00\x00\x12www.poke-cra...\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00}
[23:51:12] [qtp1471673026-200/WARN] [webapi]: Illegal character 0x16 in state=START for buffer HeapByteBuffer@24b0b3d3[p=1,l=148,c=8192,r=147]={\x16<<<\x03\x00\x00\x8f\x01\x00\x00\x8b\x03\x00\xF8\x05\xDe\x14\x8a<?...\x13\x00\x10\x00\r\xC0\r\xC0\x03\x00\n\x00\xFf\x01\x00>>>\x00L\x00\x00\x00\x17\x00\x15\x00\x00\x12www.po...\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00}

Modlist:

├── EconomyLite-7.1.0-2.14.3.jar
├── griefprevention-1.12.2-4.3.0.574.jar
├── LuckPerms-Sponge-4.2.22.jar
├── Nucleus-1.4.0-S7.0-MC1.12.2-plugin.jar
├── PixelExtras-1.12.2-2.3.4-universal.jar
├── Pixelmon-1.12.2-6.2.3-server.jar
├── PixelmonEconomyBridge-1.12.2-1.3.0.jar
├── PlayerGlow_1.1.1.jar
├── spongeforge-1.12.2-2611-7.1.0-BETA-3002.jar
├── VirtualChest-1.0.0-beta-6.jar
├── webapi-5.1.1-S7.1.jar
├── worldedit-forge-mc1.12-6.1.8-dist.jar
└── yourcustompaintings-v1.1-MC1.12.2-F2555-S7.1.0.0-SNAPSHOT.jar

Wondering why this warning keeps showing up.

Hmm, interesting… That almost sounds like you’re accessing http over https, or the other way around, when using the AdminPanel. Can you check to make sure that port and protocol match?
If you’re not using the AdminPanel then that error is indeed strange…

It’s happened when I’m not on the AdminPanel as well.

Got the following last night when no one was online:
[17:14:48] [qtp1471673026-4852/WARN] [webapi]: Illegal character 0x16 in state=START for buffer HeapByteBuffer@17d59a71[p=1,l=159,c=8192,r=158]={\x16<<<\x03\x01\x00\x9a\x01\x00\x00\x96\x03\x03\x05{[\xD3t\xE4\xD5…\x02\xFf\x01\x00\x01\x00\x00\x0f\x00\x01\x01\x00\x12\x00\x00>>>\r\n36\r\nContent-Len…\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00}

I’ve just deleted the config folder, so settings are reset. I’ll let you know if this problem persists.

Alright, well reset the thing, no longer getting that error. Now getting Could not pass XXXX to Plugin Errors.

> [23:13:13] [Server thread/ERROR] [Sponge]: Could not pass MessageChannelEvent$Impl to Plugin{id=webapi, name=Web-API, version=5.1.1-S7.1, description=Access Minecraft through a RESTful web server and an admin panel, url=https://github.com/Valandur/Web-API, authors=[Valandur], source=./mods/webapi-5.1.1-S7.1.jar}
> java.util.NoSuchElementException: No value present
>         at java.util.Optional.get(Optional.java:135) ~[?:1.8.0_151]
>         at net.minecraft.advancements.AdvancementProgress.get(SourceFile:771) ~[k.class:?]
>         at org.spongepowered.api.advancement.Progressable.achieved(Progressable.java:42) ~[Progressable.class:1.12.2-2705-7.1.0-BETA-3148]
>         at valandur.webapi.cache.player.CachedPlayer.addUnlockedAdvancements(CachedPlayer.java:168) ~[CachedPlayer.class:?]
>         at valandur.webapi.cache.player.CachedPlayer.<init>(CachedPlayer.java:155) ~[CachedPlayer.class:?]
>         at valandur.webapi.cache.CacheService.updatePlayer(CacheService.java:432) ~[CacheService.class:?]
>         at java.util.Optional.map(Optional.java:215) ~[?:1.8.0_151]
>         at valandur.webapi.cache.CacheService.lambda$getPlayer$9(CacheService.java:394) ~[CacheService.class:?]
>         at valandur.webapi.WebAPI.runOnMain(WebAPI.java:548) ~[WebAPI.class:?]
>         at valandur.webapi.cache.CacheService.getPlayer(CacheService.java:392) ~[CacheService.class:?]
>         at valandur.webapi.cache.CacheService.getPlayer(CacheService.java:408) ~[CacheService.class:?]
>         at valandur.webapi.cache.CacheService.asCachedObject(CacheService.java:168) ~[CacheService.class:?]
>         at valandur.webapi.cache.message.CachedMessage.lambda$new$0(CachedMessage.java:43) ~[CachedMessage.class:?]
>         at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[?:1.8.0_151]
>         at java.util.WeakHashMap$KeySpliterator.forEachRemaining(WeakHashMap.java:1137) ~[?:1.8.0_151]
>         at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) ~[?:1.8.0_151]
>         at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[?:1.8.0_151]
>         at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) ~[?:1.8.0_151]
>         at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:1.8.0_151]
>         at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) ~[?:1.8.0_151]
>         at valandur.webapi.cache.message.CachedMessage.<init>(CachedMessage.java:44) ~[CachedMessage.class:?]
>         at valandur.webapi.cache.message.CachedChatMessage.<init>(CachedChatMessage.java:24) ~[CachedChatMessage.class:?]
>         at valandur.webapi.cache.CacheService.onMessage(CacheService.java:865) ~[CacheService.class:?]
>         at org.spongepowered.common.event.listener.MessageChannelEventListener_CacheService_onMessage71.handle(Unknown Source) ~[?:?]
>         at org.spongepowered.common.event.RegisteredListener.handle(RegisteredListener.java:95) ~[RegisteredListener.class:1.12.2-2705-7.1.0-BETA-3148]
>         at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:381) ~[SpongeModEventManager.class:1.12.2-2705-7.1.0-BETA-3148]
>         at org.spongepowered.mod.event.SpongeModEventManager.extendedPost(SpongeModEventManager.java:419) ~[SpongeModEventManager.class:1.12.2-2705-7.1.0-BETA-3148]
>         at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:403) ~[SpongeModEventManager.class:1.12.2-2705-7.1.0-BETA-3148]
>         at org.spongepowered.common.event.SpongeEventManager.post(SpongeEventManager.java:442) ~[SpongeEventManager.class:1.12.2-2705-7.1.0-BETA-3148]
>         at org.spongepowered.common.SpongeImpl.postEvent(SpongeImpl.java:217) ~[SpongeImpl.class:1.12.2-2705-7.1.0-BETA-3148]
>         at org.spongepowered.common.text.chat.ChatUtil.sendMessage(ChatUtil.java:60) ~[ChatUtil.class:1.12.2-2705-7.1.0-BETA-3148]
>         at net.minecraft.entity.player.EntityPlayerMP.func_145747_a(EntityPlayerMP.java:4073) ~[oq.class:?]
>         at com.pixelmonmod.pixelmon.comm.ChatHandler.sendChat(ChatHandler.java:46) ~[ChatHandler.class:?]
>         at com.pixelmonmod.pixelmon.comm.ChatHandler.sendChat(ChatHandler.java:33) ~[ChatHandler.class:?]
>         at com.pixelmonmod.pixelmon.comm.packetHandlers.KeyPacket$Handler.lambda$sendPokemon$1(KeyPacket.java:305) ~[KeyPacket$Handler.class:?]
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_151]
>         at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_151]
>         at net.minecraft.util.Util.func_181617_a(SourceFile:46) [h.class:?]
>         at org.spongepowered.common.SpongeImplHooks.onUtilRunTask(SpongeImplHooks.java:284) [SpongeImplHooks.class:1.12.2-2705-7.1.0-BETA-3148]
>         at net.minecraft.server.MinecraftServer.redirect$onRun$zjg000(MinecraftServer.java:3987) [MinecraftServer.class:?]
>         at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:723) [MinecraftServer.class:?]
>         at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:396) [nz.class:?]
>         at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:668) [MinecraftServer.class:?]
>         at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526) [MinecraftServer.class:?]
>         at java.lang.Thread.run(Thread.java:748) [?:1.8.0_151]

and

[23:21:55] [Server thread/INFO] [nucleus]: SnapCrackle3 ran the command: /home
[23:21:55] [Server thread/ERROR] [Sponge]: Could not pass SendCommandEvent$Impl to Plugin{id=webapi, name=Web-API, version=5.1.1-S7.1, description=Access Minecraft through a RESTful web server and an admin panel, url=https://github.com/Valandur/Web-API, authors=[Valandur], source=./mods/webapi-5.1.1-S7.1.jar}
java.util.NoSuchElementException: No value present
        at java.util.Optional.get(Optional.java:135) ~[?:1.8.0_151]
        at net.minecraft.advancements.AdvancementProgress.get(SourceFile:771) ~[k.class:?]
        at org.spongepowered.api.advancement.Progressable.achieved(Progressable.java:42) ~[Progressable.class:1.12.2-2705-7.1.0-BETA-3148]
        at valandur.webapi.cache.player.CachedPlayer.addUnlockedAdvancements(CachedPlayer.java:168) ~[CachedPlayer.class:?]
        at valandur.webapi.cache.player.CachedPlayer.<init>(CachedPlayer.java:155) ~[CachedPlayer.class:?]
        at valandur.webapi.cache.CacheService.updatePlayer(CacheService.java:432) ~[CacheService.class:?]
        at java.util.Optional.map(Optional.java:215) ~[?:1.8.0_151]
        at valandur.webapi.cache.CacheService.lambda$getPlayer$9(CacheService.java:394) ~[CacheService.class:?]
        at valandur.webapi.WebAPI.runOnMain(WebAPI.java:548) ~[WebAPI.class:?]
        at valandur.webapi.cache.CacheService.getPlayer(CacheService.java:392) ~[CacheService.class:?]
        at valandur.webapi.cache.CacheService.getPlayer(CacheService.java:408) ~[CacheService.class:?]
        at valandur.webapi.cache.CacheService.asCachedObject(CacheService.java:168) ~[CacheService.class:?]
        at valandur.webapi.cache.misc.CachedCause.<init>(CachedCause.java:42) ~[CachedCause.class:?]
        at valandur.webapi.cache.command.CachedCommandCall.<init>(CachedCommandCall.java:61) ~[CachedCommandCall.class:?]
        at valandur.webapi.cache.CacheService.onCommand(CacheService.java:875) ~[CacheService.class:?]
        at org.spongepowered.common.event.listener.SendCommandEventListener_CacheService_onCommand65.handle(Unknown Source) ~[?:?]
        at org.spongepowered.common.event.RegisteredListener.handle(RegisteredListener.java:95) ~[RegisteredListener.class:1.12.2-2705-7.1.0-BETA-3148]
        at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:381) [SpongeModEventManager.class:1.12.2-2705-7.1.0-BETA-3148]
        at org.spongepowered.mod.event.SpongeModEventManager.extendedPost(SpongeModEventManager.java:419) [SpongeModEventManager.class:1.12.2-2705-7.1.0-BETA-3148]
        at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:403) [SpongeModEventManager.class:1.12.2-2705-7.1.0-BETA-3148]
        at org.spongepowered.common.event.SpongeEventManager.post(SpongeEventManager.java:442) [SpongeEventManager.class:1.12.2-2705-7.1.0-BETA-3148]
        at org.spongepowered.common.command.SpongeCommandManager.process(SpongeCommandManager.java:301) [SpongeCommandManager.class:1.12.2-2705-7.1.0-BETA-3148]
        at net.minecraft.command.ServerCommandManager.func_71556_a(SourceFile:1083) [dh.class:?]
        at net.minecraft.network.NetHandlerPlayServer.func_147361_d(NetHandlerPlayServer.java:958) [pa.class:?]
        at net.minecraft.network.NetHandlerPlayServer.func_147354_a(NetHandlerPlayServer.java:937) [pa.class:?]
        at net.minecraft.network.play.client.CPacketChatMessage.func_148833_a(SourceFile:37) [la.class:?]
        at net.minecraft.network.play.client.CPacketChatMessage.func_148833_a(SourceFile:9) [la.class:?]
        at org.spongepowered.common.network.PacketUtil.onProcessPacket(PacketUtil.java:147) [PacketUtil.class:1.12.2-2705-7.1.0-BETA-3148]
        at net.minecraft.network.PacketThreadUtil$1.redirect$onProcessPacket$zlb000(SourceFile:539) [hv$1.class:?]
        at net.minecraft.network.PacketThreadUtil$1.run(SourceFile:13) [hv$1.class:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_151]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_151]
        at net.minecraft.util.Util.func_181617_a(SourceFile:46) [h.class:?]
        at org.spongepowered.common.SpongeImplHooks.onUtilRunTask(SpongeImplHooks.java:284) [SpongeImplHooks.class:1.12.2-2705-7.1.0-BETA-3148]
        at net.minecraft.server.MinecraftServer.redirect$onRun$zjg000(MinecraftServer.java:3987) [MinecraftServer.class:?]
        at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:723) [MinecraftServer.class:?]
        at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:396) [nz.class:?]
        at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:668) [MinecraftServer.class:?]
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526) [MinecraftServer.class:?]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_151]

Updated to spongeforge-1.12.2-2705-7.1.0-BETA-3148 (although was happening as well in the version I was using before)

This is already fixed and will be in the next release :slight_smile:

Ahh alright, awesome. Thanks :slight_smile:
Also, haven’t used the newer versions, last time I made proper use of the plugin (lately just been messing around with the admin panel and that’s it, since put my server kinda into a stop) was about a year ago, trying my old code to run commands, but they no longer work. Do you know someone with php knowledge that can help me updating the function I have for running a command from the server, can’t seem to be able to get it running for some reason.

Whenever I try to do a post request, keep getting HTTP 415 Unsupported Media Type. Get works fine though.

And saw what was the mistake… when reading the index.yaml file included saw that it also accepts xml and didn’t specify what kind of content I was sending. :thinking:

For anyone who runs into the same problem, this function is operational with 4.10.8:

function runCommand($command){
	$command = json_encode(array('command'=>$command));
	$ch = curl_init('localhost:8080/api/cmd');
	curl_setopt($ch, CURLOPT_POST, 1);
	curl_setopt($ch, CURLOPT_POSTFIELDS, $command);
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
	curl_setopt($ch, CURLOPT_HTTPHEADER, array(
		'x-webapi-key: YOUR-KEY-HERE',
		'Content-Type: application/json',
		'Accept: application/json'
	));
	$result = json_decode(curl_exec($ch), true);
	if(curl_getinfo($ch, CURLINFO_HTTP_CODE) !== 200 || $result['ok'] !== true){return false;}
	curl_close($ch);
	return $result['result'];
}

A new version has been released for Web-API, it is available for download here.


  • Fix NPE with item and fluid stacks
  • Remove log message spam when not in dev mode
  • Fix missing options for interactive messages causing errors
1 Like

A new version has been released for Web-API, it is available for download here.


  • Added support for multi server setups (documentation missing, join Discord for info!)
    This is a work in progress. Expect bugs and not implemented features
    • Web-API runs when minecraft server is offline
    • One central url to send requests (use server query parameter or X-WebAPI-Server header)
    • Connect the servers with:
      • WebSockets
      • Redis
      • RabbitMQ
  • Add support for PUT requests on tile-entities
  • Add default biome colors to map.conf on creation
  • Add support for GMWCrates (Work in progress)
  • Don’t initialize Sentry unless requested. Fixes #100
  • Fix PUT requests on player endpoint not working properly. Fixes #104
  • Add slot index to inventories. Closes #105
1 Like

The more I follow this plugin, the more it becomes amazing :heart_eyes:

A new version has been released for Web-API, it is available for download here.


  • Fix user permissions not loading correctly. Fixes #106
  • Fix server linking not working properly
  • Don’t show empty slots in inventories
  • Update to AdminPanel v5.2.0
    • Update to new Inventory structure
    • Update dependencies
2 Likes

A new version has been released for Web-API, it is available for download here.


  • Fix block state not accepting type ids directly. Fixes #114
  • Fire server stop event earlier. Fixes #110
  • Update to newest MMCRestrict. Fixes #112
  • Update to AdminPanel v5.2.1
    • Fixed reloading causing redirect to dashboard
    • Added new MMCRestrict option
1 Like

Hey !I really love this pugin and it’s really useful ! Can I share this pugin to a Chinese minecraft forum ? I’ll attach the link and your name .

Of course, that would be awesome. Would be great if you sent me the link to your post aswell.

Thanks !
i post here . I will modify if there are any problems.

1 Like

How do I generate API keys? I’ve tried passing in my password and my hashed password in the header and it’s still giving me a 403.

$ curl -XPOST -H 'x-webapi-key: dummypasswd' -H "Content-type: application/json" -d '[
> {
> "command": "say hello",
> "hiddenInConsole": true,
> "name": "quantomworks",
> "waitLines": 0,
> "waitTime": 20
> }
> ]' 'http://admin.thebobsgamingnetwork.net:25588/api/v5/cmd'

I found

# This is an array of keys, defining which keys give access to which endpoints.
keys {}

in the config but I have no idea how to write to it in the correct format to generate keys

The docs page has some tutorials available on how to use the API. Specifically you would be looking at the “permissions with keys” section in the permissions docs.
A simple example would look like this:

keys {
    "my-secret-key" {
        # The "*" stands for all permissions and data
        permissions="*"

        # No rate limit or zero = unlimited requests
        rateLimit=0    
    }
}
1 Like