iSpawner
Quote from Siguza:The Future?
Since Spigot is still standing and Sponge is slowly getting somewhere, I'm not exactly sure what to do with my plugins, but I'll stick around.
I think I will port most of my plugins to Sponge, but some (like NBTLib) will hopefully not be necessary anymore.
For now, I've set all my projects to "inactive", except for VirtualPack, which I will keep compatible with Spigot, until I ported it to Sponge. If you really want to see any of my other plugins updated to Spigot, just comment on its project page.
iSpawner
[ Download ] [ Source ] [ Format reference ]
Edit every attribute of your mob spawner - using commands and/or templates.
How to use
Installation
- Download NBTLib and move it to your plugins folder.
- Download the iSpawner.jar and move it into the plugins folder.
- Start your server.
Config
Node | Possible values | Description |
---|---|---|
check-update | true or false | Whether to check for updates or not. |
Commands
Note 1: The actual command is "/ispawner", but there's the a short version: "/isp"
Note 2: Red arguments have to be given, blue ones can be omitted (depending on what you're doing)
Command | Description | Required Permission |
---|---|---|
/isp | Show the help | - |
/isp version | Show the version of iSpawner | - |
/isp start | Execute this command and click a block to start a session. | ispawner.use |
/isp start (world) (x) (y) (z) | Start a session in world world at position x/y/z. | ispawner.use |
/isp cancel | End the session and discard changes. | ispawner.use |
/isp end | End the session and apply changes. | ispawner.use |
/isp set (path) (type) [value] | Set an NBT tag to a certain value. Important: If type is list, compound or "-" (= delete tag), you don't need to give a value, otherwise you do. | ispawner.use.admin |
/isp import (name) | Import the file iSpawner/data/name.txt. | ispawner.import and ispawner.import.name or ispawner.import.admin |
/isp export (name) | Export the current spawner to iSpawner/data/name.txt. | ispawner.export |
/isp export override (name) | Export and override iSpawner/data/name.txt. | ispawner.export.admin |
/isp info | Print all the data of the current spawner. | ispawner.use |
/isp types | Show all possible NBT types. | ispawner.use |
Permissions
Node | Effect | Child nodes |
---|---|---|
ispawner.use | Allows the use of iSpawner commands | |
ispawner.use.admin | Allows to edit spawners directly via commands | ispawner.use |
ispawner.import | Allows to import templates | |
ispawner.import.admin | Allows to import every template | ispawner.import |
ispawner.export | Allows to create templates from spawners | |
ispawner.export.admin | Allows to overwrite existing templates when exporting | ispawner.export |
ispawner.update | Notifies you of new iSpawner versions | |
ispawner.admin | Full iSpawner access | ispawner.import.admin ispawner.export.admin ispawner.use.admin ispawner.update |
Dev Builds
Quote:Development builds of this project can be acquired at the provided continuous integration server. These builds have not been approved by the BukkitDev staff. Use them at your own risk!
[ Dev Builds ]
Donation
Is of course always appreciated. :)
Just a suggestion for future versions - it would be great if there was a command to run text files saved to the plugins directory. This way "templates" could be made for spawners which are easily edited and shared. eg your cake carrying Endermen could have all it's commands saved in say "endermencake.txt" and would shorten the process to:
/edit start /edit file endermencake.txt /edit end
This would save a lot of time....especially with spawners like I posted on the previous page that have 27 lines! :)
Careful updating CB to one of the recent dev builds, this plugin and a lot of others, seem to be broken because of some API changes (#2512 I think). I hear it only requires re-compiling but dunno for sure.
2012-12-08 16:21:24 [INFO] This server is running CraftBukkit version git-Bukkit-1.4.5-R0.2-29-g3956289-b2518jnks (MC: 1.4.5) (Implementing API version 1.4.5-R0.3-SNAPSHOT) 2012-12-08 16:21:24 [SEVERE] Could not load 'plugins\iSpawner.jar' in folder 'plugins' org.bukkit.plugin.InvalidPluginException: java.lang.NoClassDefFoundError: net/minecraft/server/NBTBase at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:154) at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:305) at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:230) at org.bukkit.craftbukkit.v1_4_5.CraftServer.loadPlugins(CraftServer.java:227) at org.bukkit.craftbukkit.v1_4_5.CraftServer.<init>(CraftServer.java:205) at net.minecraft.server.v1_4_5.ServerConfigurationManagerAbstract.<init>(ServerConfigurationManagerAbstract.java:51) at net.minecraft.server.v1_4_5.ServerConfigurationManager.<init>(SourceFile:11) at net.minecraft.server.v1_4_5.DedicatedServer.init(DedicatedServer.java:111) at net.minecraft.server.v1_4_5.MinecraftServer.run(MinecraftServer.java:398) at net.minecraft.server.v1_4_5.ThreadServerApplication.run(SourceFile:856) Caused by: java.lang.NoClassDefFoundError: net/minecraft/server/NBTBase at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:143) ... 9 more Caused by: java.lang.ClassNotFoundException: net.minecraft.server.NBTBase at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:34) at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:29) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 12 more
Updated my post, apologies for the omission ataranlen!
@ataranlen
I suggest removing the spawner via MCEdit, WorldEdit or something similar, placing it again and the using Jaiph's commands, but executing the 17th command 4 times. (This is because the nature of a list in java, you can't just add the 4th element if the 3rd doesn't exist, I'm sorry about that.)
@Jaiph
I tried to copy your exact code, but on line 18 "/edit data Equipment.4.id short 397" It threw an error, and now my server crashes when I log in near that spawner Even after removing the plugin.
2012-12-05 12:41:21 [SEVERE] net.minecraft.server.ReportedException: Loading entity NBT 2012-12-05 12:41:21 [SEVERE] at net.minecraft.server.Entity.e(Entity.java:1194) 2012-12-05 12:41:21 [SEVERE] at net.drgnome.ispawner.DerpPlugin.onCommand(DerpPlugin.java:390) 2012-12-05 12:41:21 [SEVERE] at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) 2012-12-05 12:41:21 [SEVERE] at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:186) 2012-12-05 12:41:21 [SEVERE] at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:502) 2012-12-05 12:41:21 [SEVERE] at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:985) 2012-12-05 12:41:21 [SEVERE] at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:903) 2012-12-05 12:41:21 [SEVERE] at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:858) 2012-12-05 12:41:21 [SEVERE] at net.minecraft.server.Packet3Chat.handle(Packet3Chat.java:44) 2012-12-05 12:41:21 [SEVERE] at net.minecraft.server.NetworkManager.b(NetworkManager.java:290) 2012-12-05 12:41:21 [SEVERE] at net.minecraft.server.NetServerHandler.d(NetServerHandler.java:113) 2012-12-05 12:41:21 [SEVERE] at net.minecraft.server.ServerConnection.b(SourceFile:39) 2012-12-05 12:41:21 [SEVERE] at net.minecraft.server.DedicatedServerConnection.b(SourceFile:30) 2012-12-05 12:41:21 [SEVERE] at net.minecraft.server.MinecraftServer.r(MinecraftServer.java:595) 2012-12-05 12:41:21 [SEVERE] at net.minecraft.server.DedicatedServer.r(DedicatedServer.java:222) 2012-12-05 12:41:21 [SEVERE] at net.minecraft.server.MinecraftServer.q(MinecraftServer.java:493) 2012-12-05 12:41:21 [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:426) 2012-12-05 12:41:21 [SEVERE] at net.minecraft.server.ThreadServerApplication.run(SourceFile:856) 2012-12-05 12:41:21 [SEVERE] Caused by: java.lang.IndexOutOfBoundsException: Index: 3, Size: 3 2012-12-05 12:41:21 [SEVERE] at java.util.ArrayList.rangeCheck(Unknown Source) 2012-12-05 12:41:21 [SEVERE] at java.util.ArrayList.get(Unknown Source) 2012-12-05 12:41:21 [SEVERE] at net.minecraft.server.NBTTagList.get(SourceFile:74) 2012-12-05 12:41:21 [SEVERE] at net.minecraft.server.EntityLiving.a(EntityLiving.java:1145) 2012-12-05 12:41:21 [SEVERE] at net.minecraft.server.EntityZombie.a(EntityZombie.java:201) 2012-12-05 12:41:21 [SEVERE] at net.minecraft.server.Entity.e(Entity.java:1148) 2012-12-05 12:41:21 [SEVERE] ... 17 more
@Roflzack
/edit start
(click the spawner)
/edit mob Skeleton
/edit data ActiveEffects list
/edit data ActiveEffects.0 compound
/edit data ActiveEffects.0.Id byte 5
/edit data ActiveEffects.0.Amplifier byte 1
/edit data ActiveEffects.0.Duration int 400
/edit data ActiveEffects.0.Ambient bool false
/edit data Equipment list
/edit data Equipment.0 compound
/edit data Equipment.0.id short 272
/edit data Equipment.0.Damage short 0
/edit data Equipment.0.Count byte 1
/edit data Equipment.1 compound
/edit data Equipment.2 compound
/edit data Equipment.3 compound
/edit data Equipment.4 compound
/edit data Equipment.4.id short 301
/edit data Equipment.4.Damage short 0
/edit data Equipment.4.Count byte 1
/edit end
(If "/edit end" fails, try executing "/edit data Equipment.1 -" and the same for 2 and 3 and then "/edit end" again)
@Siguza
Can I have a bit of help with this?
How do I make a spawner that spawns skeletons with stone swords, chainmail helmets, and strength potion effects that last 20 seconds???
@Roflzack
When I get to write my own implementation of the spawner, I can add this. ;)
@andyhuang
I think I'll just add that to the config, then everyone can set it for him-/herself. :)
I know /edit makes sense for you in this context, but edit is also a very generic word. I would recommend you switch the command to /ispawner or /isedit instead, to prevent collision with other plugins (which may potentially also be using bad generic words for command tokens).
Can I use this to make spawners that spawn items? or falling blocks or primed tnt? if not, can you add that feature?
@Mcdumsuker
I think such a config would be possible, but it would then apply to new spawners only or it would override every other setting, so the possibilities are a bit limited.
Can we have a config to set the defaults for ALL spawners? The spawning in my server seems a little too low for our 'liking'. If you can't, can you relocate me to a plugin that ALLOWS for this to be done?
@wally12ads
If the player has the "ispawner.use" permission:
/edit start (then click on the mob spawner)
/edit mob Zombie
/edit end
And it's done. ;)
Im pretty nooby so can someone just type edit mob zombie and it will become a normal spawner like vnilla
@Jaiph
Sir, you're awesome!
Btw, in 1.0.3 strings with spaces will also work ;)
Thanks again, got strings working...kind of, not sure how to do spaces, eg:
/edit data Equipment.0.tag.display.Name string Sword of Testing currently just do /edit data Equipment.0.tag.display.Name string Sword_of_Testing
Anyway, that aside it's working perfectly and I wanted to share an example for people who want to use some of the newer tags:
This would create a Zombie wielding a Sharpness V Looting V diamond sword named Notched_Sword_of_Looting. He will also have Notch's head and pick up any armor, etc he comes across.
One tip, case is critical. Wasted a lot of time trying to get player heads working and in the end I'd forgotten to use Damage instead of damage.
EDIT - forgot to add Count for the equipment. If you don't set this monsters will drop items you can't pick up.
EDIT 2- http://www.minecraftwiki.net/wiki/Chunk_format#Mobs handy!
EDIT 3 - added lines 17-19 as the 1, 2, 3 slots must be created in a list before 4 can be used.
@Jaiph
1. You can browse the minecraft/bukkit code and search for "NBT" there.
2. The tag is called "CanPickUpLoot" (bool).
3. I'm sorry for that error, I just uploaded v1.0.3 with a fix for that.
awesome works perfectly! Certainly understand updating the entity list is time consuming, is there any way I can find out for myself? Only other attribute I'm after for the moment is the one that controls whether a mob will pick up dropped items (I think by default like 1 in 10 zombies have this attribute set).
anyway, thanks for your hard work, this plugin opens up so many options for servers.
EDIT - having issues using "string" to set item names/lore/player head values. Whenever I use string it says "Data Set", but if I then do "/edit info" I get an internal error after the player range value. I am entering the data in this format:
/edit data Equipment.0.tag.display.Name string test
(after having created the appropriate compound for tag, display, etc)
Is this the correct syntax for entering strings? I tried using "", () or [] to encase the string but that didn't help.
@Jaiph
I think it should work, try:
"Equipment" = list
"Equipment.0" = item in hand (compound)
0 = item in hand, 1 = shoes, ..., 4 = helmet (for zombies at least, didn't look up for other mobs).
I'm sorry I didn't keep the tag list up to date, but it's a damn lot of work. :/
Can this have things like zombies spawning with iron swords (as in a lot of recent adv maps)? Tried to play with inventory settings with no luck.