[ADMIN/MECH] SummaCodes v1.10 - Simple, easy and flexible redeemable codes [1.2]

Discussion in 'Inactive/Unsupported Plugins' started by Hidendra, May 22, 2011.

  1. Offline

    Hidendra

    SummaCodes v1.10

    Download
    http://griefcraft.com/bukkit/summacodes/release/SummaCodes.jar

    Source
    https://github.com/Hidendra/SummaCodes

    SummaCodes is a plugin that handles "redeem codes." It uses Bukkit's built in persistence database, so it can be configured to use SQLite (default) or MySQL via bukkit.yml

    Codes can be configured to give items and iConomy money. Codes can also be configured to expire at a set time (e.g in 5 hours, or 10 minutes, or 5 seconds, or 1 month, and so on.)

    Usage


    Commands

    Features

    Permissions
    Regular usage:
    Admin usage:

    Changelog
    1.10
    • 1.2 support
    • Vault support
    1.00
    • Initial release

    enjoy.
     
    Juze, bconnerly and Taranis01 like this.
  2. Offline

    Juze

    Nice rework on code redeem, thanks for this! :)
     
  3. in plugins/SummaCodes
     
  4. Offline

    godgodgodgo

    No, in the root directory of your server
     
  5. Also is there any howto for setting this up using MySQL? as stated in the description?

    I tried the following in bukkit.yml
    Code:
    SummaCodes:
        storage:
            type: SQL
            dbms: MYSQL
            uri: jdbc:mysql://localhost:3306/summacodes
            username: user
            password: pass


    Fixed the ebean error. still getting the below.
    Code:
    20:08:39 [INFO] DataSourcePool [SummaCodes] autoCommit[false] transIsolation[SERIALIZABLE] min[2] max[20]
    20:08:39 [INFO] SubClassFactory parent ClassLoader [org.bukkit.plugin.java.PluginClassLoader]
    20:08:40 [INFO] Entities enhanced[0] subclassed[1]
    20:08:40 [INFO] -> PLAYER_CHAT
    20:08:40 [INFO] -> PLAYER_QUIT
    20:08:40 [INFO] RedeemCodes enabled: 1.00-rc1
    
    Note This is the only plugin currently running. I have disabled all others to trouble shoot this error in my logs.

    I'm running b860.

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

    godgodgodgo

    Yeh... and? I get that as well but the plugin works fine.
     
  7. True. I guess I could just ingore it. Just thought it looked like a bad error. Will still use it but will keep an eye on it. Any luck getting it set up with mysql?
     
  8. Offline

    godgodgodgo

    No I don't see any reason to.
     
  9. Was thinking of a more automated way to insert new codes into it. On a donation level type thing...
     
  10. Offline

    Hidendra

    It uses Bukkit's persistence, so it can be configured to use MySQL.

    First, you need to modify your startup arguments. Two easy ways to do it:
    If you use LWC with MySQL
    Code:
        -cp plugins/LWC/lib/mysql.jar;.
    
    Example:
        java -Xmx1024m -cp plugins/LWC/lib/mysql.jar;. -jar CraftBukkit.jar
    
    Without LWC+MySQL
    Code:
    Download the following to the lib folder in your root minecraft dir: (mysql.jar)
        http://griefcraft.com/bukkit/shared/lib/mysql.jar
    
    Now add this to your startup args for minecraft
        -cp lib/mysql.jar;.
    
    Example
        java -Xmx1024m -cp lib/mysql.jar;. -jar CraftBukkit.jar
    

    Now open up bukkit.yml in your root MC dir. Modify it to something like this:
    Code:
    database:
        username: YourUsername
        isolation: SERIALIZABLE
        driver: org.gjt.mm.mysql.Driver
        password: YourPassword
        url: jdbc:mysql://127.0.0.1/bukkit
    settings:
        update-folder: update
    
    This assumes you run the MySQL server on the local server. All you need to change is YourUsername, YourPassword, and if you wish to use a different database than bukkit, change /bukkit to /DBNAME

    SummaCodes uses the table name sx_codes


    That should be it. Just run the server again and it should be OK. Warning: does not convert old codes!
     
  11. Perfect!! thanks for the how to... I think it will help more people then me also.. Thanks again..
     
  12. Offline

    GmK

    @Hidendra

    Started getting this since today:

    Code:
    2011-06-23 13:20:37 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'redeem' in plugin SummaCodes v1.0
    Caused by: javax.persistence.PersistenceException: ERROR executing DML bindLog[] error[Data truncation: Data too long for column 'code_players' at row 1]
    Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'code_players' at row 1
    
    Is that to worry?
     
  13. Offline

    Malchus

    I constantly get this error
    01:52:08 [SEVERE] FATAL: DataSourcePool [SummaCodes] is down!!!
    com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

    The last packet successfully received from the server was 30,001 milliseconds ago. The last packet sent successfully to the server was 0 milliseconds ago.
    at sun.reflect.GeneratedConstructorAccessor53.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
    at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1116)
    at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3082)
    at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2968)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3516)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1986)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2140)
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2620)
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2570)
    at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1474)
    at com.avaje.ebeaninternal.server.lib.sql.DataSourcePool.testConnection(DataSourcePool.java:497)
    at com.avaje.ebeaninternal.server.lib.sql.DataSourcePool.checkDataSource(DataSourcePool.java:356)
    at com.avaje.ebeaninternal.server.lib.sql.DataSourceManager.checkDataSource(DataSourceManager.java:228)
    at com.avaje.ebeaninternal.server.lib.sql.DataSourceManager.access$100(DataSourceManager.java:37)
    at com.avaje.ebeaninternal.server.lib.sql.DataSourceManager$Checker.run(DataSourceManager.java:240)
    at com.avaje.ebeaninternal.server.lib.BackgroundThread$Runner.runJobs(BackgroundThread.java:208)
    at com.avaje.ebeaninternal.server.lib.BackgroundThread$Runner.run(BackgroundThread.java:172)
    at java.lang.Thread.run(Thread.java:680)
    Caused by: java.io.EOFException: Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost.
    at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:2529)
    at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2979)
    ... 15 more
    01:52:08 [INFO] Reseting DataSourcePool [SummaCodes] min:2 max:20 free:0 busy:1 waiting:0 highWaterMark:1 waitCount:0 hitCount:188
    01:52:08 [INFO] Busy Connections:
    name[SummaCodes.39] startTime[1309157528146] stmt[null] createdBy[null]

    01:52:08 [INFO] Closing Connection[SummaCodes.39] psReuse[0] psCreate[0] psSize[0]
    01:52:08 [SEVERE] Closing Connection[SummaCodes.39] that is already closed?
     
  14. Is it possible to you to make it connect to a DB?
    so i can use php whith it.
     
  15. Offline

    GmK

    Read 4-5 posts up ;)
     
  16. Offline

    Fuzi0nv2

    i cant seem to get this plugin to work. i have it installed but when i type in codes none of the commands show up. can anyone help
     
  17. Offline

    sfxworks

    How do I setup for mysql?
     
  18. Offline

    Mike120

    Simply amazing! We had some world corruption so we had to edit all out stuff to a new world & this worked great for giving people some money & tools to help with moving. Thanks a bunch!
     
  19. Offline

    maetthew

    Wow this plugin is THE BEAST. Will definitely use this when it works with 953 or equivalent
     
  20. Offline

    gameswereus

    Are you going to update the plugin to the latest RB soon?
     
  21. Offline

    Zecharian

    Is it possible with this plugin to maybe have it execute a command on redeeming? Like if a user has a code, they can redeem it and it would change the group they belong in and such like that? With my server, new people joining cannot build and are very limited until we can place them in a different group. With this, it would be nice to be able to give out a code to people we know so when they join, they can just redeem it and be moved to the group automatically.
     
  22. Offline

    Johnnyboy118

    I will use this plugin after it has been updated to build 953, Thanks.
     
  23. Offline

    maetthew

    Good idea!
     
  24. Offline

    Charlie Gordon

    How can I have it so that the item's attached to the redeem code are put in the players storage slots, rather than in the hotkey slots? If this isn't an option please add it asap! :D
     
  25. Offline

    generilisk

    Is this compatible with SuperPerms?
     
  26. Offline

    MikeA

    Will this be updated?
     
  27. Offline

    Piket95

    fantastic plugin, but when i makes a code with iconomy (i became money for redeem) then i become the "An internal error occurred while attempting to perform this command" Error in-game... What have i done wrong or what can i do that it works??

    Thanks for help and sry for my bad english :D

    LG
    Piket95
     
  28. Offline

    Piket95

    Will this Plugin be updated or can someone help me with my problem???
     
  29. Offline

    Jacklivsey1988

    could you please add more currency plugins,such as essentials and BOSEeconomy?
    please reply
     
  30. Hey, hidendra.

    when I make a code with Iconomy 6 I always get huge errors and when a player used the code nothing happens.

    Can you help me or is it a problem with this pluggin?
     
  31. WAY, WAY, i use this plugin!

    :(, need to fix it myself
     

Share This Page