Ranged Wolves
RangedWolves - Bring out your hunting dogs!
Version: v1.0.2 - CB 1988 (1.1-R6)
Inactive until further notice!
Until setting targets for Wolves is fixed in CraftBukkit, I will not be releasing any updates. I will continue to add in any suggestions you may have, if I so choose, but I don't want to release something that doesn't work to the public. The builds I have now (1.0.2, 1.1, 1.2-Dev) don't even work for me, so they won't work for you.
This plugin allows for having your pet wolves attack your ranged target. In other words: if you attack a creature or player with any sort of projectile (arrow/snowball/etc), your wolves will attack that target!
I had been looking for this feature for a while and hadn't come across it, so I took it upon myself to build my java skills and make it happen!
Mob Arena is NOT required, however it is an awesome plugin.
If you do have Mob Arena, this is built against v0.94.4.64! This is a Dev build of MobArena, found here. I'd highly recommend giving it a try, and reading the changelog for it.
Many thanks to @garbagemule for helping me throughout the ordeal, and teaching me stuff about Java I didn't realize/learn yet in school. And also for making Mob Arena :)
Features:
- Makes wolves attack your ranged Targets
- Configurable for each World and (if applicable) each Arena
- Checks for World PvP (and MobArena PvP)
- 3 simple commands
- "/rw reload" - reloads the configuration file
- "/rw reloadMA" reruns the Mob Arena setup code and auto reloads
- Ops only (and console)
- "/rw retro" - searches for nearby wolves not already associated with their owner
- Anyone can use this
- Hopefully not required
- "/rw reload" - reloads the configuration file
- Very few permission nodes required, see here
Downloads/Links:
- Source Code - Github (also included in the jar file)
- Github (supposedly wget friendly)
- DropBox
Forum:
Configuration:
Things to know about the config.yml
Permissions:
Permission nodes: see here
NOTE! If not running any sort of permissions plugin, this should run as it always has, everyone can use it, and Ops get access to the reload commands
TODO:
- Any ideas will be considered (But not necessarily implemented)
- Edit the way the config works. See this comment for how it will end up working.
- Ensure wolves stay associated with their owner after server shut down/restart
- Unless there's an easy way to get Wolves by their Unique IDs that I'm completely overlooking, this isn't happening any time soon.
Known Issues:
- While testing on 1.2.X builds, I've noticed wolves don't actually go attack your target, even after playing with my code.
- Server restarts still don't retain the relationships, although relogging and reloading does retain them.
Submitting a bug report:
- Please provide as much information as you can so I can make bug fixes as quickly as possible
- Please include:
- CraftBukkit Build
- MobArena Version number (if applicable)
- StackTrace from your server.log file (if applicable)
- Reproduction steps to help me track down and squash these nasty bugs!
- The more detailed these are, the better!
Changelog:
Version 1.0.2 - 3/11/12
- Fixed checking Max Wolf cap for offline players, they were able to get as many wolves as they could before, now they're capped.
- Unfortunately, even if the player has permission to bypass the cap, I can't check an offline player's permissions.
- Cleaned up the onEntityDamage listener some.
- Fixed "/rw retro" command, it now takes into account if a nearby wolf's owner is offline or not, and the command now obeys the Max Wolf cap
- Added checks to the "/rw reloadMA" command to make sure MobArena is on the server and enabled before running the reloads
- Cleaned up "/rw reloadMA" command too
- Added a return to onEntityTame to make sure I don't add untamed wolves to a player's list and falsely inform the player they tamed a wolf
- Removed more references to my WIP targetting for now.
@dasbreen Aw :( I hope it get fixed soon. This plugin is essential.
@nhoclesnar
yea, unfortunately it's part of my Known Issues :( I'm not sure why, even on my current build I can't get it to work. I've commented on a bukkit bug on their bug tracker about it, but there hasn't been any progress on it since before the 1.2 RB came out. As soon as that gets fixed, I can get testing and make sure stuff works again
@dasbreen Thank you please implement it :) Btw is it plugin out of date? :( I am OP and I have '*' permission, but my wolves respond my ranged attack. I even tried to add RangedWolves.Worlds and RangedWolves.Retro but still doesn't work. P.S. My world name is world. There definitely is nothing wrong with my config.
@nhoclesnar
from what I've seen, this already happens in general. However, when in an Arena, this is not the case. Plus I think MobArena makes the pets invincible. I'll look into it some while I mess around with the targetting stuff I'm hoping to implement, but no guarantees
nice plugin but can you make mobs attack wolves? it seems like other mobs, for example zombies, don't attack the wolves back when the wolves hurt them. i don't want ppl to just run around dodging while the wolves do all the attacking.
Wait a minute...it doesn't work for 1.2.4 :O
@4am
I've thought about doing that, but the way I do it now is similar, and I don't need to store UUID's anywhere. Also, any chunks that have tamed wolves I believe stay loaded, so it should still catch them at that point in the "world.getLivingEntities()" call. I also only call it once per world, and only when a player teleports to that world
What I wish there were was a way to get said Entity by passing the UUID to the method, and have it return the entity I'm looking for. So a server.getEntityByUUID(UUID uniqueID) type of thing. If there were such a thing, I'd definitely store the UUID's and have it get all known pets on server start up.
To get the unique IDs for Wolves (or anything derrived from Entity) use Entity.getUniqueId() to return a persistent UUID for that entity.
WHen you onEnable, use World.getEntitiesByClass() to find all the wolves in a given world as a Collection, and then look for UUIDs that match your data (with which you stored that UUID) and store a reference to the obejct (so you only need get the Collection once).
I'm not sure if the chunk needs to be loaded to have getEntitiesByClass() return everything; you may need to watch for chunk load events and call it each time. I'm not sure if there would be a lag penalty for that.
This is great,thanks!
@Pandamatak
When I get home later today I'll try to touch up my targetting stuff, as I'd hate to release something that isn't working properly and be aware of it
Although... It will require people to use the MobArena Dev builds if any at all, seeing as how the 94.3.24 version from 1.8Beta doesn't work on 1.1-R5+
When I upload it, I'll let you know :)
Could you please update to 1.2.3 beta and PM me when it's available?
So you're not all in the dark, I'm working on my local build some more, trying to update the targetting of the Wolves. Before, I would merely just send the wolves off after whatever you shot last.
Now I'm working on making them go in order from first mob shot to last mob shot, no repeats. In my tests, it's working intermittenly, and I think it's because when I shoot enderment then teleport out of range to attack, and the wolves get hung up on it. I'll be working on that more as the MobArena Dev builds get closer to being released.
Until then though, PM me if you're using the latest Dev builds of MobArena (up to 94.4.47, .48 breaks my dev build again but it's fixed locally for me :P)
@genesis_aix
I sure am! I have a build ready to go that will work when R5 hits, but I'm waiting for MobArena to release a stable version, as I don't want to support a Dev version of it. I learned my lesson from the past couple of updates to this :P
Are you working on a R5 release dasbreen? Love this plug =)
@erdrickk
whoops! silly error on my part. Check your PM for an updated version :)
@ dasbreen
Your new version that you PM'ed me has been working pretty decent so far but lately with Bukkit 1.1 R4 ive been getting alot of these errors:
If you're using one of the latest versions of MobArena dev builds (94.4.31+), v0.8.8 (either version) of RangedWolves will NOT work. If you want, I can provide you a link to the current build I have compiled against these versions, but have not released since I'm waiting for MobArena to release a stable build.
PM me if you'd like to try out this version. :)
@genesis_aix
I'm glad you're enjoying it :)
due to a user request, the next update is going to have a cap as to how many wolves you can have. If you already have more than the cap, I will not be taking them away, however.
Keep any ideas you may have coming!
This plugin is a must together with wolvesonmeds and angrywolves. Glad to see you have not given up on it =)
I've begun working on building this against the 1.1 RB that just came out. I'm going to wait until a stable build of MobArena for 1.1 also comes out so I don't have to keep doing 2 different versions of this. From what I can tell, 0.8.8 should still work, but I could be wrong.
@erdrickk
What permissions handler are you using? Also, you say Ops can and non-ops can't? By default everyone should be able to have their wolves attack their targets. So haven't Ops able to and non-ops unable to doesn't even make sense in the scheme of how I set up the plugin :-/
If you're using PEX, try all lowercase permissions (rangedwolves.worlds & .arenas) and see if that alleviates the issue.