fix spawn doc links and support entities autocomplete

This commit is contained in:
BuildTools 2016-12-20 14:40:00 +00:00
parent 562499c79b
commit 4887fab4bf
3 changed files with 1525 additions and 1479 deletions

File diff suppressed because it is too large Load diff

View file

@ -8,6 +8,9 @@ module.exports = function(entityType, location){
entityTypeFn = entities[entityType.toLowerCase()]; entityTypeFn = entities[entityType.toLowerCase()];
entityType = entityTypeFn(); entityType = entityTypeFn();
} }
if (typeof entityType === 'function'){
entityType = entityType();
}
var world = location.world; var world = location.world;
if (__plugin.bukkit){ if (__plugin.bukkit){
world.spawnEntity( location, entityType); world.spawnEntity( location, entityType);

View file

@ -15,8 +15,8 @@ Allows in-game operators to easily spawn creatures at current location.
This command supports TAB completion so to see a list of possible This command supports TAB completion so to see a list of possible
entitities, type `/jsp spawn ' at the in-game command prompt, then entitities, type `/jsp spawn ' at the in-game command prompt, then
press TAB. Visit press TAB. Visit
<https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/entity/EntityType.html> (CanaryMod) <https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/entity/EntityType.html> (Bukkit/SpigotMC)
or <http://docs.visualillusionsent.net/CanaryLib/1.0.0/net/canarymod/api/entity/EntityType.html> (Bukkit) or <http://docs.visualillusionsent.net/CanaryLib/1.0.0/net/canarymod/api/entity/EntityType.html> (CanaryMod)
for a list of possible entities (creatures) which can be spawned. for a list of possible entities (creatures) which can be spawned.