[MECH] Azimuth v0.2 - Compass points to last place died and more [1000]

Discussion in 'Inactive/Unsupported Plugins' started by rockbeatspaper, Jun 2, 2011.

  1. Offline

    rockbeatspaper

    Azimuth - Compass points to last place died and more

    Version: v0.2
    Latest craftbukkit build tested against: 860

    This Bukkit plugin allows players holding compasses to change where the compass points. Right clicking with a compass in hand will change the mode and send a message to the player.

    Modes:
    • World spawn -- Points to the current world's spawn point
    • Personal spawn -- Points to where player last spawned (bed,world spawn). Location won't change from "World Spawn" until you spawn to your bed after death.
    • Last death -- Points to last location of death. This is set after the player dies.
    Summary:
    Player right clicks while holding compass. Player is sent message that compass mode is "World Spawn". Compass will now point to the world's spawn point.
    Player right clicks while holding compass. Player is sent message that compass mode is "Personal Spawn". Compass will now point to the last place the user spawned.
    Player right clicks while holding compass. Player is sent message that compass mode is "Last Death". Compass will now point to the last location that the user died. If the user hasn't died yet, the plugin will warn the player and set compass to "Personal Spawn" mode.
    Player right clicks while holding compass. Compass changes to "World Spawn" mode. Etc...

    Players can now add and remove modes from their rotation. New commands have been added to support this.
    Commands:
    /compassAdd <mode name> -- Adds the specified compass mode to rotation
    /compassRemove <mode name> -- Removes the specified compass mode from rotation
    /azimuth -- Lists the commands available through my plugin

    Download The Test Plugin v0.2
    Source Code

    Past Version Jar Files:
    Azimuth v0.1

    Changelog:
    Version 0.2
    • Players can add and remove modes from their rotation
    • Added three new commands
    Version 0.1
    • Players have individual settings(mode compass was last in, location of death, etc...)
    • Creation of three modes
    • Other basic implementation
    TODO:
    • Make sleeping in bed change personal spawn point
    • Other modes
    • Config settings that allow whether or not message is sent to player when changing modes
     
    NEO likes this.
  2. Offline

    staniboy

    Hello really nice plugin but it doesn't work with the latest BedRespawn plugin.... that would be nice to see compass pointing at the bed u are spawning in
     
  3. Offline

    bluej100

    This is perfect--exactly what I've been meaning to build myself. Thank you! I'd add my vote for true north and left-click temp bearing, but it's already really everything I could ask for, aside from updating personal spawn.
     
  4. Offline

    rockbeatspaper

    Currently working on pointing to the bed you are spawning in. However, I'm running into a bit of trouble.

    Currently, I'm catching onPlayerRespawn(...) and recording where the player is going to respawn. The downfall of this approach is that it doesn't update until after you die.
    I'm looking at onPlayerBedEnter(...) and onPlayerBedLeave(...). They are called when the player enters a bed and leaves a bed. onPlayerBedLeave(...) is still called if the player exits the bed before falling asleep. If I use these methods as well, the downfall will be that the compass points to beds that you entered, but not necessarily slept in.

    Even if I try to use Player.isSleeping(), it returns false within onPlayerBedEnter(...) and onPlayerBedLeave(...).

    What would you guys think if I added bed sleeping detection even with the extra downfall?
     
  5. Offline

    bluej100

    I would definitely support that. I believe MCMMO registers a spawn change after failed sleep attempts, so I wouldn't bang your head against the problem too much.
     
  6. Offline

    IronPython

    nice pugin, only one problem i have is that i am using tomb to show the last location of you death (by showing were your death tombs are) and id like a way to set it so no one on the server can use the last death node. dont know if there is an easy way to do this or not but tell then ill just have to deal with it ^.^
     
  7. Offline

    Light_Wing

    cant you just remove it from the cycle?
     
  8. Offline

    IronPython

    i can from my cycle but thats only aplies to me and not the full server. im need it to be removed for the server in general
     

Share This Page