{"id":19952442,"url":"https://github.com/dosmike/webbooks","last_synced_at":"2026-04-14T02:31:16.466Z","repository":{"id":133520908,"uuid":"102391111","full_name":"DosMike/WebBooks","owner":"DosMike","description":"Open websites in Minecraft","archived":false,"fork":false,"pushed_at":"2021-05-02T10:17:42.000Z","size":121,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-01T15:16:10.264Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DosMike.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-04T18:35:33.000Z","updated_at":"2021-05-02T10:17:45.000Z","dependencies_parsed_at":"2023-07-10T00:16:00.079Z","dependency_job_id":null,"html_url":"https://github.com/DosMike/WebBooks","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/DosMike/WebBooks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DosMike%2FWebBooks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DosMike%2FWebBooks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DosMike%2FWebBooks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DosMike%2FWebBooks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DosMike","download_url":"https://codeload.github.com/DosMike/WebBooks/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DosMike%2FWebBooks/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31779942,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T02:24:21.117Z","status":"ssl_error","status_checked_at":"2026-04-14T02:24:20.627Z","response_time":153,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T01:13:03.974Z","updated_at":"2026-04-14T02:31:16.443Z","avatar_url":"https://github.com/DosMike.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WebBooks\nOpen websites in Minecraft\n\nThe main command is `/webbook` or `/wbk` for short. Or `/url` if you fancy that.    \nThe syntax is as follows: `/\u003ccommand\u003e [-s [-a \u003cauthor\u003e] | -c] \u003curl\u003e [target]`.\n* `url` is the website to load and display\n* `target` is a optional parameter specifying who's supposed to see the website.   \nThis parameter requires the permission `webbooks.url.other`\n* `-c` will open the website paginated into the chat instead of as a book.   \nfollowing links will open a book reguardless\n* `-s` this can not be used with `-c` as it supressed any output. Instead the website will be stored away in a physical book.   \nLinks that execute server-commands will not work well with those!\u003cbr\u003eThis option requires the permission `webbooks.url.save`\n* `-a \u003cauthor\u003e` only affects `-s`. Will set the author of the book item. Supports color codes.\n   This option requires the permission `webbooks.url.author`\n\nThe base permission to use the command is `webbooks.url.base`\n\nIn order to browse domains, the permission `webbooks.broswe.\u003cdomain\u003e` is required as well. The permission requires the domain backwards to allow the permission system to automatically manage subdomains. For example: `example.com` would require the permission `webbooks.browse.com.example`. That permission would also allow `minecraft.example.com`. And due to how the permission system works `webbooks.browse` handles all domains.\n\n### Config\n\nThe config file provides options to `Proxy` the requests. This is usefull as every website will be loaded by the game-server. So going to any website will expose the ip to it. Not like you can just lookup the ip by the server-name, but it's there as a feature.    \nKeep in mind tho that any response from the web-server must happen within 3 seconds before timing out!\n\nWith the `MOTD` you can specify a url to display when a player joins your server. This might be usefull to have a dynamic greeting message, automatically updated rules or what ever you come up with to write on your webserver.\n\nThe `ExtendedTooltips` option is on by default. It add an extra line to ever link, showing the command that will be run or the URL that will be opened. Tooltips can also be hidden per link (see the following section).\n\nSpecifying a `DefaultAuthor` is only required if you don't like the default author ('Saved Website') when `-s` is used to save the website to an item.\n\nThe `PageSelector` is probably the most important part in your project, as it determines how pages are split up. Minecraft has no way of doing automatic page breaks unfortunately, and this solution seems fine. The default selector is `ul.book li`.\n\nVarious player information is sent to the server, depending on the specified `TransportMethod`.   \nValid values are described below.\n\n## Web-Part:\n\nPages are by default selected with the css-selector `ul.book li`. This can be changed in the config tho, if you don't like it.\n\nPlayer data are sent according to the transport method. If you're writing a service and you want to be able to service all types, you can distinguish them by request method and Content-Type header.\n\nExample PHP showcasing how to server `post/formdata` request with the default `ul.book li` selector:\n```\n\u003c?PHP\n//Preparing data for display, split them on the delimiter '/'\n$worldData = explode('/', $_POST['World']);\n$worldName = $worldData[0];\n\n$statusData = explode('/', $_POST['Status']);\n$health = $statusData[0];\n$level = $statusData[2];\n\n$playerName = $_POST['Name'];\n?\u003e\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n\u003chead\u003e\n  \u003ctitle\u003eTest Book\u003c/title\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n  \u003cul class=\"book\"\u003e\n    \u003cli\u003e\u003cu\u003eThis is \u003cspan class=\"mc-m\"\u003ewebsite\u003c/span\u003e book!\u003c/u\u003e\n    \u003cbr\u003e\n    \u003cbr\u003eYour User-Agent: \u003c?= $_SERVER['HTTP_USER_AGENT'] ?\u003e\n    \u003cbr\u003e\n    \u003cbr\u003e\u003ci\u003e1\u003c/i\u003e \u003ca href=\"#2\"\u003e2\u003c/a\u003e \u003ca href=\"#3\"\u003e3\u003c/a\u003e\n\n    \u003cli\u003eHello, \u003c?= $playerName ?\u003e level \u003c?= $level ?\u003e\n    \u003cbr\u003e\n    \u003cbr\u003eYou are currently in \u003c?= $worldName ?\u003e with \u003c?= $health ?\u003e HP\n    \u003cbr\u003e\n    \u003cbr\u003e\u003ca href=\"#1\"\u003e1\u003c/a\u003e \u003ci\u003e2\u003c/i\u003e \u003ca href=\"#3\"\u003e3\u003c/a\u003e\n\n    \u003cli\u003eTest some links:\n    \u003cbr\u003e\n    \u003cbr\u003e\u003ca href=\"kill\" target=\"_player\"\u003eDie now\u003c/a\u003e\n    \u003cbr\u003e\u003ca href=\"test.php\"\u003eReload site\u003c/a\u003e\n    \u003cbr\u003e\u003ca href=\"stop\" target=\"_server\" data-permission=\"webbooks.links.admin\" title=\"Please dont :\u003c\"\u003eKill the server\u003c/a\u003e\n    \u003cbr\u003e\u003ca href=\"http://www.google.com\" target=\"_blank\"\u003eGo to google\u003c/a\u003e\n    \u003cbr\u003e\n    \u003cbr\u003e\u003ca href=\"#1\"\u003e1\u003c/a\u003e \u003ca href=\"#2\"\u003e2\u003c/a\u003e \u003ci\u003e3\u003c/i\u003e\n  \u003c/ul\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\n### Formatting your website\n\nTo reflect the limited set for formats available to minecraft a fix set of style classes has to be used.    \nThose can in return be defined in your stylesheet as well to support displaying the content in an actual web-browser.\n\nThe class names have a `mc-`-Prefix followed by the format-code. Some bold red text could be:\n```\n\u003cspan class=\"mc-c mc-l\"\u003eText\u003c/span\u003e or\n\u003cb\u003e\u003cspan class=\"mc-c\"\u003eText\u003c/span\u003e\u003c/b\u003e or\n\u003cb class=\"mc-c\"\u003eText\u003c/b\u003e\n```\n\n### Adding hover text\n\nYou can attach a line of text to be displayed on hovering to pretty much any element using the `title` attribute for the html node in case a element needs further explanation.\n\n### Links and special targets\n\nLinks will work as expected, loading the website and viewing it as another book.    \nAs you might expect if you add `target=\"_blank\"` to your link Minecraft will ask the player to open the link in the system web-browser.\n\nBut it would be pretty boring if that was everything a book could do, so there's a little bit more you can do with links:\n* `\u003ca href=\"#1\"\u003e` will not jump to sections with the specified id, but instead jump to the given pagenumber\n* `\u003ca href=\"command\" target=\"_player\"\u003e` will execute the command in href as if the player typed it. the `/` is optional.\n* `\u003ca href=\"command\" target=\"_server\"\u003e` will execute the command in href as the server with op-powers. These links will break if you save the website, but not cause any big errors (Besides telling the player that the callback stopped working)\n\nLinks with target \"_player\" and \"_server\" allow for a additional attribute `data-permission` to restrict usage.\nUsing this parameter on \"_player\" commands will break the link in saved book in the same way \"_sever\" commands will break in saved books.\nAn example would be `\u003ca href=\"stop\" target=\"_server\" data-permission=\"server.admin.stop\"\u003eStop the server\u003c/a\u003e`\n\nThe target along with the url will be shown in a hover text for each link like:\n* `URL: url` for normal links\n* `Extern: url` for links with target `_blank`\n* `Run: command` for links with target `_player`\n* `¶ Run: command` for links with target `_player` and a required permission\n* `Server: command` for links with target `_server`\n* `¶ Server: command` for links with target `_server` and a required permission\n\nIf you don't want this target text you can disable `ExtendedTooltips` in the config or add the attribute `data-title-hide-href`.\n\n\n### Available player-data:\n\nFor `post/json` the request method will be POST and player data will be a json like this:\n```json\n{\n  \"subject\": {\n    \"name\": String, \"uuid\": UUID,\n    \"health\": Number, \"foodLevel\": Number,\n    \"expLevel\": Number, \"gameMode\": String\n  },\n  \"location\": {\n    \"world\": { \"name\": String, \"uuid\": UUID },\n    \"position\": { \"x\": Number, \"y\": Number, \"z\": Number }\n  },\n  \"connection\": {\n    \"ip\": String, \"port\": Number, \"latency\": Number,\n    \"joined\": { \"first\": IsoDate, \"last\": IsoDate }\n  }\n}\n```\nFor `post/formdata` the request method will be POST and the data will be url-form endcoded. (New Lines are only for readability)\n```\nName=\u003cNAME\u003e\u0026\nUUID=\u003cUUID\u003e\u0026\nWorld=\u003cNAME\u003e/\u003cUUID\u003e\u0026\nLocation=\u003cX\u003e/\u003cY\u003e/\u003cZ\u003e\u0026\nConnection=\u003cIP\u003e:\u003cPORT\u003e/\u003cLATENCY\u003ems\u0026\nJoined=\u003cFIRST\u003e/\u003cLAST\u003e\u0026\nStatus=\u003cHEALTH\u003e/\u003cFOODLEVEL\u003e/\u003cEXPLEVEL\u003e/\u003cGAMEMODE\u003e\n```\nFor `get/header` the request method will be GET and the data will be sent in headers:\n```\nX-WebBook-User=\u003cNAME\u003e; \u003cUUID\u003e\nX-WebBook-World=\u003cNAME\u003e; \u003cUUID\u003e\nX-WebBook-Location=\u003cX\u003e; \u003cY\u003e; \u003cZ\u003e\nX-WebBook-Connection=\u003cIP\u003e:\u003cPORT\u003e; \u003cLATENCY\u003ems\nX-WebBook-Joined=\u003cFIRST\u003e; \u003cLAST\u003e\nX-WebBook-Status=\u003cHEALTH\u003e; \u003cFOODLEVEL\u003e; \u003cEXPLEVEL\u003e; \u003cGAMEMODE\u003e\n```\n\n### User-Agent string:\n\n##### Before 1.2:\n`\u003cMinecraftName\u003e(\u003cExecutionType\u003e/\u003cType\u003e) \u003cMinecraftVersion\u003e/\u003cSpongeName\u003e \u003cSpongeVersion\u003e/WebBooks(webbook) \u003cWebBooksVersion\u003e`\n##### Since 1.2:\n`\u003cMinecraftName\u003e/\u003cMinecraftVersion\u003e \u003cSpongeName\u003e/\u003cSpongeVersion\u003e(\u003cSpongePlatform\u003e; \u003cSpongeType\u003e) WebBooks/\u003cWebBooksVersion\u003e (webbook; by DosMike)`\n\n# This Plugin utilizes JSoup\nJsoup is licensed under MIT-License    \n[Poject Homepage](https://jsoup.org/) \u0026#x2001; [License-Text](https://jsoup.org/license)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdosmike%2Fwebbooks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdosmike%2Fwebbooks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdosmike%2Fwebbooks/lists"}