- 欢迎来到Minecraft插件百科!
- 对百科编辑一脸懵逼?帮助:快速入门带您快速熟悉百科编辑!
- 因近日遭受攻击,百科现已限制编辑,有意编辑请加入插件百科企鹅群:223812289
Dynmap
外文名 | Dynmap |
插件类型 | Spigot / CraftBukkit |
最新版本 | v1.5.5.7 |
兼容服务端 | 全版本 |
前置插件 | Vault |
源地址 | http://dev.bukkit.org/bukkit-plugins/Dynmap |
- 点击此处开始翻译。
- 如本模板出现在原文存档页面,请注意更新主页面后,仍需要去除此处该模板。
- 如当前页面已经没有需要翻译的内容,请删去待翻译模板。
- 有标题的大篇幅文章,如果短时间内无法全部翻译,请先把所有的标题翻译出来,以便之后的贡献者选择与翻译章节内容。
简介
Dynmap是一个可以用网页浏览的、像谷歌地图一样的动态地图插件。Dynmap的网页结构是建立在整个MineCraft游戏之外的,非常实用和易用,Dynmap也可应用于基于Apache类软件的网页。
Dynmap可以用不同的渲染图层渲染你的服务器世界地图, 有些适合于展示, 有些有着更多的地图细节。
这个插件的原始项目是由 k-zed.开发给 hMod 的。
插件的部件可供你按照自己的需要添加/删除功能,使用Dnymap支持的部件,包括聊天泡泡, 网页-游戏聊天, 和可配置的标记, 标签, 下换线。
功能
- 每个游戏世界深度可设置的地图
- 实时更新:地图总是和服务器世界实时同步,当你打开着你的网页时更新一直会显示
- 玩家和他们的头像在地图上可见
- 地图上的聊天信息可见 (显示在聊天泡泡或者聊天框里)
- 地图浏览者能和游戏内的玩家聊天
- 实时Minecraft时间在地图上可见
- 实时Minecraft季节在地图上可见
- WorldGuard, Residence, Towny 和 Factions regions 插件都能在地图上可见 (需要相应版本的 Dynmap-* 补丁)
总的来说高度可配置和可定制化
安装
复制dynmap-*.jar 进你的补丁文件夹. 如果用于更新, 删除之前安装的 dynmap-*.jar - 你不需要删除任何补丁/地图文件夹或者它的文件。
如果你正在运行一个独立网页服务器 (比如 Apache) 你可能需要先复制文件'plugins/dynmap/web/' 到你的http-root的一个文件夹,里然后再执行此教程。升级时,请确保你也升级了被复制的文件。
第一次使用
当你开启 CraftBukkit 时, 你应该可以在浏览器里跳转到 http://yourserverip:8123/(http://你服务器的IP:8123/)。 如果你是用你现在正在使用的PC来运行 CraftBukkit, 你可以跳转到 http://localhost:8123/。
你应该能够看到在游戏内的玩家。 需要注意的是此时地图还未被渲染, 所以背景应该是黑色的。
如果你计划使用高清渲染, 现在你就可以着手做这件事了。开启configuration.txt顶端的 'deftemplatesuffix: hires' 。更多关于deftemplatesuffix的信息可在基础补丁设置查看。
如果你只是想让Dynmap有效, 在游戏里使用这个命令 /dynmap fullrender。 wiki上有更多关于命令和权限的内容。
地图此时应该会显露出来,给它一些时间。程序信息之后会显示 Dynmap 正在工作 (Dynmap is working) 和 渲染已完成 (render is completed)。
相关
Bukkit论坛 (已失效) Bukkit项目页面 IRC: irc://irc.esper.net/#dynmap (via web)
如何使用=
在无内部网页服务器环境使用
This page assumes
- You are reasonably experienced with the standalone web server you are using.
- You have the standalone web server and CraftBukkit running on the same machine.
- Your Web Server supports PHP. (Only needed for web-to-Minecraft chat)
- If you are on Linux, you should know how to use the terminal and chmod.
Change the following:
- class: org.dynmap.InternalClientUpdateComponent sendhealth: true allowwebchat: true webchat-interval: 5 #- class: org.dynmap.JsonFileClientUpdateComponent # writeinterval: 1 # sendhealth: true # allowwebchat: false
To:
#- class: org.dynmap.InternalClientUpdateComponent # sendhealth: true # allowwebchat: true # webchat-interval: 5 - class: org.dynmap.JsonFileClientUpdateComponent writeinterval: 1 sendhealth: true allowwebchat: false
To disable the internal updating mechanism and enable the json-file updating mechanism. This will write to the file standalone/dynmap_world.json in your web-path at an interval that is specified with writeinterval.
Copy your files in plugins/dynmap/web to a directory of your webserver. Change configuration.txt so that it points with both tilespath and webpath to the paths where you placed the web-files. For *nix
# The path where the tile-files are placed. tilespath: /path/to/web/server/dynmap/web/tiles
The path where the web-files are located. webpath: /path/to/web/server/dynmap/web
Or for Windows
The path where the tile-files are placed. tilespath: c:\\path\\to\\web\\server\\dynmap\\web\\tiles
The path where the web-files are located. webpath: c:\\path\\to\\web\\server\\dynmap\\web
Now restart your Minecraft server. Join your Minecraft server and place a few blocks (randomly) to trigger dynmap to generate tiles for your map. You can also type dynmap fullrender worldname in your server console to render the whole world with the name worldname.
Now refresh your browser. It should now display online players on http://mywebserver/dynmap/, keeping them up-to-date.
Troubleshooting
If you don't see any tiles on the map, check the tiles directory to see whether they get actually generated. If there are no tiles, it is likely that Minecraft does not have rights to write the tiles in the web-path directory your chose. Another possibility is that you have not filled in tilespath correctly.
If you don't see any players or don't see the players moving, go to http://mywebserver/standalone/dynmap_world.json (where world is the name of your world). You should see some code and hitting refresh every few seconds should change that code (the servertime should be updated). If this file is not there or you don't see the file changing, you likely have filled in the wrong webpath in the configuration.
In Linux, if web-to-mc-chat does not work, you also need to chmod the 'standalone' folder to 775 or 777:
$ chmod -R 775 standalone This is to allow sendmessage.php to create the jsonfile. This is needed because its your Web Server creating the file and not the minecraft server.
If web-to-mc-chat does not work on IIS, you likely need to install PHP.
在Linux环境使用
This page assumes:
- Your Minecraft-server directory to be: /opt/minecraft_server/.
- You have the latest CraftBukkit installed.
- Your Minecraft server is hosted at localhost.
To install and test dynmap:
- Copy the file dynmap.jar and the folder dynmap to /opt/minecraft_server/plugins/.
- (Re)start your Minecraft server.
- Join your Minecraft server.
- Place a few blocks.
- Open up your browser.
- Navigate to http://localhost*:8123/.
You should see your map with your name in the top-left. Once you click on your name, the map will pan to your location and your should see a part of the map that has been generated.
Publishing
If you want the map to be accessible for others, you have two options:
- Forward an external port to your internal minecraft server with TCP port 8123. For more information on port-forwarding: http://portforward.com/.
- Host the map partly on your big webserver. Note that the webserver must already have access to the Minecraft server. See below.
Big Webservers
If you are hosting a Apache or lighttpd server, you might want to be able to get to the Dynmap-map from the same url as your website. Like http://www.yourwebsite.com/dynmap/ instead of http://www.yourwebsite.com:8123/. If this is the case, you can pick your webserver from the list below.
- apache2 under Debian/Ubuntu: Setting up Dynamic Map with Apache2 under Debian
- apache/httpd under Arch Linux: Setting up Dynamic Map with apache/httpd under Arch Linux
- lighttpd under Arch Linux: Setting up Dynamic Map with lighttpd under Arch Linux
- nginx Setting-up-with-Nginx-server-on-Centos (courtesy of LukeHandle)
在Windows环境使用
This page assumes:
- Your Minecraft-server directory to be: D:\minecraft_server\.
- You have the latest CraftBukkit installed.
- Your Minecraft server is hosted at localhost.
To install and test dynmap:
- Copy the file dynmap.jar and the folder dynmap from the zip-file to D:\minecraft_server\plugins\.
(Re)start your Minecraft server.
- Join your Minecraft server.
- Place a few blocks.
- Open up your browser.
- Navigate to http://localhost:8123/.
You should see your map with your name in the top-left. Once you click on your name, the map will pan to your location and your should see a part of the map that has been generated.
Publishing
If you want the map to be accessible for others, you have two options:
- Forward an external port to your internal minecraft server with TCP port 8123. For more information on port-forwarding: http://portforward.com/.
- Host the map partly on your big webserver. Note that the webserver must already have access to the Minecraft server. See below.
Big Webservers
If you are hosting a IIS or any other webserver, you might want to be able to get to the Dynmap-map from the same url as your website. Like http://www.yourwebsite.com/dynmap/ instead of http://www.yourwebsite.com:8123/. If this is the case, you can pick your webserver from the list below.
- IIS: Setting up Dynamic Map with IIS using URL rewrite and ApplicationRequestRouting (thanks to Kekec852!)
- IIS: Setting up Dynamic Map with IIS
(This is not really a list eh? If you have another server and know how to configure it, please add it to the wiki)
在虚拟主机环境使用
In general, this does not work, as the providing of tile files by Dynmap for serving by the host's web server typically requires file system access (versus the FTP or SFTP based file delivery most hosting services allow). Below are some links to unofficial procedures that some of our users have successfully used with specific hosting solutions:
Dynmap On Xenon Hosting Service, courtesy of mavbear
插件设置
命令
命令列表 |
---|
Hiding and showing players /dynmap hide: Hides the player from the map. /dynmap render: renders one tile of the map where you are standing. |
权限
权限列表 |
---|
SuperPerms-based access control, including specific support for PermissionsEx, BukkitPermissions, bPermissions, and classic Permissions. The following nodes are defined: dynmap.render - allows /dynmap render command |
网页UI参数
使用标记
自定义方块定义
用Wavefront OBJ格式传输世界数据
其他
为了展示API,同时也为了协助管理这个已经非常庞大的补丁,我们已经开始了为Dynmap增加额外补丁的进程。所有这些工作都依赖于经由API的Dynmap和接口,只有对这些功能感兴趣的人们才会添加这些附加功能,这些功能有:
dynmap-mobs: 在dynmap地图上提供指定生物的实时位置。
dynmap-residence: 继承 'regions' (地区)以支持Residence在Dynmap中的使用, 实时更新Residence的改变。
Dynmap-WorldGuard: 继承 'regions' (地区)以支持WorldGuard 在Dynmap中的使用, 实时更新WorldGuard的改变。
Dynmap-Towny: 继承 'regions' (地区)以支持Towny在Dynmap中的使用, 实时更新Towny的改变。
Dynmap-Factions: 继承 'regions' (地区)以支持Factions在Dynmap中的使用, 实时更新Factions的改变。
Dynmap-CommandBook: 使用CommandBook,添加对显示/home和/warp 位置的支持。
Dynmap-Essentials: 使用Essentials,添加对显示/home和/warp 位置的支持。
Dynmap-GriefPrevention: 添加对显示Grief Protection claims(保护占领)的支持。
Dynmap2CraftIRC3: 通过CraftIRC,将Dynmap的网页聊天与IRC相结合。
Dynmap-SimpleClans: Dynmap的网页聊天与SimpleClans 相结合。
Dynmap-HeroChat: 结合Herochat v5.5+ 与Dynmap。
Dynmap-PhysicalShop
Dynmap-pyLandmarks
Dynmap-PreciousStones: 结合PreciousStones 与Dynmap。
Dynmap-AdminCmd: 结合AdminCmd与Dynmap。
Dynmap-PlayerWarp
Dynmap-Citizens: 结合Citizens与Dynmap。
开发者相关
Dynmap 插件由多个部件组成,用于支持多平台服务器,同时为了让我们的“已发布API”能被更好的理解。组成dynmap插件的必须部件 (用于Bukkit的Dynmap 补丁)在下文列出:
DynmapCoreAPI - 这是用于Dynmap的 neutral API 平台: 插件开发者能以此作为 Dynmap与任何平台的接口(通过指向dynmap 补丁实例 org.dynmap.DynmapCoreAPI 实现)
DynmapCore - 这是Dynmap的 server-neutral 核心: 几乎所有Dynmap的网页和渲染逻辑都在这(尽我们所能的放进去)。 这样开发的结果就是不可运行 - 所以他们都被放进了 'dynmap' 及其他部件开发里(例如 'DynmapSpout', 是用于 Spout 服务端的).
dynmap-api - 这是dynmap专用于Bukkit(Bukkit-specific)的 API 库 - 它定义了 org.dynmap.DynmapAPI 的接口,包括对 Bukkit-specific 的调用。 还包括 DynmapCoreAPI ( DynmapCoreAPI 是 DynmapAPI 的拓展), 即将补丁实例为 'dynmap' 之后指向 org.dynmap.DynmapAPI 然后接入公共接口。 dynmap - 这个部件让了 dynmap-for-Bukkit 真正的可用, 只包含了不可运行为server-neutral的代码。
兼容性
The following mods are known to support dynmap integration without needing an add-on:
DeathTPPlus xWarp Vanish No Packet Ultimate Core Also, for the best response to questions and such, please post comments to our main forum thread - http://www.minecraftforum.net/topic/1543523-dynmap-dynamic-web-based-maps-for-minecraft/. Once again, having more than one place just isn't helpful, and this is where the 'Dynmap Community' already operates.
被公开的信息
This plugin utilizes Hidendra's plugin metrics system, which means that the following information is collected and sent to mcstats.org:
A unique identifier The server's version of Java Whether the server is in offline or online mode The plugin's version The server's version The OS version/name and architecture The core count for the CPU The number of players online The Metrics version
How to compile Dynmap 还有许多页面没有搬运,会尽快补充请谅解