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. This mod sounds perfect for roleplay. Installing now.

    Are you going to update this to use PermissionsBukkit?

    Ah, this mod simply isn't working correctly at the moment. It was behaving strangely and not allowing anyone to do anything despite a well set config file.

    I hope it gets updated soon

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

    LartTyler

    @Clintonxa Have you assigned everyone a job? The default jobless class has very few permissions. If you have, then perhaps you could post your configuration? Also, I haven't tested the plugin with the new release of Bukkit just yet. Are you getting any error messages? Or is it simply not allowing players to do anything?
     
  4. Honestly, I can't remember right now, but if I remember right, even though I had an "all" permission for everyone to break certain blocks, we couldn't break any.

    The biggest issue for me is that I have to use the superpermsbridge for permissions, and for that, I have had to uninstall it. I simply cannot safely assign permissions to players with it.

    I'll try again once you update, I haven't got the time to do testing for someone else's mods. Sorry!
     
  5. Offline

    LartTyler

    Well, any error output you can provide would help me fix any issues that may exist.

    I will look into adding support for PermissionsBukkit as soon as I can.
     
  6. Offline

    Dungeon_Master

    I installed this mod on my server (Bukkit 1185, etc) I found that by putting letters in front of the actual .jar file names I could change the load order. For this mod I simply put a Z in front of it so it loaded last, as it appears to be unhappy if spout doesn't load first.

    I would REALLY love to see Right-Click catching (For Fishing Rods and the like) and hopefully Crafting (Workbench) limiting as well. I couldn' seem to limit water buckets, lava buckets either.

    At present any body can fashion any tool, and go fisihing. I've written some very extensive classes (and prestige classes) and would like to restrict food gathering and prodcution (ie cooking - cakes, stew, bread) to a single class.

    Also, I am running this mod with MCMMO and it appears to be conflicting with the Acrobatics Skill (ie we get no experience from falling while running this mod) if you could get a chance to look at that too it would be much appreciated.
     
  7. Offline

    thedark54

  8. Offline

    Dungeon_Master

    ^
    Try renaming the .jar file in your plugin folder by putting a z or zzz in front of the file name. dayjobs wont load until spout has loaded and bukkit loads .jar files alphabetically. Worked for me.
     
  9. Offline

    thedark54

  10. Offline

    LartTyler

    @Dungeon_Master
    I am aware of this issue. It's a relatively simple fix, and will be patched in the next version.

    @thedark54
    It would be very helpful if you could post what plugins you are using as well. Also, it's not necessary to use a larger font then everyone else, I can see just fine...
     
  11. Offline

    Dungeon_Master

    It appears that swords (and possibly other items) can be used by anybody to attack monsters but not to say, chop a tree. I have a 'Miner' class who should only be able to use a wood sword (triple checked my configs) and is using iron to attack monsters without a 'Your class cant use this' message. The message only appears if he tries to break a block with the sword. This makes my 'Warrior' class redundant.
     
  12. Offline

    LartTyler

    Really? That seems odd, it should trigger for any left click while holding an invalid item. I'll check into that. Thanks for letting me know.

    Also, just as a thought, did you maybe put "IRON_SWORD" in config.all? That could be why it allows it.
     
  13. Offline

    Dungeon_Master

    Fair call, and I did double check it just then. Only sword under ALL is WOOD_SWORD.
    I'm guessing the game processes left clicks on blocks differently to left clicks on creatures?

    At present, assuming your class cannot use Stone, Iron, Gold or Diamond Swords. You equip a Stone Sword.
    You can swing at nothing (air) and receive no "You cannot use.." message.
    You swing at a block (dirt/stone/etc) you DO receive a "You cannot use.." message and true to it's word you cannot destroy the block.
    You swing at a mob (zombie/etc) and you receive NO "You cannot use.." message.

    I'm going to try and upload my config for you so you can take a look. Its a little sloppy, so forgive me, I need to tidy up a few bits and pieces. But it might help. Also, if anyone else is interested I have made 6 core classes and 14 prestige classes. I combine this with mcmmo with the idea that once players reach a certain power level they can choose a prestige class.
     

    Attached Files:

  14. Offline

    LartTyler

    Wow. That's really all I can say. That is quite a config file you've got there :3 Impressive really, I can tell you put alot of work into this :) Kinda feels good to see my work used this way :D

    Anyway, you're right, there does not seem to be any configuration problems. I'm currently revamping all my code for a version 2.0, and I will most definitely keep this bug in mind. You can expect a fix within the next couple of days.
     
  15. Offline

    Dungeon_Master

    Thanks for the reply. I suppose it really depends on the limitations of the game and bukkit. One idea I had though, if the game wont stop you from swinging swords at monsters, you could probably trick it by reducing all damage you deal to zero while using a sword you are not supposed to?

    I've seen another MOD which allows the prevention of crafting certain recipes, but it appears to apply to all players unless you fiddle with permissions and make groups within that. Running 20 mods to do one thing doesn't sound good to me, any chance you could take a peak into this down the track and implement something similar?

    I like the fact that this mod can easily stack with any of a number of XP/SKILL mods to really create very diverse characters. I'll try to sit down with the config file in the next few days and really tidy it up and refine it, I have list of feedback from my players, most of it 'Why can't I break dirt while I'm holding dirt?' because when I first created that config I wasn't entirely sure of how the CAN_USE function worked. Ill post a clean and tidy version of the config here when done.

    Really enjoy your mod, keep up the good work!

    EDIT: I started fooling around with Damages, but perhaps I'm doing something wrong. If I set a value to 100 its pretty much instant death, as it should be. However a value of zero or even -100 doesn't appear to reduce the damage to anything lower than normal Minecraft damage. Can you point me in the right direction? For instance, I'd like the warrior class to take less damage from mobs, hunters and farmers might get less damage from contact, etc.
     
  16. Offline

    LartTyler

    The crafting was on my to do list, but I had to put it on the back burner when I found some small holes in my code that caused the plugin to crash in extreme circumstances. Thus, the total rewrite of the code. I'm certain I can restrict crafting fairly easily, I will definitely look into it.

    As for the damages, I'm not sure what to tell you. I had never had an issue with it, but there may be something I missed during bug testing. If that's the case, then I apologize; I'm a one man team here, and it's very difficult to keep up with every issue. I will be sure to correct that as well in my rewrite.

    Thank you very much for your feedback and interest, it's great to see that there are those who enjoy and use my plugin :) Let me know if you encounter any other problems, or have any other questions or requests you'd like to see added to the plugin. I will certainly consider the viability of anything you would like to see added in future releases.
     
  17. Offline

    Alexxondre

    Hello, i've got this error when someone join :
    Code:
    2011-09-30 16:29:07 [SEVERE] Could not pass event PLAYER_JOIN to DayJobs
    java.lang.NullPointerException
        at me.dbstudios.dayjobs.DayJobs.getPlayerName(DayJobs.java:713)
        at me.dbstudios.dayjobs.DayJobs.getJob(DayJobs.java:224)
        at me.dbstudios.dayjobs.DayJobs.playerExists(DayJobs.java:336)
        at me.dbstudios.dayjobs.DayJobsPlayerListener.onPlayerJoin(DayJobsPlayerListener.java:22)
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:244)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:338)
        at net.minecraft.server.ServerConfigurationManager.c(ServerConfigurationManager.java:126)
        at net.minecraft.server.NetLoginHandler.b(NetLoginHandler.java:116)
        at net.minecraft.server.NetLoginHandler.a(NetLoginHandler.java:75)
        at net.minecraft.server.Packet1Login.a(SourceFile:59)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
        at net.minecraft.server.NetLoginHandler.a(NetLoginHandler.java:41)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:94)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:464)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    
    and this one when they move around in the world :

    Code:
    2011-09-30 16:29:12 [SEVERE] Could not pass event PLAYER_MOVE to DayJobs
    java.lang.NullPointerException
        at me.dbstudios.dayjobs.DayJobs.getPlayerLocation(DayJobs.java:605)
        at me.dbstudios.dayjobs.DayJobs.isWithin(DayJobs.java:552)
        at me.dbstudios.dayjobs.DayJobsPlayerListener.onPlayerMove(DayJobsPlayerListener.java:84)
        at org.bukkit.plugin.java.JavaPluginLoader$7.execute(JavaPluginLoader.java:286)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:338)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:180)
        at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java:618)
        at net.minecraft.server.Packet10Flying.a(SourceFile:126)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:92)
        at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java:500)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:464)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    I've got "An internal error [...]" when i try /job list for example.
    I've bukkit build #1185 and the latest Spout server plugin running.
     
  18. Offline

    LartTyler

    Do you have the configuration files in the correct place?

    I never tested with the 1185 build of Bukkit. I'm currently in the process of rewriting my code from scratch in order to clean up some bugs and errors as well as be sure everything complies with 1185. You can expect version 2.0 by the end of the weekend, it should fix any issues you may be having that are not being caused by absent or misconfigured files.
     
  19. Offline

    Alexxondre

    I'll try to see if there's something wrong with the configuration file. However i'll wait for the next release.
    Thanks for your work!
     
  20. Offline

    LartTyler

    Version 2.0 is out! Check out the huge list of bug fixes and new features for more information!
     
  21. Offline

    thedark54

  22. Offline

    LartTyler

    @thedark54
    This problem could be because the configurations that come with the plugin are the same ones I use for testing. Try removing any zones present in zones.yml, as well as both the death and new player spawns in spawns.yml. If this doesn't work, let me know.
     
  23. Offline

    thedark54

  24. Offline

    LartTyler

    @thedark54
    Could you be a bit more detailed? What were you doing when this happened? I can see that it was caused by a command, what command where you attempting to execute? Was it run from in game, or from the console? I need more information in order to correct this error.
     
  25. Offline

    thedark54

    When I type / job list is written an internal error occurred while attempting to perform this command
    Sorry for my English, I'm french
     
  26. Offline

    LartTyler

    No worries. What are you using for permissions? Did you type the command in the server's console, or in game? And is config.yml present and in the correct place, with jobs configured and set up?
     
  27. Offline

    thedark54

    Hello, I type the command in the chat in game, config.yml is the default config files.
    Thank you for this plugin
     
  28. Offline

    LartTyler

    The only thing that might be a problem (based on the stack trace you posted) is that there is something wrong with your Permissions. What are you using for Permissions? Right now, the only supported permission handler is Permissions, PermissionsBukkit, and the default Op status. If you're sure that the permissions is set up correctly, could you perhaps post your config.yml? There might be something in there that could help.
     
  29. Offline

    thedark54

  30. Offline

    legired

    hello, I would like to know how to make a farming profession? to plant the seeds etc ..

    sorry for my bad english, i'm french
     
  31. Offline

    LartTyler

    @thedark54
    Hmm... I don't see anything there... Your error seems very odd, I haven't been able to recreate it on my own server yet. You said you're Op, but do you have any permission handler on your server? What other plugins are you running?

    @legired
    It depends on what you wanted your farmer to be able to use. You can look at the defaul config.yml file to see how item and block limitations can be achieved, but I would suggest doing something like adding WOOD_HOE, STONE_HOE, etc, to your can-use, and then SEEDS in can-place. For a full walkthrough on creating jobs and setting up the plugin, you can go to the DevBukkit page.
     

Share This Page