[INACTIVE][MECH/MISC] ComPassionate v0.2.4 - A Compilation of Useful Compass Features [953]

Discussion in 'Inactive/Unsupported Plugins' started by DrBoweNur, Jun 6, 2011.

  1. Offline

    DrBowe

    ComPassionate - Bringing usefullness back to the compass!
    Version: v0.2.4
    Download: ComPassionate v0.2.4 (JAR)

    THIS VERSION IS NO LONGER SUPPORTED. PLEASE CHECK THE NEW THREAD RIGHT HERE
    ComPassionate v0.2.4 (Bounty Hunter Release)
    So you can stalk her in-game, too...

    Quick video showcasing ComPassionate:


    Development Resumed.

    Shout outs:
    - Huge thanks to Adamki11s for his plugin-making tutorial
    - Huge thanks to rockbeatspaper and Azimuth's source, which helped me figure out how to properly set up HashMap and accesss it via a new class.

    Ever wondered why Notch took the time to add the compass, and then destroyed its use by the creation of beds? If so, then you've been wondering the same thing as me.
    ComPassionate is my very first plug-in, and because of this, it is going to have some bugs to be ironed out. What will it do, exactly? Well, it is going to revolutionize compasses and make them more practical (and immersive) to use. However, as I've only just begun development on this plugin, its current feature is to allow the player to set 'compass nodes', that they can then direct their compass towards. There will be more to come, and fast. :)

    Features:
    • Currently 4 Unique Compass Modes to make your compass experience more enjoyable and practical!
    • Completely internal control (no commands, simply left/right click!)
    • (NEW) Mob Scanner (Compass Mode) Read further down to find out more!
    • (NEW) Bounty Hunter (Compass Mode) Read further down to find out more!
    Commands:
    • /compassionate - lists instruction on how to use the plug-in
    • (NEW) /mobscanner - lists info on how to use the Mob Scanner aspect
    Permissions:
    - None, at the moment

    Usage:

    Compass Mode: Node Tracker
    Show Spoiler

    The Node Tracker was the first feature to be implemented into ComPassionate, but it is certainly not working 'as intended'. What node tracker allows you to do, is set a location that you can then have your compass target at any moment in time. However, in the future, this mode will be expanded to allow multiple nodes, and even names for each location you set! It's like warps, but more immersive, and (of course) more 'hardcore'!
    • Switch to Node Tracker Mode by right clicking with a compass
    • Set a node by left clicking (this can be done while in default, as well)
    • Shift-Left Click will update your compass to follow a new node, and activating Node Tracker Mode will do this as wel

    Compass Mode: Mob Scanner
    Show Spoiler

    The Mob Scanner mode is a feature that was recently implemented in v0.2. In essence, it will scan an area around you (30 x 30) for mobs, select a mob at random, tell you what type of mob it is, and set your compass to follow that mob.
    Usage:
    • Right Click until Mob Scanner Mode is selected
    • Left Click once to scan mobs in the surrounding area
    • Left Click again to update your targets position (this is to keep your compass from leading you to where the mob WAS, as opposed to where it is NOW)
    • If you dont like the mob type its scanning, or dont feel like going to find it, Crouch and Left Click at the same time. This will clear the compass' target, and allow you to start again

    Compass Mode: Bounty Hunter (NEW)
    Show Spoiler

    The Bounty Hunter mode is extremly similar to the Mob Scanner mode, except it will scan players instead of mobs. For this reason, I'm not really gonna give much use info for it. All the steps for the mob scanner, are the same for this. (Just pretend each 'mob' is replaced with 'player'

    There is one difference, however:
    The player-tracking area is 100x100, as opposed to the mob scanner area of 30 x 30.

    Known Issues:
    - Reloading/Restarting the server reverts your node (Issue with HashMap saving/loading
    - Once the direction of the compass is set, you cant go back to having it point at spawn (RESOLVED)
    - Plug-in conflict with (I think) WorldEdit, which has a tool for warping with the compass in hand. To bypass this, simply change the tool in the worldedit config, or make sure you dont have the permission node for it.

    TODO:
    Show Spoiler

    • Fix data-saving on restarts/reloads [Coming up in v0.2.5]
    • Add permissions support [Coming up in v0.2.5]
    • Add ability to create more than one compass node, and cycle through them [Coming up in v0.3]
    • Add ability to cycle between spawn and node [v0.1.1]
    • Add command to instruct players on how to use ComPassionate [v0.1.1]
    • Add new mode 'MonsterHunter' that picks up a mob in a 30 block radius and sets the compass' target to the mob. (would also give a display message saying a mob has been picked up) [v0.2]
    • Add treasure hunter mode. This will be very complex, and most likely a difficult task for me! I'll do my best to code it ASAP, but don't expect a release anytime soon!
    • Fix NPE being thrown into console if a player doesn't have a node registered upon logging on

    Suggestions/Requests:

    Have something you want added that's compass related? Let me know, and I'll be glad to give it a shot! Just post your request here in this thread, or send me a PM. I'm having fun learning the Bukkit API, so I'd love to figure out what you need to be done :)

    Changelog:
    Version 0.2.4
    • Bounty Hunter no longer tracks NPCs (if using Citizens plugin)
    • Node Tracker now has the feature to Shift-Left Click in order to update to your most recent node (a feature it SHOULD have had before, but wasn't properly implemented in the coding!)
      • To elaborate further, the only way to 'update' your compass target before, was to switch all the way around until you hit Node Tracker again, which updates to the node by default. Now, you can simply shift-left click in order to do this!
    • Any and all NPE's have been fixed. Go ahead. Try to get some spammed. I dare ya'. (But seriously, I *think* I got rid of them all with a little code re-working, let me know if it works or not ;) )
    • Players are now loaded into the Compass Database via logging in, as opposed to their first 'right-click' (this is what was causing NPEs before)
    Version 0.2.3
    • Bug fix to multiple unforseen issues with Mob Scanner and Bounty Hunter
    • Added new Compass Mode (Bounty Hunter)
    • Additional code clean-up (not much)
    • Basis for permission's support (not implemented, but should be in 0.2.5)
    Older Changelogs:

    Show Spoiler


    Version 0.2

    • Improved Compass Mode toggling
    • Added new Compass Mode (MobScanner)
    • Added new command /mobscanner (I'm aware that it should be branched off of /compassionate, fixing later ;)
    • Improved overall message display, to make things clearer and neater
    Version 0.1.1

    • Added command /compassionate
    • Added ability to cycle through spawn and the player's waypoint/node
    Version 0.1
    • Releasing ComPassionate to the public


    Ack, 0.1.1 has a bug where it spams each message twice. Working on a hotfix. I guess this is why I should test things on my public server and test server BEFORE posting a new version >.<

    EDIT:
    As it turns out, I had two of my own plugin on my live server. There's nothing wrong with 0.1.1, just my common sense.

    Just thought I'd give an update about version 0.2 (not sure if anyone's downloading since its such a simple plugin, but hey! It's nice to keep things organized!)
    Development for the new Mob Hunter mode is coming along nicely.
    Features of the new Mob Hunter mode(Everything is coded except for features in red):
    • Right Click (cycle compass mode) to reach 'Mob Hunter' mode
    • Once on this mode, left click to 'scan' the area for mobs (currently a 20 radius, subject to change)
    • Why 'player activated scans'? It leaves less of a memory footprint if its not constantly scanning based on player movement. In addition, it adds another level of user-interaction.
    • Displays amount of mobs in area (if 0, displays that there are no mobs around)
    • Picks a mob (at random) from the list of nearby mobs and sets the compass to follow that mob (updating movement every 5 seconds) <-- Again, to lessen the memory footprint User Sneak-Left-Clicks to update the mobs location.
    • Tells the player what type of mob it is tracking
    • After the selected entity has died, prompts user to left-click and scan again.
    • After the selected entity has moved a certain distance away from the player, prompts user to left-click and scan again. Might be added later, out of my league at the moment.
    Now, my goal here is to provide some legitimate USES for the compass, so allow me to list some uses of this:

    • Can be used to hunt down and kill certain types of mobs. AKA, scan until it locates a pig, then go hunt down your pork!
    • Can be used to help find expansions in caves without senseless digging! Hear a zombie moaning in a nearby area? Use your compass to dig straight to the bastard!
    • Can be used to run FROM the mobs (emergency situations). If you activate your tracker and you get 4-5 mobs in your area, odds are, you best be running faster!
    Anyways, I plan on releasing 0.2 sometime tommorow! Will feature a re-written compass-toggling algorithm, mob hunter (The main reason this is getting bumped to 0.2), and (possibly) permissions support!

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 16, 2016
    Darkaegis likes this.
  2. Offline

    PatrickFreed

    This looks cool. I think there was a bug with the forum where it wasn't displaying releases because I didn't see a bunch of these until today.
     
  3. Offline

    Mentioum

    can you name the nodes you create?
     
  4. Offline

    virtualism

    Hey, that's pretty cool. I've got a plugin conflict where it teleports you to where you're pointing, but once i figure out what's causing it, this is gonna be useful. Thanks!
     
  5. Offline

    DrBowe

    If I'm not mistaken, there is a conflict with worldedit (I think) that uses the compass as a warp tool. Luckily, this only works for OPs, or people who have the .* permission for it (unless you go out of your way to only allow compass warps).

    Currently, as this is my very first plug-in, the things you can do are very limited. Rest assured, once I figure out how to save and load my data values for the nodes (so they dont get wiped on restart), I will add options to create multiple nodes that players can go to.

    Quick Update on Monster Tracker:
    It's very buggy, but it is functional at the moment. I might release a test build over the next few hours to let you guys try it out. :)
     
  6. Offline

    virtualism

    Ah, cheers. That'd explain it! And restecp on the fast reply.
     
  7. Offline

    Mentioum

    Ok - I might suggest putting monster tracker and the compass nodes in separate plugins. Or allowing one to completely disable certain features. Admins don't need things any more heavy weight than what they need :)

    Good idea and im looking forward to you implementing more (watching)
     
  8. Offline

    DrBowe

    Yeah, I have a lot of ideas instore for the compass, and I do agree that I dont need to limit them all to one plug-in. With the monster tracker, I've decided that basic permissions support is a necessity. And, once I get around to it, I might move the monster tracker feature to another plugin I have planned for a 'Beast Master' RPG element.

    I also plan on adding a treasure hunt feature, but thats not anywhere in the near future. ;)

    EDIT:
    About to roll out the Monster Hunter update. Just need to squash one (somewhat major) bug where the compass will sometimes track entities that it's not supposed to, such as arrows, items, and players (Not to say there wont be a player hunter compass mode in the near future :) )

    Version 0.2 is finally out!
    Took me a while to iron out some NPE errors with the Mob Scanner, but I finally got it!
    An updated tutorial video will be uploaded shortly, I just need to record it first (Done)
    Other fixes/changes that came with 0.2 include:
    • Better help messages
    • Better toggling algorithm for compass modes
    • Clearer display of Compass Modes
    Don't forget to leave feedback! If there's a bug, I need to know about it! If there's a suggestion you want, let me know, and I'll do my best to incoporate it!

    Version 0.2.5 development will start mid-day tommorow.
    I will be implementing permission's support, and possibly fixing the save error with the compass nodes.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 16, 2016
  9. Offline

    PatrickFreed

    I'm curious as to how you came to know java. Did you learn another language first or just go right into java?
    I plan on learning it meself, currently on ~40th thenewboston tutorial :p
     
  10. Offline

    Mentioum

    newboston is how i started out with java - there is also a brilliant text based collection of tutorials linked to on the bukkit wiki. - I already knew some other programming languages though.
     
  11. Offline

    DrBowe

    I learned a good deal of it 2 years ago in an AP Computer Science course. I then went 2 years without coding anything, and I've used thenewboston to refresh my memory on some of the more uncommon things.

    Developing this plugin has actually taught me a number of few things that I'm shocked I never knew about before, like the switch() method, and enumerations. :confused:

    EDIT:
    Just in case there is any confusion as to why the mob scanner requires players to manually update and manually check to see if the mob is dead, the simple answer is that it leaves a significantly smaller memeory footprint to do it this way.

    I dont want a fun plugin that adds more uses to compasses to weigh down a server, so obviously, I'm not going to have a full featured scanner that always pings the server for mobs nearby and wheter or not they're alive. A 1-click, 1 scan (and 1-click, 1 location update) were the best ways I could have kept the Mob Scanner at such a low memory profile, without defeating the purpose of it.
     
  12. Offline

    Mentioum

    Oh btw , just for future... with locating players (/locate playername).

    Worldguard already has this functionality so please make them play nice :)

    (More of a heads up than anything else)
     
  13. Offline

    DrBowe

    I think the only way that I could make them not play nice, would be if I literally included a command called /locate player
    :)
    Unless WorldGuard's /locate player sets the player's location onto your compass, which would be a different story.

    EDIT:
    Ah, it DOES set the player's location onto your compass. I did a few tests with my BETA player-tracker, and really, I wouldnt call what's happening a 'conflict'.
    You see, the player you're tracking with Bounty Mode (what I'm calling player-tracking mode) is stored as a separate location, and every time you left click to update the player's location (in the same fashion you update a mob's location), it will pull this location and set it as your new compass target.

    So, here's what would happen when WorldGuard comes into the mix:
    -*Left Click* Tracks a random player in a 100 block radius
    -For whatever reason, I decide to */locate <otherplayer>, the compass now targets the other player
    -I then *Left Click* again. This will update the ORIGINAL player's location, and pull that location from the separate stored area. Thus, the right player will be being tracked, once more

    So, while they both affect the compass target, they dont overwrite eachother in any problematic way. :)
     
    Mentioum likes this.
  14. Offline

    Mentioum

    Kl Kl i didnt think they would... like i said it was more of a heads up so you didn't have a conflict. (It also has issues what with left clicking with the compass makes you "jump" (tp to point crosshair is on) - is there any way around this? ... perhaps one can change the item to feather in worldguard?

    Edit****

    Btw thank you for a good response - I'm supporting this DEV :)
     
    DrBoweNur likes this.
  15. Offline

    DrBowe

    Yeah, its mentioned in the Known Issues portion of the thread now. You have a few options for the work around:
    You can
    • Make sure you're not an OP/Have permissions for the compass teleport
    • Change the teleporting material in the config of WorldEdit(I think its WorldEdit, not WorldGuard...I think)
    The last one would be the most ideal, as sometimes you just need people to be OPs, and its really not an option to disable it. :)

    EDIT:
    Player Tracker is complete, working on permissions support (first time working with permissions, not sure how easy this will be. Hopefully will be a few 'if/else' statements...and nothing more)
    Though there is another slight plug-in Conflict with Citizens (and probably any other NPC plugin)...The player tracker will also locate NPCs (which, isnt necessarily a bad thing, but several NPCs in a small area can become a nuisance)

    I'm not sure if I can work around this, without stepping directly into the Citizen's source to try and find an isNPC() boolean check. I'll look into it after permissions are supported :)
     
  16. Offline

    Mentioum

    I thought it might be helpful to write up exactly what I would want from a compass plugin atm. All other functionality I don't really want and would like to be disable-able. (Please note this is just a request from a very active admin - you don't HAVE to do anything *covers own arse perfectly*.


    Features:
    • Being able to set points with names with a compass.
      • Shift + Left Click with compass to bring up prompt ("Type the name of this location - type cancel or leave blank to exit")
      • Entering a name in chat would store that location for that player only allowing for user exploration.

    • Selecting locations.
      • Right clicking with compass scrolls through set locations.
      • Can also select a location with /compass [locationname] - supports unique identifiers.

    • Removing locations.
      • Either Shift+Right Click with compass on location block to remove location.
      • Entering command /compass remover [locationname]

    • Selecting Users.
      • Either Shift + Left Click a person to "Set as persistent target" Useful for co-op mining e.t.c.
      • Entering command /compass locate [playername] - supporting unique identifiers.
      • Left clicking while running around with compass in hand to "refresh targeted player location"

    Like I said this is what I am looking for for my community and this plugin seems closest to what I want. Thats my requests :).

    Good luck!
     
  17. Offline

    DrBowe

    On my list of things to do :)
    This too, actually.
    Interesting idea for removing the location @ the Shift-Right Click idea
    This is also a very interesting idea. The problem with persistent targets, however, is that they tend to crash a server. Now, I could do a step counter...that could work. AKA, if player steps 2o steps, compass will update the location automatically.

    These are all excellent suggestions, and half of them were already planned. My main issue is using persistance with files. Set nodes are wiped on restart, currently, and I need to find a way to write them to an external file. Once I can figure this out, adding the values you stated to a list should actually be fairly easy. In fact, if you want, I can give that a shot right now. If your server doesn't reset too often, a non-peristant 'multi-node' feature could work as a "trial".

    This way, you could atleast tell me if you like the way its implemented, or if you want it changed to a cleaner/faster/etc build.

    But, of course, persistance with files is the most important step towards this (and honestly, is the main reason I've been focusing on modes that don't require peristance :p)

    Appreciate your support of the plug-in, however. Makes me feel inspired, especially considering this is my first attempt at 'em. :)

    Oh wow. Just found a major bug with both Mob and Player tracker. I'm using the default player instead of players in the HashMap. Which means if anyone tracks a mob, your compass will be set to the current 'stage' of tracking. Kind of hard to explain, working on fixing it! >.<

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 16, 2016
  18. Offline

    Mentioum

    Im happy if you want to test on our community :) - I do a lot of that with other devs. Drop onto our mumble :) IP: server.lpminecraft.com Password: Mentioum
     
  19. Offline

    DrBowe

    I run my own server, so I have a community to test the 'shitty builds' on :)
    However, I'd love to pass over some inDev builds (but stable builds) just for you guys to get some looks at new features, and I'll definitly hop in mumble and help with the testing.

    Version 0.2.3 is out!
    • Bounty Hunter (Player-Tracking Mode)
    • Little bit of code clean-up
    • Bug fixes with Mob Scanner
    • Witty new slogan for the Bounty Hunter Mode, quoted from a player on my server. She's so clever!
    Verion 0.2.5 should be out in 1-2 days. This version will be designed around optimizing configuration for this plug-in, so expect more indepth commands, and permission support (for each unique CompassMode) will be packaged along with it. If I can figure it out, I will also add a config file to set the radius for both Mob tracker and Player tracker, among other things that come to mind.

    If you guys have anything that you'd like to be able to configure/control, now would be the time to tell me! :)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 16, 2016
  20. Offline

    DrBowe

    Status Update:
    I've run into a brick wall with serialization, as it appears my code is written in the exact OPPOSITE way it would need to be in order to make serialization possible. This means that I'm going to have to completely rewrite 90% of my code in order to accomadate for this unexpected problem.
    Expect some major delays on v0.3, as this issue (combined with a 1 week vacation starting tommorow) are going to severely extend the time it takes me to finish this.
     
  21. First click I do with the new compass...

    Code:
    12:31:34 [SEVERE] Could not pass event PLAYER_INTERACT to ComPassionate
    java.lang.NullPointerException
            at me.DrBoweNur.ComPassionate.ComPassionatePlayerListener.onPlayerInteract(ComPassionatePlayerListener.java:77)
            at org.bukkit.plugin.java.JavaPluginLoader$10.execute(JavaPluginLoader.java:306)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:310)
            at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:166)
            at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:137)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:520)
            at net.minecraft.server.Packet15Place.a(SourceFile:57)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:223)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:399)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:309)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    
    ===

    Some more uninformative errors:

    Code:
    15:36:11 [SEVERE] Could not pass event PLAYER_INTERACT to ComPassionate
    java.lang.NullPointerException
    15:36:11 [SEVERE] Could not pass event PLAYER_INTERACT to ComPassionate
    java.lang.NullPointerException
    15:36:11 [SEVERE] Could not pass event PLAYER_INTERACT to ComPassionate
    java.lang.NullPointerException
    15:36:11 [SEVERE] Could not pass event PLAYER_INTERACT to ComPassionate
    java.lang.NullPointerException
    15:36:11 [SEVERE] Could not pass event PLAYER_INTERACT to ComPassionate
    java.lang.NullPointerException
    15:36:11 [SEVERE] Could not pass event PLAYER_INTERACT to ComPassionate
    java.lang.NullPointerException
    
     
  22. Offline

    DrBowe

    This tends to happen whenever a player trys to switch compass modes before setting a node. Although its not worded exactly like that when the error occurs, the first 'left click' with a compass should put that player into the system, and everything else should work fine from there.
    After you left click, does everything work properly? Or are you getting the errors regardless of what you do with it?

    EDIT:
    Just checked against newest RB, and other than the first NPE, it still works properly. You're using 818-860, right?
     
  23. Am on 867, but I presume that's same ;p
     
  24. Offline

    DrBowe

    So is the plugin just flat out not working, or is it just spamming the console with that error until you 'set your first node'?

    Fixing the console spam is on my to-do list, but if it is just flat out 'not working', I need to look into that :confused:
     
  25. It works, I just report any exception I get :)
     
  26. Offline

    DrBowe

    Ah, ok. Thanks :)
     
  27. These spam quite often still :/

    Code:
    :36:40 [SEVERE] Could not pass event PLAYER_INTERACT to ComPassionate
    java.lang.NullPointerException
            at me.DrBoweNur.ComPassionate.ComPassionatePlayerListener.onPlayerInteract(ComPassionatePlayerListener.java:77)
            at org.bukkit.plugin.java.JavaPluginLoader$10.execute(JavaPluginLoader.java:306)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:310)
            at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:166)
            at net.minecraft.server.ItemInWorldManager.interact(ItemInWorldManager.java:213)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:552)
            at net.minecraft.server.Packet15Place.a(SourceFile:57)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:223)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:399)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:309)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    
     
  28. Offline

    DrBowe

    @Joy
    I know, I haven't released a fix for it yet. I've been extremely busy with getting my server back up on its feet, after a host failure lead me to search for a new server provider.
    That, and the fact that I'm on vacation at a lakehouse, are keeping me from fixing a few things. I'll release a hotfix for this, and for PlayerTracker hooking onto NPCs (in citizens), as soon as I get a few hours to myself.
     
  29. Offline

    gameswereus

    So does the bounty hunter mode search for the players who have a bounty on their heads?
     
  30. Offline

    DrBowe

    It doesnt, currently. It searches for players in a 100 block radius.
    However, I love that idea. I'll contact the HeroBounty coders and see if they have any API I can use for checking on that.
     
    compgurusteve likes this.

Share This Page