[INACTIVE][ADMN] PetitionPlugin v1.34 - Help ticket system [600-818]

Discussion in 'Inactive/Unsupported Plugins' started by FloydATC, Jan 20, 2011.

  1. Offline


    This plugin is used for players to log problems, requests and complaints. This plugin relies on Permissions.jar for access control. This will ofcourse be changed once permissions are properly implemented in Bukkit.

    The source code is included in the .jar file, feel free to do whatever you want with it. If you use it to save the universe, credits would be nice.

    • Players may open one or more petitions and get assigned a unique ticket # for each. This number can be used to track the petition until it has been closed.
    • Each petition may be assigned to a specific op/admin or left as unassigned
    • Players as well as ops/admins may add comments to an open petition
    • Ops/admins (and currently players) may warp to the location where the petition was opened
    • Ops/admins (and currently players) may review the history of each open petition
    • Closed petitions are archived and can be reviewed or reopened by moderators
    • Use the command "/petition" or the shorthand command "/pe". These can be reconfigured if you want. Option to change these was removed in v1.20, sorry.
    • All commands are case-insensitive
    • New and updated petitions are announced to everyone with 'petition.moderate' permission
    • Want to call them something else than petitions? This can be configured.
    • Supports multiple worlds
    • Offline players receive notifications on petition updates when logging in
    • Server admins can handle petitions on the server console
    • Players and moderators are reminded of their open petitions at configurable intervals
    Command syntax
    /pe open|create|new <Message>
    /pe comment|log <#> <Message>
    /pe close <#> [<Message>]
    /pe list [<count>]
    /pe view <#>
    /pe assign <#> [<Operator>]
    /pe unassign <#>
    /pe warp|goto <#>
    Note that the command/alias "/pe" can no longer be changed by the server administrator.

    How to install
    1. Download http://minecraft.atc.no/plugins/PetitionPlugin.jar
    2. Copy it to your "plugins" directory
    3. Optionally create a new directory called "plugins/PetitionPlugin"
    4. Optionally create a new directory called "plugins/PetitionPlugin/archive"
    5. Optionally create a new file "plugins/PetitionPlugin/settings.txt"
    6. Load the plugin (Restart the server, or use any plugin you have for this purpose)
    The configuration file is optional, the following settings are available:
    Command examples
    A player in distress:
    /pe open Someone has burned down my home!
    # the player receives a ticket number, say 45 for this example
    /pe comment 45 And killed my chicken!
    The brave (but slightly insensitive) administrator arrives:
    /pe list
    # the plugin shows me a list of currently open petitions
    /pe assign 45 FloydATC
    # the petition status is changed to show that I am now handling this incident
    /pe warp 45
    # I am teleported to the scene
    /pe comment 45 Nice crater
    /pe close 45 Feather refunded, have a nice day
    # +1 served
    Again, note that the command/alias "/pe" can be changed by the server administrator.

    v1.00 - Original release
    v1.01 - Rebuild (fixed onPlayerCommand issue)
    v1.02 - Implemented locking and permissions
    v1.03 - Added notifications and colors, and fixed a stupid permission bug
    v1.04 - Fixed a few problems with notifications, added more colors.
    v1.05 - Command/alias can now be configured. More colors.
    v1.06 - Fixed crash bug when closing without a comment. Added optional notifications on assign/unassign.
    v1.07 - Improved error-checking. Players may now list/close/comment/view/warp to their own petitions.
    v1.08 - Automatically create necessary directories and files if they don't exist
    v1.10 - A few cosmetic fixes + petition length in header
    v1.11 - Added experimental support for multiple worlds
    v1.12 - Changed to use world name instead of ID
    v1.20 - Rewrote to use onCommand(), fixed /pe warp security issue + much more.
    v1.21 - Removed the "stupidly long constructor" as per Bukkit team recommendation
    v1.22 - Implemented a notification system for offline players, admins and operators
    v1.23 - Fixed duplicate messages. Commands now work from the server console.
    v1.24 - Added optional setting to limit use of warp. Petitions are now almost listed in correct order.
    v1.25 - Fixed null pointer error on player join.
    v1.26 - Petitions are now listed in correct order. Finally.
    v1.27 - Optional online/offline filter to /pe list implemented.
    v1.28 - Non-moderators could assign/unassign their petitions. Fixed.
    v1.30 - Closed petitions may be viewed and reopened. Added list filters "closed", "unassigned", "newest" plus Regular Expression matching.
    v1.31 - The list would always get reversed. Fixed.
    v1.32 - Notification thread implemented, remind users and mods at regular intervals.
    v1.33 - Changed onPlayerJoin() as required by build #600. Fixed deprecated call to void teleportTo().
    v1.34 - Added option to notify all players when a petition is closed, not just the moderators.

    • Requires the Permissions plugin (2.6 or equivalent required) Use other versions or compatible plugins at own risk.
    • 'petition' required to open, comment and view a petition
    • 'petition.warp-to-own' required IF 'warp-requires-permission' is enabled
    • 'petition.warp-to-own-if-assigned' required IF 'warp-requires-permission' is enabled
    • 'petition.moderate' required for everything else
    Known problems
    Certain situations can lead to double notifications, such as an operator commenting on his own petition. Colorization is work-in-progress.

    I'm a Java newbie, please be gentle.
    Thank you :)
    DJdur, Phaedrus, kahlilnc and 3 others like this.
  2. Offline


    it works fine now, thanks ! like this plugin
  3. Offline


    Build 345 Dues not work give the Server Nul cant load message then long line of errors

    Ps: any thing above 350 atm kills all plugins 345 seems to work for 90% of all plugins atm
  4. Offline

    Nathan C

    Working on the latest build of CraftBukkit, Minecraft 1.3.

    Thank you. This plugin makes my life so much easier.
  5. Offline


    440 (secret) build works!
  6. Offline


    Question about the latest version:
    When you close a petition, will that player receive the answer when he/she is offline? If not then could you make it so that players are able to manage the petition(s) they opened? Maybe similar to the mail system where you can check the inbox whenever you want to, read incoming letters (even if they were sent when you were offline) and delete the messages you don't need anymore. Thanks.
  7. Offline


    No. This is my biggest concern with the plugin at the moment, offline users really don't get notified about anything at all when they come back online which means old petitions tend to pile up. I have a few ideas cooking so stay in touch.
  8. Offline


  9. Offline


    The error message indicates someone tried to issue the command "/pe list carmeops" which is a syntax error. "/pe list" currently only accepts an optional integer argument; the number of petitions to list. The default is 10.
  10. Offline


    Thanks so much!
  11. Offline


    Is it possible to add MySQL support ?
    I use multiservers and I would like to use a global petition system.
    Thx :)
  12. Offline


    I must say I really enjoy this plugin. I will soon be opening my server and while testing this it has proven a great addition. There is one thing I dislike. when setting up permissions I feel that NON Op players have a little to many commands in there. I would like them to only be able to open and list maybe comment. I do not like them being able to Warp too the location, as well as view other or comment on other tickets that they have not opened, is there a way to limit commands further? So they can only open and view their own status?
  13. Offline


    I cant get this working for some reason CB 440
    Players that type /pe open testing
    get an error msgs saying
    'use /pe without parameters for detailed help'

    Edit: even using just '/pe' returns that error msg
  14. Offline


    As of a few versions back, they should only be able to list, view, comment or warp to their own petitions. If they try to access someone elses petition, they should get an error message. If you can demonstrate a problem with this then I'm very interested in a bug report so I can look into it.

    The idea is that admins/operators should be able to comment on an issue even when the player is offline, then later on the player can review his own petition, respond to questions and get back to where the issue was opened.
    --- merged: Mar 2, 2011 7:38 PM ---
    I'm running 440jnks myself at the moment and I have nt seen this problem. Are you sure Permissions is up to date and properly configured? Its config file must be renamed because it is now world-aware.
    --- merged: Mar 2, 2011 7:53 PM ---
    I've just posted an updated version, v1.22. This version introduces offline messages to petition owners and assignees. Hopefully this will make it easier to help offline players. Messages are kept in a new directory structure called "mail":
    Messages are created in tmp and then moved to inbox. Each message is stored as plain text in a unique filename (as generated by java.util.UUID). When the player joins, the inbox directory is scanned, each file is displayed and then deleted. This design should be thread-safe, please let me know if you see a weakness.

    One known issue: Until I get the proper filtering logic in place, this means an online admins/operators will get one personalized message plus one broadcast message for any petition assigned to them.
  15. Offline


    Im using Groupmanager w/ Fake Permissions since Ninji kinda gave up on everything but iCon.
    I can show you my data.yml if you'd like

  16. Offline


    Uhh... I don't have a clue why it doesn't work.... no other plugins have a problem with your setup??
    --- merged: Mar 3, 2011 8:51 PM ---
    New version posted: v1.23
    Duplicate messages should now be all but eliminated.
    Also, it is now finally possible for admins to use the petition command from the server console. This has been tested quite a bit but I may have missed something so please report any crashes with a full stack trace.
  17. Offline


    Great mod! Have a question tho...Is there any way for you to make the warp to petition feature turned off/on for a group with permissions like petition.warp , Or add it to the settings file like PlayerWarp = false , ModWarp = true.

    It would be nice to limit warping to the petition point only to admins and mods, this way a player can't make warp points with petitions...Thanks and keep up the great work.
  18. Offline


    Hmm is this a big problem? I'd love to hear some more opinions on this, as the issue of restricted access to the various subcommands seems to pop up every now and then.

    I think maybe I'll solve this with a set of options to ensure backwards-compatibility. E.g. if "require-warp-permission=true" in settings.txt then "petition.warp" or "petition.moderate" would be required to use the warp feature. Similar options for view, close etc. would allow fine-tuning for those who want it, while keeping things simple for those who just want to stay with the default behaviour.

    OR should I simply scrap the current "simple" permission model and go for a full fine-grained set of permissions?
  19. Offline


    The problem I have is a smart player might use the /pe new command to place a warp spot he would like to warp back to , then use /pe warp command as his own teleport system until the petitions are closed. It is a small problem, it just would be nice if you could toggle a option...another possible option for this would be to disable the warping feature for players unless the petition is assigned to a mod.

    And about the settings/permissions, that is a pretty good idea to have a setting that can turn on/off certain permissions, that way its simple by default but has more options for people that want to have more control over it.
  20. Offline


    @aodgizmo: Good idea, the if-assigned rule strikes a nice balance IMO.

    I've just posted an updated version, v1.24. Here are the changes:
    1. An optional setting has been added: "warp-requires-permission". The default value is "false". If set to "true", warping to a petition is possible only if one of the following is true:
      • Player has "petition.moderate"
      • Player created the petition and has "petition.warp-to-own"
      • Player created the petition, has "petition.warp-to-own-if-assigned" and the petition has been assigned by a mod or admin.
    2. The onJoin help message was only supposed to show if there were offline messages waiting. Fixed.
    3. Petitions are now finally listed in numerical (=chronological) order.
    I can only test so many combinations of settings before my eyes start to glaze over so I'll need some help testing this new "advanced" setting to make sure I got the logic right. If you see any weird results, please review the settings and permissions carefully, then post a summary explaining how to reproduce the problem.
  21. Offline


    i get the following error im on cb 456
    2011-03-05 05:09:07 [SEVERE] Could not pass event PLAYER_JOIN to PetitionPlugin
    at com.floyd.bukkit.petition.PetitionPlayerListener.onPlayerJoin(PetitionPlayerListener.java:40)
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:130)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:225)
    at net.minecraft.server.ServerConfigurationManager.a(ServerConfigurationManager.java:97)
    at net.minecraft.server.NetLoginHandler.b(NetLoginHandler.java:87)
    at net.minecraft.server.NetLoginHandler.a(NetLoginHandler.java:27)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:87)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:338)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:253)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
  22. Offline


    @ScottSpittle: I just went from 440 to 493 on my test server and got the same error. Updating to the latest Permissions (2.5.2) seems to have solved the problem.
  23. Offline


    I use Groupmanager 0.99d
  24. Offline


    Just tried out 1.24 and the permissions seem to work great , thanks for adding them!...however I noticed I get the same error as Scott when I join my server (Permissions 2.5.2 / CB build 493) ,everything seems to work fine tho. Will do some more testing over time and let you know if I find any bugs.
  25. Offline


    yea mine works fine, ji jsut get errors too. which i wouldn't mind but tt would increase log sizes
  26. Offline


    v1.25 posted, this fixes a stupid null pointer error on player join.
    v1.26 posted, this fixes an even more stupid error in the sort algorithm.
    Yesterday wasn't one of my best days ;-)
  27. Offline


    sounds like a helpful plugin anyway to get it so it doesnt require permissions?
  28. Offline


    You're free to edit the source and remove the Permissions code if you want to, but I wouldn't recommend it.
  29. Offline


    Tested - no issues atm.
    Is there a way to enable the /pe view Offline? or /pe list online ?
  30. Offline


    No. It will be done :)
  31. Offline


    woo! Great changes over time btw - I couldnt function very well without petitions

Share This Page