Inactive [RPG]DayJobs v2.2 - A plugin to enforce and enhance Role Playing [1337]

Discussion in 'Inactive/Unsupported Plugins' started by LartTyler, Sep 4, 2011.

  1. Offline

    LartTyler

    DayJobs
    A plugin to enforce and enhance role playing




    We're on BukkitDev! Please direct all comments to the project page on BukkitDev, thanks!​


    After hosting an RP server for several months, I became tired of having to settle disputes between players, and having to monitor who's doing what. Most of my time went into ensuring player's kept true to RPing, rather then shaping the server as I had wanted to.

    Which is why I designed DayJobs. DayJobs is a plugin that takes some of the load off the shoulders of admins and moderators by restricting how players interact with the world. At the moment, that simply means the tools the players can use, and the blocks they can place. In the future, we at Daybreak Studios plan to add many features that will turn this simple plugin into a full suite to manage role playing in the Minecraft world.

    Current features:
    • Limit block placement and tool usage based on a players job class
    • Completely configurable classes
    • Job change request and ticketing system
    • Restrict armor usage by class
    • Configurable zones! Create guild halls, private mines, and various other locations accessible to only select classes!
    • New configuration option "can-break" allows even further fine-tuned control over what a player can and can't destroy!
    • Configurable damage types! Let some jobs survive harsher conditions longer then others, or fall prey to select environments in the blink of an eye!
    • Set respawn locations and first spawn location (with configurable messages to display to the player being spawned).
    • Restrict items from being crafted on a per job class basis.
    • Support for Permissions, PermissionsBukkit, PermissionsEx.
    • Restrict crafting, smelting, and many more elements of Minecraft's game mechanics on a per class basis.
    Coming soon!

    • Starter kits! Allow players to receive special Starter Kits when the first pick a job, or even on each subsequent job change
    • Support for custom items added via Spout using item ID's
    • Other features on request. Please PM me or leave a message in this thread if you have any feature requests.
    Downloads:

    Requirements:

    This plugin now requires the server-side version of Spout.​

    Configuration:
    Setting up DayJobs is simple. Simply drop the jar into your plugins folder and go. The plugin will function without Permissions and will use Op status for moderators. However, for a more personalized experience, we do suggest installing Permissions. Yes, it's inactive and outdated, but it still works very well, and we use it on our personal servers.​

    Once Permissions has been added, you can use the following permission nodes to control command access:​
    Code:
    dbstudios.dayjobs.admin.reload
        Can reload configuration files
    dbstudios.dayjobs.admin.change
        Can change a players class
    dbstudios.dayjobs.admin.tickets
        Can access/close tickets
    dbstudios.dayjobs.admin.debug
        Can toggle debug mode
    dbstudios.dayjobs.admin.zones
        Can create and delete zones
    dbstudios.dayjobs.admin.exempt
        Allow usage of the admin "exempt" command
    dbstudios.dayjobs.admin.spawn.set.deathspawn
        Allows setting of the death spawn location
    dbstudios.dayjobs.admin.spawn.set.newspawn
        Allows setting of the new spawn location (for first time players)
    dbstudios.dayjobs.admin.spawn.tp.deathspawn
        Allows teleporting to the death spawn
    dbstudios.dayjobs.admin.spawn.tp.newspawn
        Allows teleporting to the new player spawn
    
    dbstudios.dayjobs.player.list
        Can list available jobs
    dbstudios.dayjobs.player.whois
        Can 'whois' other players
    dbstudios.dayjobs.player.change
        Can request a job change
    dbstudios.dayjobs.player.info
        Can view job descriptions
    
    Example configuration files can be found on our GitHub page.​

    Commands:
    Code:
    /job list
        List available jobs
    /job info [<job>]
        Display your job info, or <job> if given
    /job whois <player>
        Display basic info for <player>
    /job change <job>
        Request to be changed to <job>
    /job admin reload
        Reload configuration files
    /job admin change <player> <job>
        Change <player>'s job to <job>
    /job admin tickets [close <player>]
        Display open tickets, or close ticket by <player>
    /job admin debug
        Toggle debug mode
    /job admin exempt <player>
        Toggle exempt status for <player> (they wont be affected by job limitatons).
        Run again on the same player to remove exempt status.
    /job admin spawn set death
        Set the respawn location to your current location
    /job admin spawn set new
        Set the new player spawn to your current location
    /job admin spawn tp death
        Teleport to the current respawn location
    /job admin spawn tp new
        Teleport to the current new player spawn location
    
    
    /job zone create <zone>
        Begin creation of <zone>
    /job zone set (upper/lower)
        Set the upper-left or lower-right coordinate of the zone
    /job zone order ("allow,deny"/"deny,allow")
        Set the access order (allow first, then deny, or deny first, then allow)
    /job zone (allow/deny) <access_list>
        Allow or deny for <access_list>
    /job zone commit (yes/no)
        Commit zone changes ("yes"), or delete them and start over ("no")
    
    Using the zoning system:
    The zone system in DayJobs is simple. In order to create a new zone, begin by ensuring that you have the correct permission node (dbstudios.dayjobs.admin.zones). Next, initialize zone creation by typing:
    Code:
    /job zone create MyZone
    Next, you need to set the upper-left and lower-right coordinate points that define the bounding box the zone takes up. Keep in mind that the zone does not have to encompass an entire structure; often, it's enough to simple place a zone across the door or entry way that will deny players access.
    To define a coordinate, look at the upper-left or lower-right block you want to use, and type:
    Code:
    /job zone set upper
    or​
    Code:
    /job zone set lower
    Now, you will need to define an order type. For those familiar with the Apache web server, you may recognize the syntax.
    The zone system uses an allow or deny system (ADS) to determine if a player is allowed in a given zone. Valid order types are: "allow,deny", meaning allow all job classes first, then deny those on the given list, or "deny,allow", meaning deny all job classes, and only allow those implicitly allowed. Notice the lack of space between the two access types. To set the order type, enter:
    Code:
    /job zone order allow,deny
    or​
    Code:
    /job zone order deny,allow
    The final step before committing a zone is to set the access list. The syntax of this command will change depending on your order type. For example, the order type "allow,deny" would replace <access_type> in the following command with "deny", and "deny,allow" would replace <access_type> with "allow":
    Code:
    /job zone <access_type> <access_list>
    <access_list> is a comma separated list of job classes to deny or allow. Be sure, just as in the order type, not to use spaces between the comma and the different job classes.
    The final step is to commit the zone. To do this, type:
    Code:
    /job zone commit yes
    This will write all changes to your zone file. However, if you are not satisfied with the changes, or decide midway through creation that you don't want the zone, type:
    Code:
    /job zone commit no
    You must commit or discard a zone before attempting to create another.

    You can also delete zones from in-game. Simply type:
    Code:
    /job zone delete MyZone

    Let's say I wanted to create a zone named "MinersGuild", and only allow the two jobs, "Miner" and "Blacksmith" inside. I would type the following:
    Code:
    /job zone create MinersGuild
    *Looking at the block above and to the left of the entry way, I would type:*
    /job zone set upper
    *Looking at the block below and to the right of the entry way, I would type:*
    /job zone set lower
    /job zone order deny,allow
    /job zone allow Miner,Blacksmith
    /job zone commit yes
    
    Special Characters
    In config.yml, there are many options you can use to change what text is displayed to a player on certain events. Each option allows for certain special characters, denoted by a percent sign ("%"). Currently, the only supported special characters are:
    • %p - The player's name
    • %j - The player's job
    As more and more features are added, there will be more special characters to choose from.


    As an example, in config.yml, you can set the message to display to a user the first time they connect to the server (new-player-msg). If I wanted to make it welcome the new player using their name, I would use:
    Code:
    new-player-msg: Welcome, %p, to The Four Kingdoms. You have joined with the default job class, %j.
    Changelog:
    Version 2.2
    • Fixed a bug that caused errors for servers using PermissionsBukkit.
    • Added 'init.yml'. Allows individual features to be enabled/disabled.
    • Small code tweaks in the interest of performance.
    Version 2.1
    • The item value "NOTHING" can now be either "NOTHING" or "NONE", it will evaluate to the same thing.
    • Placing a "-" in front of a block or item will except it from any previous allow statements. For example:
      Code:
      can-place:
                - ALL
                - -OBSIDIAN
                - -TNT
      Would allow all blocks, except for obsidian and TNT to be placed.
    • Placing a "+" in front of a block or item will add it to the list of allowed items/blocks, regardless of previous statements. For example:
      Code:
      can-place:
                - NOTHING
                - +COBBLESTONE
                - +DIRT
      Would disallow all blocks, but will allow Cobblestone and dirt to still be placed.
    • Item usage on mobs and other entities now denies correctly. Restricted weapons/blocks/items no longer work on mobs.
    • Changed some output text colors, and re-worded the more "awkward" phrases.
    • New configuration option, "can-smelt" allows you to restrict what a player is capable of smelting in a furnace.
    • Configurable message structure in config.yml has been changed. Please see the provided example config.yml for an example of the new structure.
    Version 2.0

    • Configuration files renamed: "player.yml" is now "players.yml", "ticket.yml" is not "tickets.yml"
    • New configuration options: place-deny-msg, break-deny-msg, use-deny-msg, wear-deny-msg, wear-deny-inv-full-msg
    • New option: Set new player join message by changing new-player-msg in config.yml. Supports the following tokens:
      • %p - The player's name
      • %j - The player's job
    • Various text changes and optimization
    • Corrected a bug where damage done could be increased, but not set to a value below the default.
    • Corrected a bug where players could still use a restricted item to attack an entity.
    • NOTHING or ALL in a jobs permit node now correctly overrides those present in "all".
    • Cleaned up output for verbose logging servers.
    • Corrected DayJobs attempting to initialize Spout, Permissions, or other dependencies before the dependencies were initialized on the server.
    • Added support for PermissionsBukkit.
    • Corrected zones occasionally killing players when permission was denied.
    • Set death spawn locations and new player spawn locations
    • Restrictable, per-job crafting
    Version 1.3

    • Corrected a bug that prevented normal players from using commands if Permissions was not present.
    • Player names are no longer case sensitive in commands.
    • An admin job change now notifies the target player of the change.
    • New command "/job admin exempt <player>" will toggle exempt status on target <player> and disable job limitations on them until the command is run again.
    • Exempt is no longer a permission node. See above.
    • New usage options. Enter "NOTHING" under a usage node (such as "can-use" or "can-break") to remove ALL usages from that category for that job. Enter "ALL" to allow usage of everything for that category.
    • Prettier job information output :3
    Version 1.2

    • Added configurable zones
    • Added the new configuration option "can-break"
    • Fixed a bug that could return null for certain configuration options if not set
    Version 1.1

    • Added configurable armor limitations
    • Changed message colors to a more standard motif
    • Fixed a bug that prevented help output from being displayed
    • Fixed a bug that could cause a debugging console to be spammed with NullPointerExceptions
    • DayJobs now requires the server-side version of Spout
    Version 1.0

    • Initial release
    Bug reporting:

    If you encounter any bugs or errors while using this plugin, please report it ASAP. If at all possible, it is preferable that you use the issue tracker provided by GitHub. Just follow this link to open the issue tracker for DayJobs. Please be as detailed as possible about your issue, and use a service such as Pastie for including stack traces and debug output.​

    Any bugs reported on the forum will most likely be addressed, eventually. But I will guarentee a quick response time for anything submitted to the issue tracker on GitHub.​

    Donating

    Like this plugin? Then consider donating! Not only will donations help keep this plugin active and alive, but for every $100 in donations I receive, I will guarantee a new release packed full of awesome new features. That's not to say I won't do releases otherwise, you don't have to worry about that. But for every $100 I'll drop whatever I'm doing and pump out a new version as fast as I possibly can! Interested? Click here to donate.

    Follow Daybreak Studios on Twitter! See updates, news, and other information related to Daybreak Studios as it happens. Also, I tend to get a bit bored while I'm working, so you can always feel free to watch me talk to myself as I work :p
     
    Fengi, Retaks, Parideis and 1 other person like this.
  2. Offline

    FuturaEX

    how long before u implent armor restriction??
     
  3. Offline

    LartTyler

    Not long, that was next on my todo list after the initial submission. I'm hoping to have something ready by tomorrow afternoon or Wednesday latest.
     
  4. Offline

    FuturaEX

    nice!, this is very usefull :)
     
  5. Offline

    LartTyler

    As promised, here it is! Version 1.1 features many changes and updates, such as Armor Restrictions and plenty of bug fixes. Enjoy!
     
  6. Offline

    FuturaEX

    any chance you will be adding damage config for weapons?? so we can configure how many hearts a weapon deals??
     
  7. Offline

    jonassm

    BOSEconomy ?
     
  8. Offline

    LartTyler

    I have plans on damage configuration in the next version, along with zone control. I have only planned iConomy, but I will most certainly look into BOSEconomy as well, jonassm.

    If there are any other requests, please feel free to ask. I have a good deal of features planned, but I would be happy to add almost anything else on request.
     
  9. Offline

    FuturaEX

    and when will the next version be ready? 1-2 weeks??
     
  10. Offline

    LartTyler

    By the end of the week, my goal is to have the next version out by tomorrow night, or Friday latest.
     
    FuturaEX likes this.
  11. Offline

    Tornado47

    Doesn't work for me. I'm sure it's my mistake, but I don't know what i did wrong:
    I installed Spout, then I dragged the DayJobs[...].jar into the plugins folder. But it didn't create a DayJobs folder. Then I tried to insert the folder of the .zip but it didn't work either. Do you know what I did wrong just by this explanation?

    "error message" is: "Can't find command, type help..."

    But for the plugin:
    Is there a way to make a "can-mine" or "can-destroy"?

    Otherwise a great plugin as far as I can tell, exactly what I've been looking for for our real life server! Only things I'm missing are mentioned above! Also, what I haven't tried yet: Is it possible to make the plugin only work in one of multiple worlds? Or alternatively: Can you make it valid/invalid in specific areas?

    Thank you in advance,
    Bernie

    PS: Sorry for any mistakes, I'm from Austria and just signed in to this Forum for your plugin ;)
     
  12. Offline

    LartTyler

    Tornado47,

    A fix for your issue would be to download the zip and unpack it in your plugins directory. Make sure the folder titled "dbstudios" is in your plugins directory, along with DayJobs-BRAVO-1_1-final.jar.

    Also, your error may be caused by Spout not being enabled before DayJobs. To see if this is the problem, simply rename Spout.jar to ASpout.jar to ensure that it loads before DayJobs.

    As for your requests, I can certainly add it in a later version. If not in the 1.2, I'll be sure to add it in for 1.3. I already had a feature like that planned, but it's good to know that it's a requested feature as well.

    And to everyone, 1.2 has been delayed slightly. I have some personal matters to attend to tonight and tomorrow morning, so I will not have time to finish work on 1.2. I should have a final build out by Saturday or Sunday night.
     
  13. Offline

    Tornado47

    Hy, thank you for your quick response!
    Tried everything as you said and now it seems to work! It just says an internal error occured, but that happened to my local server with another plugin as well while it worked on the online server, so I guess it's not a problem with the plugin! =) Thank you for your help!

    And for the updates: Just take your time =)
     
  14. Offline

    thernztrom

    @Tornado47 Is it done for release tonight? :D
     
  15. Offline

    LartTyler

    Yes, it's looking like a v1.2 release will be sometime tonight. Keep watching for updates!

    Everyone,

    I want to apologize, but it seems a release tonight will not be possible. It's 11pm here, and I'm still having issues with the zoning system, which was the main focus of this release. I will do my best to keep you all updated on the status of the project, and the v1.2 release date.

    Tyler

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

    LartTyler

    Here it is! Version 1.2, only a day late! I apologize for the delay, but it seems I bit off slightly more then I could chew by attempting to tackle the zone system in only a few days :p

    New features include a zoning system as well as the new configuration option "can-break", a working example of which is included in the zipped download.


    Tyler
     
  17. Offline

    Tornado47

    You're my hero :D
    Thanks a lot, I'll try it today in the afternoon!
     
  18. Offline

    LartTyler

    Any comments, thoughts, requests, etc. would be very welcome! :D
     
  19. Offline

    Ziszek

    Meybe someone know why when i type something else than simple "/job help" i got this error?:
    Code:
    [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'job' in plugin DayJobs v1.2
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:41)
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:162)
            at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:346)
            at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:736)
            at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:701)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:694)
            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:89)
            at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java:478)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:453)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:363)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Caused by: java.lang.NullPointerException
            at com.platymuus.bukkit.permcompat.PermissionHandler.internalHasPermission(PermissionHandler.java:23)
            at com.platymuus.bukkit.permcompat.PermissionHandler.has(PermissionHandler.java:48)
            at me.dbstudios.dayjobs.DayJobs.hasPerm(DayJobs.java:218)
            at me.dbstudios.dayjobs.DayJobsCommands.tryCommand(DayJobsCommands.java:113)
            at me.dbstudios.dayjobs.DayJobs.onCommand(DayJobs.java:110)
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:39)
            ... 13 more
    
    I have Spout 1.0.5 already installed.
     
  20. Offline

    LartTyler

    It's an issue with permissions. Did you give yourself the correct nodes?

    Scratch that, I found the problem. It's an issue with how my plugin validates permissions when the Permission plugin is not present (and I assume you aren't using it?). I will have a new version out with a fix by the end of the night.

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

    Ziszek

    I'm using PermissionsBukkit with Superperms. Plugin using Permissions 2.7.7 (SuperpermsBridge).
     
  22. Offline

    LartTyler

    Oh really? I haven't tested it with that yet, the only permissions I have tested this version with is the one I mention in the original post. I will look into it.
     
  23. Offline

    Ziszek

    That would be great :)
     
  24. Offline

    Asterdom

    I support this idea! Restrictions are a large part of a game. TomsRPG mod showed me that.

    This plugin tops it and it seems your quite set on continuing to improve it! Thank you so much for this plugin
     
  25. Offline

    LartTyler

    Another update! Version 1.3 adds some small tweaks, including some new options for usage nodes in config.yml, and some nicer looking output text for "/job info". Also, this update addresses a permissions bug that was pointed out by Ziszek, as well as fixes an unreported bug that could be present if the server was not using Permissions. Enjoy!
     
  26. Offline

    WhosDaMan

    I...I just fell in love.
     
  27. Offline

    LartTyler

    Whoo! That's the kinda thing I like to hear!!! :D

    Also, if anyone has any feature requests or ideas they would like to see implemented in the next version, please either post on here or PM me. I would love to hear what you all would like to have in 1.4.
     
  28. Offline

    thernztrom

    Add it to DevBukkit and get yourself a "Plugin Developer" stamp ;D
     
  29. Offline

    WhosDaMan

    Permissions for more than one zone? Maybe I want to make 10 zones :D
     
  30. Offline

    LartTyler

    Ahahaha that was next on my list, once I got everything squared away with 1.3 :p

    Just did that a moment ago :D For those who are interested, I created a complete guide to configuring and installing DayJobs, which can be found here.

    @WhosDaMan
    What do you mean? You can create as many zones as you want, and allow as many jobs per zone as you wish. Can you explain a bit more?

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

Share This Page