EntityAdmin(原名 ClearEntity)是一组旨在让你能够在 CraftBukkit Minecraft 服务器上控制和维护实体的命令。我编写这个插件是因为我遇到了几个问题,而这些问题可以通过选择性从服务器中移除实体来轻松解决。
EntityAdmin 经过设计与测试,可兼容 Minecraft 1.2.5 版本下当前推荐的 CraftBukkit 发布构建版 2149。
用法
有关所有实体及其所属分组的完整列表,请参阅 Entities.txt 文件。
请注意,分组名称已改为复数形式,例如“monsters”和“animals。”
/clearentity <entity> [world]
如果在游戏内执行此命令,则世界名称为可选参数。如果未提供世界名称,ClearEntity 将假定玩家希望从其当前所在的世界执行该命令。如果从控制台执行此命令,则必须提供世界名称。实体名称和世界名称均不区分大小写。此命令自上一版本以来基本未作更改。
示例:
- /clearentity skeleton midgar
这将移除名为 midgar 的世界中的所有骷髅实例。
- /clearentity pigzombie midgar_nether
这将移除 midgar nether 中的所有猪僵尸实例。
- /clearentity tntprimed midgar
这将移除所有已点燃的 TNT,并有可能减轻服务器的卡顿情况。
- /clearentity item midgar
这将移除地面上的所有物品。如果你用 VoxelSniper 把一座巨大的塔变成了蘑菇,这会很有用。
- /clearentity boat midgar
清理玩家遗留在水面或陆地上的船只。
- /clearentity monsters midgar
移除所有怪物。
- /clearentity animals midgar
移除所有动物。请注意,这也会移除你正在繁殖或用于养殖的动物,以及任何已被驯服的狼。
- 别名
/clearen
/clen
/clearentitynear <entity> <radius>
此命令的效果与 clearentity 相同,但可以指定一个范围。它将移除给定半径内的所有实体,并保持世界的其余部分不变。由于此命令的效果以玩家为中心,因此无需指定世界名称,且无法从控制台执行此命令。
示例:
- /clearentitynear denizens 100
移除距离玩家 100 格以内的 denizens 分组中的所有成员。
- 别名
/clnear
/countentity <entity> [world]
countentity 的使用方式与 clearentity 相同,但它会统计实体数量而不是移除它们。关于世界名称的规则同样适用。
示例:
- /countentity painting midgar
统计名为 Midgar 的世界中的画作数量。
- 别名
/cten
/counten
/countentitynear <entity> <radius>
与 clearentitynear 类似,此命令正如字面意思所示:它会统计玩家附近的实体数量,但仅在指定的玩家半径范围内进行统计。
示例:
- /countentitynear slime 50
统计距离玩家 50 格以内的史莱姆数量。
- 别名
/ctnear
/findentity <entity>
findentity 会找到最近的指定实体并将玩家传送至其位置。与其他命令不同,它不接受分组名称,必须指定精确的实体名称。请提前注意,如果你没有通过某种方式(例如处于创造模式)获得无敌状态,敌对实体仍会攻击你。此命令目前不支持作为参数传入世界名称。
示例:
- /findentity creeper
找到最近的苦力怕实体,如果存在,则将玩家传送至其位置。
- 别名
/fen
/finden
权限
EntityAdmin 针对 PermissionsBukkit 进行了优化。权限将从控制台授予、服务器操作员授予,或拥有指定权限的人授予。
- entityadmin.*
授予对所有命令、实体和实体分组的访问权限。
- entityadmin.clearentity
授予对 clearentity 命令的访问权限。
- entityadmin.entity.*
授予对所有实体和实体分组的访问权限。
- entityadmin.entity.monsters
授予对 monsters 实体分组的访问权限。
- entityadmin.entity.arrow
授予对 arrow 实体的访问权限。
请注意,授予某个实体分组的权限并不会自动授予该分组内各个实体的权限。
计划
我在业余时间开发 EntityAdmin。源代码不如我希望的那样整洁。虽然组织代码在我的优先级列表中不如添加新功能高,但我一直把它放在心上。
列表更高处的一项功能是添加一个配置文件,允许自定义实体组。我认为合适的实体组设置可能与他人的不同,我希望每个服务器管理员都能在不重新编译插件的情况下自行更改这些配置。
在自定义功能方面,我希望能添加一项设置,用于限制 clearentitynear 命令的作用半径。同时,也希望能支持为名称较长的实体设置别名,例如将 experienceorb 简化为 exp。
我感觉 countentity 命令需要增加一个标志位,以便在使用组名时生成更详细的报告。
我还希望增加一项功能,提供更多对实体行为的控制。例如,控制实体的生成位置、生成数量以及它们的游荡或爆炸范围。此外,还应支持配置在特定区域内立即移除投射物。
预计后续还会有更多改动。
许可证
本程序是自由软件:你可以根据自由软件基金会发布的 GNU 通用公共许可证(许可证版本 3,或根据你的选择任何更高版本)的条款重新分发和/或修改它。
本程序的发布是希望它能有所帮助,但不提供任何明示或暗示的担保,包括不保证适销性或适用于特定用途。有关更多细节,请参阅 GNU 通用公共许可证。
你应该已经随本程序收到了一份 GNU 通用公共许可证的副本。如果没有,请访问 <> 查看。
EntityAdmin, formerly named ClearEntity, is a set of commands designed to enable entity control and maintenance for your CraftBukkit Minecraft server. I wrote this plugin because I have encountered several issues that could be easily resolved by having the ability to selectively remove entities from the server.
EntityAdmin is designed and tested to be compatible with the current recommended CraftBukkit release build of 2149 for Minecraft version 1.2.5.
- Click here for change log.
Usage
For a complete list of entities and the groups they have been assigned to, see the Entities.txt file.
Note that group names have been changed to pluralized words, such as "monsters" and "animals."
/clearentity <entity> [world]
Specifying a world name is optional if the command is run from in the game. If no world name is supplied, ClearEntity will assume the player wants to run the command from his/her current world. If the command is run from the console, a world name must be supplied. Neither the entity name nor world name are case sensitive. This command has been left virtually unchanged since the previous version.
Examples:
- /clearentity skeleton midgar
This will remove all instances of skeleton in the world named midgar.
- /clearentity pigzombie midgar_nether
This will remove all instance of pigzombie in the midgar nether.
- /clearentity tntprimed midgar
This will remove all instances of primed tnt and could potentially unlag your server.
- /clearentity item midgar
This will remove any items on the ground. Useful if you turned a giant tower into mushrooms with VoxelSniper.
- /clearentity boat midgar
Cleans up boats that have been left lying around by players.
- /clearentity monsters midgar
Remove all monsters.
- /clearentity animals midgar
Remove all animals. Bear in mind that this will remove any animals you are breeding or using for farming purposes as well as any tamed wolves.
- Aliases
/clearen
/clen
/clearentitynear <entity> <radius>
This command has the same effect as clearentity except that a boundary may be specified. It will remove all entities within a given radius and leave the rest of the world unchanged. Because the effect of this command is orientated near the player, a world name does not need to be specified and this command cannot be run from the console.
Example:
- /clearentitynear denizens 100
Remove all members of the denizens group within 100 blocks of the player.
- Alias
/clnear
/countentity <entity> [world]
Countentity is used in the same manner as clearentity except that it will count the entities instead of remove them. The same rules apply for the world name.
Example:
- /countentity painting midgar
Count the number of paintings in the world named Midgar.
- Aliases
/cten
/counten
/countentitynear <entity> <radius>
Like clearentitynear, this command does exactly what it says: it counts the entities near the player, but it does so within a specified radius of the player.
Example:
- /countentitynear slime 50
Count the number of slimes within 50 blocks of the player.
- Alias
/ctnear
/findentity <entity>
Findentity will find the nearest specified entity and teleport the player to its location. Unlike other commands, it does not accept group names and a precise entity name must be specified. Be forewarned that hostile entities will still attack if you are not invulnerable by some means, such as being in creative mode. This command does not currently accept a world name as an argument.
Example:
- /findentity creeper
Finds the nearest creeper entity and teleports the player to its location if it exists.
- Aliases
/fen
/finden
Permissions
EntityAdmin is optimized for use with PermissionsBukkit. Permission will be granted from the console, to server ops, or people with the specified permissions.
- entityadmin.*
Grants access to all commands, entities, and entity groups.
- entityadmin.clearentity
Grants access to the clearentity command.
- entityadmin.entity.*
Grants access to all entities and entity groups.
- entityadmin.entity.monsters
Grants access to the monsters entity group.
- entityadmin.entity.arrow
Grants access to the arrow entity.
Note that giving permission to an entity group does not give permission to the entities within.
Plans
I work on EntityAdmin in my spare time. The source code is not as clean as I would like it to be. Organizing it is not as high on my priority list as adding more features, but it is in the back of my mind.
Higher up on that list is adding a config file where the entity groups may be customized. My idea of a good set of groups may differ from someone else's and I would like that to be something each server admin has the ability to change without having to recompile the plugin.
Among customizations, I would like to add a setting for putting a limitation on the radius of clearentitynear. And possibly aliases for entities with longer names, such as experienceorb -> exp.
I have a feeling that countentity needs a flag for more detailed reports when using a group name.
One feature I would like to see added is more control over the behavior of entities. Such as, where they may spawn, how many may spawn, and where they may wander, or detonate. Add configurations for the immediate removal of projectiles in a given area.
Expect to see more changes.
License
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <>.
评论 0
登录后参与评分
还没有评论,来抢沙发吧