ClearEntity

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 <http://www.gnu.org/licenses/>.


Comments

Posts Quoted:
Reply
Clear All Quotes

About This Project

Categories

Members