[GEN/MECH/ECON] OKCheckPoints v1.3.5 - Checkpoints with Economy/Permissions support [1.0.0-R1]

Discussion in 'Inactive/Unsupported Plugins' started by Kalman Olah, Jul 12, 2011.

  1. Offline

    Kalman Olah

    OCP - OKCheckPoints
    by Kalman Olah​
    Latest version: 1.3.5 ( Download )​
    Would you like to buy me a drink? some useless stuff from Amazon? a car?​
    [​IMG]

    What is OKCheckPoints?
    OKCheckPoints is a 'checkpoint' plugin for Bukkit. OKCheckPoints comes with fully configurable messages(including colour codes and some variables), checkpoint costs, an auto-updater and support for all major Economy plugins (using Register) and Permissions, PermissionsEx, GroupManager and Bukkit's permissions.​
    What does OKCheckPoints do?
    Simply put, OKCheckPoints allows you to save your character's location(using a command, or by right-clicking a sign) for a configurable price(Items or Economy money). If a player with a checkpoint dies, he respawns at his checkpoint, and may or may not keep his inventory(depending on your configuration).​
    How do I set up OKCheckPoints?
    Move it to your plugins/ directory.​
    How do I configure OKCheckPoints?
    When you run OKCheckPoints for the first time, a configuration file called 'config.yml' will be generated. In here, you can edit all of the messages/costs/etc... until you're satisfied with them.​
    Note: Available colour codes are &1 - &9 and &a - &f. Available variables are %i for item name/currency name and %a for item/money amount. For the teleportation messages, the variable %t(Target of teleportation) is available.​
    How do I use OKCheckPoints?
    To create a CheckPoint using a command, simply use the /checkpoint or /cp command.​
    To create a CheckPoint using a sign, simply left-click the CheckPoint sign.​
    To create a CheckPoint sign, simply place a sign with "[CheckPoint]" on the first line, and optionally specify a number on the second line if you would like CheckPoints from that sign to have a custom cost, or write "free" on the second line if you would like CheckPoints from that sign to be free.​
    Permissions nodes:​
    okcheckpoints.create.command
    Allows you to create a CheckPoint by using the /cp and /checkpoint commands.​
    okcheckpoints.create.sign
    Allows you to create a CheckPoint by left-clicking a CheckPoint sign.​
    okcheckpoints.clear
    Allows you to clear your CheckPoints using the /cp clear and /checkpoint clear commands.​
    okcheckpoints.place
    Allows you to place a CheckPoint sign.​
    okcheckpoints.break
    Allows you to destroy a CheckPoint sign.​
    okcheckpoints.free
    Allows you to ignore the cost of a CheckPoint.​
    okcheckpoints.teleport
    Allows you to use the /checkpoint tp <name> and /cp tp <name> commands.​
    okcheckpoints.reload
    Allows you to use the /checkpoint reload and /cp reload commands.​
    Commands:​
    /checkpoint or /cp
    Creates a CheckPoint at your current location. Requires 'okcheckpoints.create.command' to use.​
    /checkpoint clear or /cp clear
    Clears your CheckPoints. Requires 'okcheckpoints.clear' to use.​
    /checkpoint tp <player's name> or /cp tp <player's name>
    Teleports you to a player's CheckPoint, if that player has one set. Requires 'okcheckpoints.teleport' to use.​
    /checkpoint reload or /cp reload
    Reloads the OKCheckPoints configuration. Requires 'okcheckpoints.reload' to use.​
    Note: Can be used from the console.​
    Credits & Thanks:
    This plugin uses Register, an amazing AIO Economy API by nijikokun, parts of Tagette's extremely helpful and useful Plugin Template, and alta189's awesome SQL Library.​
    Special thanks go out to captainawesome7, who helped me get inventory saving working properly.​
    Known Issues:
    None(currently).​
    Misc. info:
    -If a player creates a CheckPoint, dies, and does not respawn before the server restarts, he will lose his items anyway.​
    -Players without the "checkpoints.break" Permissions node can't destroy CheckPoint signs.​
    -TNT(explosions) can't destroy CheckPoint signs.​
    -Gravity(e.g.: Removing the block under the sign) can't destroy CheckPoint signs.​
    Changelog:
    Version 1.3.5
    • Changed teleport permission node to "okcheckpoints.teleport".
    Version 1.3.4
    • Updated to use the new configuration API.
    Older versions (open)

    Version 1.3.3
    • Minor update to permissions checking functions.
    Version 1.3.2
    • Fixed compatability issues with iConomy 6.
    Version 1.3.1
    • Attempted fix for CommandBook /home conflict.
    Version 1.3.0
    • Added to the "OK" suite(see signature).
    • Added support for PermissionsEx, Bukkit's permissions, GroupManager, Permissions 3.1.x.
    • Changed name.
    • Changed permissions nodes to match name.
    Version 1.2.1
    • Auto-updater bugfix.
    Version 1.2.0
    • You can now create CheckPoint signs. Players can left-click these signs to create a CheckPoint AT THE PRICE SET ON THE SIGN. Aw yeah. CheckPoint signs are protected from the laws of physics, players and explosions. I hope.
    Version 1.1.0​
    • Removed all sign-related stuff. CheckPoints is now strictly command-based, until I get enough requests to add something else.
    • Added a teleport command that allows you to teleport to another player's checkpoint.
      Usage: /cp tp <name> or /checkpoint tp <name>. Permissions node: checkpoints.teleport.
    Version 1.0.0​
    • Released.


    Example config.yml (open)
    Code:
    #Keep inventory when you die and a CheckPoint is used?
    keep-inventory-on-checkpoint-usage: 'true'
    economy:
    #Enable economy plugin? Will override items.
        enable-economy-plugin: 'false'
    #How much should a CheckPoint cost?
        economy-cost: '500'
    #The custom name of your currency.
        economy-currency-name: coins
    items:
    #The item ID of the item you want to purchase CheckPoints with.
        consumed-item-id: '41'
    #The custom name of the item you want to purchase CheckPoints with
        consumed-item-name: Gold Block
    #Amount of items to take from player...
        consumed-item-amount: '1'
    messages:
    #Self-explanatory...hopefully. Colour codes are &1 - &9 and &a - &f. Variables are %a for amount,
    #%i for item name or currency name, %t for teleport target.
        not-enough-items-message: '&cYou need atleast &f%a %i &cto create a CheckPoint!'
        not-enough-econ-money-message: '&cYou need &f%a &c%i to create a CheckPoint!'
        signs-not-enough-items-message: '&cYou don''t have enough &f%i&c to create a CheckPoint!'
        signs-not-enough-econ-money-message: '&cYou don''t have enough &f%i&c to create
            a CheckPoint!'
        create-message: '&6You have successfully created a CheckPoint!'
        place-message: '&6You have placed down a public CheckPoint!'
        use-message: '&6You have been placed at your CheckPoint!'
        no-permission-message: '&dYou do not have permission to do this!'
        clear-success-message: '&6You have successfully cleared your CheckPoint!'
        clear-fail-message: '&cYou do not have a CheckPoint to clear!'
        reload-message: '&6CheckPoints configuration reloaded!'
        teleport-success-message: '&6You have been teleported to &f%t&6''s CheckPoint!'
        teleport-fail-message: '&cPlayer &6%t&c does not have a CheckPoint set.'
    


    I'll be removing everything sign-related from this plugin tomorrow. I had a change of heart about signs.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 17, 2016
    RastaLulz and formn like this.
  2. Offline

    captainawesome7

    Why do all of your plugins have red letters at the beginning of every word in the title?
     
  3. Offline

    Kalman Olah

    I think you are just jealous because you did not think of it first :p.
     
  4. Offline

    captainawesome7

    No it's just annoying.
     
  5. Offline

    Kalman Olah

    I think it's fine when used in moderation.
     
  6. Offline

    captainawesome7

    Agreed, you didn't happen you change your OP to only redify the title in one place did you?
     
  7. Offline

    Kalman Olah

    You know I did. What's with all the hate?
     
  8. Offline

    transient

    Wow Kalman, you keep coming out with these plugins that solve a problem in a uniquely awesome way! I just hope you don't get burnt out as I'll be using all of your plugins - DPC!
     
  9. Offline

    Donny

    Its two letters...
    And why are you flaming this thread...
     
  10. Offline

    Asterdom

    Wow epic plugin! Solves my bed issue Ive been having w recent updates!

    Truly a master of your art sir
     
  11. Offline

    Kalman Olah

    Version 1.1.0​
    • Removed all sign-related stuff. CheckPoints is now strictly command-based, until I get enough requests to add something else.
    • Added a teleport command that allows you to teleport to another player's checkpoint.
      Usage: /cp tp <name> or /checkpoint tp <name>. Permissions node: checkpoints.teleport.
    Err, thanks :p. I think you're overdoing it just a little bit with all of the praise, though :p.
     
  12. Offline

    Terry Tibbs

    Does it keep the inventory from the time of placing the checkpoint or actually dying?
     
  13. Offline

    Kalman Olah

    You keep the inventory you have when you die. If I had made Checkpoints keep a player's inventory from the time of checkpoint creation, players would just go ahead and put all of their diamonds in chests and kill themselves.
     
  14. Offline

    Terry Tibbs

    Save the inventory state at checkpoint creation and then compare that to the inventory state at death, any items existent in both are given back to the players upon spawning. Sound logical?
     
  15. Offline

    EdTheLoon

    Pretty good app you've got here. I think you were probably right to remove signs for now...it's a lot easier to remember commands than remember what you have to put in a sign; especially when you can get usage help through commands.

    That sounds less logical than just saving the inventory at time of death and restoring those items. What if you create a checkpoint, acquire heaps of diamond and then die because of a creeper? Because you're original checkpoint didn't have x amount of diamond (or any diamond) saved in the state you would LOSE you're diamonds resulting in a lot of angry players?
     
  16. Offline

    Kalman Olah

    This would mean a timer on CheckPoints. If I didn't add that, saved inventories would just pile up and take up memory.
    I removed signs because I wanted to keep the plugin lightweight. When I added signs, I pretty much had to add a sign protection system too. At the end of the day, my code was just too cluttered. That, and placing a sign saying "[CheckPoint]" is much slower than typing "/cp".
     
  17. Offline

    Donny

    A player on my server was trying to make a CheckPoint. Doing only [checkpoint] or [Checkpoint] (no capital "p") he ended up getting infinite signs some how or another. Might just be a rare minecraft/bukkit bug, as I was unable to replicate it.
    Figured I'd post it here anyway, in case its a rare CheckPoint bug.

    screenie anyhow.
    [​IMG]
     
  18. Offline

    Kalman Olah

    Weird...I had no such errors issues while testing it... Signs have been removed anyway :p.
     
  19. Offline

    elyanes

    I have an error when I use /cp

    Code:
    2011-07-14 13:03:30 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'cp' in plugin CheckPoints v1.1.0
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:129)
        at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:298)
        at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:711)
        at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:676)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:669)
        at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:84)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Caused by: java.lang.NoSuchMethodError: com.nijiko.permissions.PermissionHandler.getUserObject(Ljava/lang/String;Ljava/lang/String;)Lcom/nijiko/permissions/User;
        at me.kalmanolah.cp.OKmain.CheckPermission(OKmain.java:156)
        at me.kalmanolah.cp.OKCmd.onCommand(OKCmd.java:28)
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
        ... 12 more
     
  20. Offline

    Kalman Olah

    Could you post your config.yml and Permissions version please?
     
  21. Offline

    Terry Tibbs

    So what you're saying is that anyone can just type /cp into the chatbox and protect ALL OF THEIR items until they die?

    Takes away from the fun of survival-based multiplayer servers. Saving the inventory state and allowing the user to only gain back the items when he/she paid to create a checkpoint adds to the adventure feel. You know that you might lose some of the items you just mined, it's a dilemma; should I pay to create a checkpoint and guarantee I get to keep what I just mined, or do I continue on and risk losing all of the items I got since my last checkpoint (saving money).
     
  22. Offline

    GmK

    Sounds like a great plugin!

    Two requests:

    1) You can only make a checkpoint at a pre-defined location (sign) - rightclicking it makes it your checkpoint (only one checkpoint at a time)
    2) Checkpoints expire after a x-amount of time, so they can be used in a dungeon situation, but not for people to have forms of 'free warps'
     
  23. Offline

    elyanes

    The config.yml is the original when I download the plugin and my permissions version is 2.7.4 Phoenix
     
  24. Offline

    Kalman Olah

    I've only tested it with Permissions 3.1.6. This may be your issue. It probably is. But to be sure, delete your config.yml and let my plugin generate another.

    Removed version 1.1.1. V1.1.0 is the latest.

    I'll add the sign.
    I'll think about the expiration.

    This is my map after extensive testing of my plugin....Before I remembered /kill kills you.
    http://i.imgur.com/IHEyH.jpg

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

    Donny

    Damn, lost the error. Was in the middle of backing up and replacing my server.log =(. I went to rejoin my server and was unable to so I checked console, there was error spam of something like "[CheckPoint] Unable to connect SQL" it was longer, don't remember it exactly. Server was unresponsive so I copied the error and restarted server. Some how I lost the copy.

    I feel stupid for losing the error. Will post if it happens again.
     
  26. Offline

    Kalman Olah

    CheckPoints has been updated to v1.2.0!

    New features:
    • -You can now create CheckPoint signs. Players can left-click these signs to create a CheckPoint AT THE PRICE SET ON THE SIGN. Aw yeah. CheckPoint signs are protected from the laws of physics, players and explosions. I hope.
    Read the edited OP in a moment to check out the new Permissions node/functions.
    If you update to v1.2.0, delete your config.yml and let CheckPoints generate a new one.
     
  27. Offline

    Donny

    How come CheckPoints went to a command base in 1.1.0? In 1.2.0 I'm assuming players cannot create their own location using signs?
     
  28. Offline

    Kalman Olah

    Because I had no reliable way to remove signs after they'd been used. I would've had to try to load unloaded map chunks just to remove a single sign whenever someone used a checkpoint, resulting in a huge performance hit.

    In 1.2.0, players can create checkpoints by leftclicking a checkpoint sign, or by using the command. Moderators/admins can create checkpoint signs. The checkpoint signs can have custom costs, as in: not the cost in the config.yml.
     
  29. Offline

    Donny

    That makes sense.


    Edit: Wait After they have been used the player would be teleported to the signs location, making the chunk loaded =P
     
  30. Offline

    Kalman Olah

    You've got a point. But what if a player makes a CheckPoint with a sign in one chunk, then moves to another chunk, far away, and puts another one down when the first one is unloaded? In this case, I'd have to load the chunk, remove the sign, and unload it again.

    In 1.0 signs are destroyed when you use a checkpoint and teleport straight to them. However, there is no tnt protection, and if you overwrite your checkpoint your old sign isn't deleted. So I'd really recommend 1.2.0.

    EDIT: I don't quite understand why you want the signs...If it's a matter of RP value, the messages are all editable :p.
     

Share This Page