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

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

     
  1. Offline

    FloydATC

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    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.  
  3. Offline

    Kainzo

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Still rocking hard on this plugin - keep up the good work mang.
  4. Offline

    ntwitch

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Our moderators can not warp to petitions except ones they created. I have given them all the permissions you listed. I would like for moderators to be able to warp to any open petition.

    Also the 'unassign' command doesn't remove the assignment, it re-assigns it to the person issuing the unassign command.

    Aside from those issues, this is a great plugin, and has saved me loads of time keeping up with problems around the server.
  5. Offline

    xZise

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Hello, I'm getting following error:
    Code:
    21:53:12 [SCHWERWIEGEND] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'pe' in plugin PetitionPlugin v1.34
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:80)
            at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:254)
            at net.minecraft.server.NetServerHandler.c(NetServerHandler.java:596)
            at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:559)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:553)
            at net.minecraft.server.Packet3Chat.a(SourceFile:24)
            at net.minecraft.server.NetworkManager.a(NetworkManager.java:198)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:72)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:368)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    Caused by: java.lang.NumberFormatException: For input string: "#6"
            at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
            at java.lang.Integer.parseInt(Integer.java:470)
            at java.lang.Integer.valueOf(Integer.java:570)
            at com.floyd.bukkit.petition.PetitionPlugin.performView(PetitionPlugin.java:460)
            at com.floyd.bukkit.petition.PetitionPlugin.onCommand(PetitionPlugin.java:113)
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
            ... 12 more
    
    Fabian
  6. Offline

    ntwitch

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    @xZise: you don't need the '#' on the petition ID when putting in /pe commands :)

    Still it should probably be caught and handled.
  7. Offline

    FloydATC

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    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
  8. Offline

    xZise

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    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
  9. Offline

    ntwitch

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    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
  10. Offline

    FloydATC

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    1.33 and 1.34 should behave exactly the same because there have been no changes the warp or assign/unassign code. Weird.
  11. Offline

    xZise

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    How could I allow others to comment/view the petitions of others?

    Fabian
  12. Offline

    FloydATC

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    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.
  13. Offline

    xZise

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    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
  14. Offline

    Kresnik002

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    its working on 733?
  15. Offline

    FloydATC

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Yes. Updating the title now.
  16. Offline

    TewDIE

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    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?
  17. Offline

    FloydATC

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    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 ;-)
  18. Offline

    TewDIE

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    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.
  19. Offline

    Raphnika

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Hey could you make that when you go online and a ticket was editet that you get a message?
  20. Offline

    FloydATC

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    This feature is already in place; players receive a notification if any of their tickets have been commented or closed.
  21. Offline

    Joy

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Great plugin, MySQL support or some email/notification interface would be great, anything that allows me to link it up to IRC ;)
  22. Offline

    kmccmk9

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Hey, is there any way you can post the source?
  23. Offline

    FloydATC

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    The full source is included in the .jar file, and also on github
  24. Offline

    kmccmk9

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Awesome thank you!
  25. Offline

    Castiana

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    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 :)
  26. Offline

    FloydATC

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    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.
  27. Offline

    xZise

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Maybe you disable your plugin in onEnable? I forgot to break the enable if I disable it while it is enabling.

    Fabian
  28. Offline

    xZise

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Is there any development going on? Escpecially to mark petitions as public so everyone could edit them?

    Fabian
  29. Offline

    Xemnas33

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    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.
  30. Offline

    Peter Hsieh

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    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. :)
  31. Offline

    FloydATC

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    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.
  32. Offline

    Peter Hsieh

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    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.

Share This Page