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

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

  1. Offline

    FloydATC

    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.

    Features:
    • 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
    Code:
    /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)
    Settings
    The configuration file is optional, the following settings are available:
    Code:
    single=Petition
    plural=Petitions
    notify-all-on-close=false
    notify-owner-on-assign=true
    notify-owner-on-unassign=true
    notify-interval-seconds=300
    warp-requires-permission=false
    Command examples
    A player in distress:
    Code:
    /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:
    Code:
    /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.

    Changelog:
    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.

    Dependencies:
    • Requires the Permissions plugin (2.6 or equivalent required) Use other versions or compatible plugins at own risk.
    Permissions
    • '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

    FloydATC

    And they should be able to, if given 'petition.moderate' permission. I can't reproduce this problem so I'm a little lost here.

    I can't reproduce this either..? 8-| Have you confirmed these problems yourself, or were they reported to you from someone else?

    @xZise: As pointed out by ntwitch already, omit the '#' character, it is used for visibility only. I may add checks for this because I see a lot of errors in my own logs too. Might be useful to get a human-readable response pointing you in the right direction instead of the generic Java OMGWTF!!"!# error message :-D
     
  3. Offline

    xZise

    Yes I know, but maybe simply print a message, so that the player knows, what he did wrong. On my server, somebody typed the id "#6" and simply get the error message, that there was an error but it doesn't specify which error exactly. She had to inform me and I had to check the logs.

    I know, but not my users ;)

    Fabian
     
  4. Offline

    ntwitch

    I confirmed the unassign problem myself, I even tried from console and it reassigned the petition to (Console) :D

    And no, I didn't check the warp myself, one of the moderators reported it, he tested several times while I watched.

    as you can see they have petition.moderate:
    Code:
     201     Moderator:
     202         default: false
     203         permissions:
     204         - worldguard.god
     205         - worldguard.region
     206         - worldguard.region.list
     207         - worldguard.region.info
     208         - worldguard.region.info.*
     209         - worldguard.region.setparent
     210         - worldguard.region.setparent.*
     211         - worldguard.region.define
     212         - worldguard.region.remove
     213         - worldguard.region.remove.*
     214         - worldguard.region.select
     215         - worldguard.region.select.*
     216         - bb.admin.info
     217         - commandbook.bans.ban
     218         - groupmanager.manuadd
     219         - magiccarpet.mc
     220         - mcbans.ban.global
     221         - mcbans.ban.local
     222         - mcbans.ban.view
     223         - mcbans.kick
     224         - mcbans.lookup
     225         - mcbans.mod
     226         - mcbans.tempban
     227         - nocheat.notify
     228         - petition.moderate
     229         - petition.warp-to-own
     230         - petition.warp-to-own-if-assigned
     231         - towny.town.claim
     232         - tpp.jump.*
     233         - tpp.mod.above
     234         - tpp.request
     235         - tpp.tp.*
     236         - tpp.world.tp
     237         - worldedit.analysis.*
     238         - worldedit.butcher
     239         - worldedit.extinguish
     240         - worldedit.selection.*
     241         - heroicrebuke.add
    
    EDIT: realized I was on 1.33 not 1.34. will test again. your changelog didn't report any related changes but hey I might as well be on the latest version right? :D
     
  5. Offline

    FloydATC

    1.33 and 1.34 should behave exactly the same because there have been no changes the warp or assign/unassign code. Weird.
     
  6. Offline

    xZise

    How could I allow others to comment/view the petitions of others?

    Fabian
     
  7. Offline

    FloydATC

    Only by granting them the 'petition.moderate' permission.

    I would strongly recommend against doing this for ordinary players, because it would effectively cripple the use of PetitionPlugin for reporting such delicate matters as abuse and griefing.
     
  8. Offline

    xZise

    Okay, but I want to allow others to comment the petitions. Could you implement something like this? Especially if there are categories, so you could allow to comment on one category by everyone and on others only by editors/moderators.

    Fabian
     
  9. Offline

    Kresnik002

    its working on 733?
     
  10. Offline

    FloydATC

    Yes. Updating the title now.
     
  11. Offline

    TewDIE

    Is there a way to use a plugin like this connected to a MySQL Database to receive the messages even if I'm on another server?
     
  12. Offline

    FloydATC

    As soon as I get the time to do it, I will try to make the plugin support MySQL as an alternate back-end to flat file storage. The problem is, I'm still quite inexperienced with Java. Meanwhile, stuff like work and family tends to take time away from the things that really matter ;-)
     
  13. Offline

    TewDIE

    I hear ya :) Well imo it should be able to work with 2 servers with the same plugin connected to the same MySQL database. I don't know much about programming an databases but that seems logical to me :) I might just use some IRC channel thru the servers instead so people can always reach me if something is wrong.
     
  14. Hey could you make that when you go online and a ticket was editet that you get a message?
     
  15. Offline

    FloydATC

    This feature is already in place; players receive a notification if any of their tickets have been commented or closed.
     
  16. Great plugin, MySQL support or some email/notification interface would be great, anything that allows me to link it up to IRC ;)
     
  17. Offline

    kmccmk9

    Hey, is there any way you can post the source?
     
  18. Offline

    FloydATC

    The full source is included in the .jar file, and also on github
     
  19. Offline

    kmccmk9

    Awesome thank you!
     
  20. Offline

    Castiana

    Code:
    2011-05-25 17:31:57 [SEVERE] Error occurred while enabling PetitionPlugin v1.34 (Is it up to date?): Plugin attempted to register PLAYER_JOIN while not enabled
    org.bukkit.plugin.IllegalPluginAccessException: Plugin attempted to register PLAYER_JOIN while not enabled
    	at org.bukkit.plugin.SimplePluginManager.registerEvent(SimplePluginManager.java:346)
    	at com.floyd.bukkit.petition.PetitionPlugin.onEnable(PetitionPlugin.java:81)
    	at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:125)
    	at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:750)
    	at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:253)
    	at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:132)
    	at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:110)
    	at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:218)
    	at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:205)
    	at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:145)
    	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:265)
    	at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    
    Running the latest version of Bukkit :)
     
  21. Offline

    FloydATC

    Bukkit must be doing something funny, because it's not possible for the plugin to register anything while not enabled; the code to register events is in the onEnable handler where it belongs. Still, I see this from time to time with all plugins.

    Meanwhile, I'm running v1.34 on Bukkit #803 without issues so just reload and it should be fine. The PlayerJoin event is used for notifications and I just double-checked that those still work.
     
  22. Offline

    xZise

    Maybe you disable your plugin in onEnable? I forgot to break the enable if I disable it while it is enabling.

    Fabian
     
  23. Offline

    xZise

    Is there any development going on? Escpecially to mark petitions as public so everyone could edit them?

    Fabian
     
  24. Offline

    Xemnas33

    There is development going on, we're just at a slow pace at the moment due to real life matters. If you want to make any pull requests there is a github.

    I believe our main aim for the next release is to add mysql support.
     
  25. Offline

    Peter Hsieh

    Hello. I was just wondering ... Looking at the First post~ It says that /pe can be changed by Server Administrator.. but also says its been removed as of 1.20?
    If this is the case, can you please consider putting this option in, as /pe <-- isn't a command easy to remember by our users. Something more generic such as /ticket, /support?
    If it is already changeable.. please share XD.
    Thanks for creating this great ticket systems - I use it mainly cause of the commenting system per ticket. :)
     
  26. Offline

    FloydATC

    Unfortunately, Bukkit currently requires all commands to be declared in plugin.yml, which means it's impossible to reconfigure them on the fly. Hopefully this will be possible again in the future.
     
  27. Offline

    Peter Hsieh

    Is there a way to do this.. Not on the fly, I don't mind changing the plugin.yml ~ I just need the /pe to be changed >.<. Sorry to be a bother :S.
     
  28. Offline

    FloydATC

    The source is included in the .jar, you could edit the command handler and the yml file, then recompile it using ant or Eclipse. Or just teach your users what a "petition" is :-D
     
  29. Offline

    Peter Hsieh

    Ok. I'll have a look into it.
    I'm ptretty sure my users know what a petition is....but it seems to be in slightly the wrong context :|
    A petition is a formal request, often signed by others, to show support of a particular clause...
    But your mod is more of a support 1 on 1 ticket system, user and op.
    That's how I see it anyways xD.

    Thanks for you help.. And great mod :)
     
  30. Offline

    pyros

    Hi, this is immensely useful on my server so thankyou
    Just a few suggestions: A tag based petition, so that a petition with tag "antigrief" for example is forwarded only to those in the antigrief group in permissions, and those with the ability to see all.
    A system to assign a pe to the first person available who can fulfill that would be nice also within a certain group (so if there is a higher level person on, they arent bombarded with tickets if no one in said group is online), although this obviously needs to be in use with the tag system
     
  31. Offline

    lucky644

    Love this plugin, I read but I haven't seen a way to omit searches. I know I can /pe list online or offline, or a specific user or who its assigned to. But what I want to see everything, except something that is, for instance, assigned to 'Banker' or 'Mods' but I want to see everything else

    ex) /pe list -mods -banker online

    To show all petitions that aren't assigned to mods, or bankers, and only ones that the players are online.
     

Share This Page