Inactive [ADMN] PetitionPlugin v1.4 - Help ticket system [1597]

Discussion in 'Inactive/Unsupported Plugins' started by ATCPlugins, Jul 23, 2011.

  1. Offline

    ATCPlugins

    This plugin is used for players to log problems, requests and complaints. It relies on Vault for permissions support.

    Get PetitionPlugin on BukkitDev!

    The source code is available on github, feel free to do whatever you want with it. If you use it to save the universe, credits would be nice.
    If you would like to make a pull request the github repo can be found at: https://github.com/Xemnas33/PetitionPlugin

    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".
    • 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 PetitionPlugin from BukkitDev
    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!
    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.
    v1.35 - Added log file (Thanks Juze!)
    v1.4 - Now requires Vault & fixed a bug with the unassign command.

    Dependencies:
    Permissions
    • 'petition.pe' 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' and 'petition.moderator' 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 :)
     
    sourcemaker, Karlkorv, CubieX and 2 others like this.
  2. Offline

    THG3

    Code:
    2011-09-10 04:16:36 [SEVERE] 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:129)
        at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:352)
        at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:737)
        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:454)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:363)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Caused by: java.lang.NumberFormatException: For input string: "<271>"
        at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
        at java.lang.Integer.parseInt(Integer.java:481)
        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)
        ... 13 more
     
  3. Offline

    Juze

    If anyone is interested, here's an updated version (a fork) which I made from v1.34. Petitions are now also logged into a seperate web-friendly textfile in PetitionPlugin folder, with newest petitions at top. Also fixed a few issues.

    Currently, the logging cannot be disabled because I was too tired to make a config option for it.

    Code:
    [October 30, 2011, 20:08] (Console) closed ticket #5.
    [October 30, 2011, 20:07] (Console) opened ticket #5. Test
    [October 30, 2011, 20:07] (Console) opened ticket #4. Test
    [October 30, 2011, 20:07] (Console) opened ticket #3. Test
    [October 30, 2011, 20:07] (Console) opened ticket #2. Test
    
    Download:
    PetitionPlugin.jar
    Source Code

    EDIT: Hold on, compile error on Java 6 because I reinstalled my PC with Java 7...
    EDIT2: Finally solved that issue too, reuploaded.
    EDIT3: I will be taking over the PetitionPlugin project in few days.
     
    kahlilnc likes this.
  4. Offline

    CubieX

    Hopefully this will be maintained for MC 1.0 and the upcomming CB.
    I tried some other ticket plugins, but I like this one the most. Helped us alot on our server to keep things organized.

    @ATCPlugins
    @Juze
    Btw. while translating the messages to german, I found a false method call.
    When using the "/pe unassign" chat command, the performAssign() - method gets called instead of the performUnassign() method.
    I fixed it for myselve, but it might be a useful hint for the authors.

    Also: A seperate language txt file would be great. But this would involve a complete rewrite of all the methods....
    But perharps in a later release? :)
     
  5. Offline

    Juze

    I believe unassign is indeed defined in performAssign() method, I was wondering what kind of a weird solution that was. I'm still looking forward to take over this project someday when I have time.
     
  6. Offline

    CubieX

    Well, it did not unassign an allready assigned ticket at all, by using the aproppriate command,
    so I had a look at it.
    Could not find any reference to the Unassign method though. :oops:
    Perharps ATC changed it and forgot to edit the method call. Anyway. Now it works for us like expected.

    I would love to see this plugin updated for the upcoming Bukkit release.
     
  7. Offline

    Juze

    Will see how much time I have, I'd love to update this but school and my server keep me busy all the time. :oops:

    EDIT: Might be able to pinch in time from schoolwork.
     
  8. Offline

    Xemnas33

    Yeah, school pretty much means the same for me..I get a few chances here and there to post on here so just letting you know i'll upload your version to the dev bukkit page if you could give me a changelog of everything if possible please :)? If not i'll see if I can find some free time to see what's changed.
     
  9. Offline

    Juze

    The only thing changed is the new log file, I wouldn't consider it as a full new update but an unfinished dev build instead, I may be collaborating with HelpTicket plugin and eventually merge those two.
     
  10. Offline

    Xemnas33

    Okay thanks!

    PetitionPlugin v1.35 has been uploaded to BukkitDev and Juze has told me it has been tested to work with #1550
     
  11. Offline

    SkyCraft

    Does this support PermissoinsBukkit yet?
     
  12. Offline

    ATCPlugins

    Not yet, we're re-coding the project from scratch but that could take some time. If my knowledge is correct you should be able to use the bridge plugin as this does support the VERY outdated permissions 2.7.4.
     
  13. Offline

    SkyCraft

    Yeah, I saw that bridge plugin, but there wasn't too much information on how to use it. I will look into it a bit more because I really want to use this.
     
  14. Offline

    generilisk

    It's as simple as dropping it in.
     
  15. Offline

    SkyCraft

    Don't you have to put like superpermbridge.*node*?
     
  16. Offline

    ATCPlugins

    I'm unsure, you'll have to find out on the thread. I'll be working on the plugin over the next few days. Hoping to get something with most of the features done by just after Christmas.
     
  17. Offline

    generilisk

    I didn't, it works fine on my server.
     
  18. Offline

    CubieX

    @ATCPlugins If you are recoding this from scratch, could you add multi-language support?
    Currently all the messages are scattered directly in the code. It's a hell of a work to search and translate every piece of these message strings after every new update.
    I did it 2 times now, and it's an awful job. :/
    A single textfile for every language like it's used in the ChestShop, LWC or Essentials plugins for example, would be really really handy.
    Many messages are written a dozen times in the code, so why not using a reference to the matching string in a language text file instead? ;)
     
  19. Offline

    Xemnas33

    I shall look into it! Might not make it into my first release as I want that to just be the basic working plugin but it should definitely make it into the second :)

    What languages were you thinking of?

    P.S For a faster reply i'd post on the BukkitDev page preferably on the forum.
     
  20. Offline

    ATCPlugins

    PetitionPlugin v1.4 is out!

    Changelog for this version:
    • Now requires Vault for permissions handling.
    • Fixed a bug with the unassign command.
     
  21. Offline

    DJDUDE

    When i try to Do my petition plugin it said this

    10:05:47 [SEVERE] Could not load 'plugins/PetitionPlugin.jar' in folder 'plugins':
    org.bukkit.plugin.UnknownDependencyException: Vault
    at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:165)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:156)
    at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:132)
    at net.minecraft.server.ServerConfigurationManager.<init>(ServerConfigurationManager.java:52)
    at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:148)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:407)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:465)

    Please Help me by fixing this. Thx.:D
     
  22. Offline

    ATCPlugins

    You need Vault. I hardly check this thread so if you ever need help please go to the bukkitdev page.
     
  23. Offline

    DJDUDE

    i know i figured it out
     
  24. Offline

    Telbaru

    Is there any update for 1.2.4?
     
  25. Offline

    DudeClank60

    When i try to assign a petition to a op it says "an internal error has occured whn trying to preform this command"
    Can anyone help me? I have the latest version of Vault and Petition Plugin.
     
  26. Offline

    Icee2199

    Awesome Plugin I love it!
     
  27. Offline

    KingFlowy

    Can you let me translate it in german?
     

Share This Page