Inactive [ADMN/MISC]ReferGift v1.0.9 - Refer a friend & receive a gift![BROKEN] [1.4.6 - R0.3]

Discussion in 'Inactive/Unsupported Plugins' started by TopGear93, Mar 15, 2012.

  1. Offline

    TopGear93

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    ReferGift
    v1.0.9

    If you refer a friend to the server your on, the server will gift you a configurable item with a configurable amount! For you to recieve this gift you must have your friend type /referedby <yourname>.

    Description:
    • safety Checks so people cant constantly refer themselves or friends.
    • command locking system. Command only can be used once per person.
    • configurable gifts with amounts.
    • broadcasts who refered whom.
    • saves a list in the config of who used the command.
    • saves a list in the config of who refered whom.
    Commands:

    checks plugin version
    /rg version

    refering command
    /referredby <name>

    reloads config + server
    /rg reload

    player wasnt refered but still receives gift
    /notreferred

    Permissions:
    Code:
    refergift.config.reload
    refergift.referrals
    refergift.referredby
    refergift.notreferred
    refergift.version
    
    Requirements:
    Vault + any permissions system + economy

    Configuration Template:

    Code:
    # ReferGift
    refergift:
      title: ReferGift
      alreadyreferred: You have already been listed!
      getreferredby: ' got referred by '
      YouWereRewarded: You have been rewarded
      thanksfor: 'Thanks for refering '
      configreloaded: Configs reloaded!
      noreferself: You can't refer yourself you silly goose!
      confignoperms: No permissions to reload config!
      playernotavailable: Player is not available!
      offlinegiftmsg: Thanks for refering a player to the server!
      wereyoureferred1: If you were referred to this server type or if you were not referred type
      wereyoureferred2: /referredby <player>
      wereyoureferred3: /notreferred
      savingitemtofile: Saving gift to file!
      referredgeneralnoperms: No permissions to use /referredby!
      notreferredmsg: Thanks for choosing our server!
      playerreferralamount: ' referred '
      notreferrednoperms: No permissions to use /notreferred!
      playersingular: ' player'
      playerhasnoinfo: has not referred a player!
      playermultiple: ' players'
      nicetrynoloopholes: Nice try! Dont use loopholes!
      alreadynotreferred: You have already referred someone!
      ranoutoftimemsg: You ran out of time to refer someone! You cannot try again!
      thanksforgiftmsg: Thanks for refering a player to our server!
      notreferredmsg2: You said that you were not referred! You cannot try again!
      versionnoperms: No permissions to check version!
      typetochat: type /chat on
      totalnoperms: No permissions to check referring totals!
      welcomemsg: 'Welcome back '
      thereferrer: You have referred someone. You cant be the referred one!
      gift: '56'
      notreferred:
        gift:
          gift: '56'
          amount: 1
        moneyamount: 10
      amount: 1
      referredby:
        moneyamount: 10
      delay: 1200
      money:
        switch: true
      welcomemessage:
        switch: true
    
    Code:
    #DO NOT EDIT THIS FILE. IF YOU DO THERE WILL BE ERRORS! I WILL NOT SUPPORT THOSE WHO EDIT THIS FILE!
    #THIS FILE CONTAINS ALL LISTS THAT ARE USED TO STORE PLAYER NAMES!
    #NotReferred[]
    #ReferredList[]
    #RewardSave[]
    #TheReferred[]
    #TheReferrer[]
    

    Gifts run off of IDs.
    thereferred = the referred player
    referredlist = list of who refered whom.
    thereferrer = who referred the player
    notreferred = who wasnt referred
    nochatting = list of who cant chat
    rewardsave = who gets their offline reward

    welcomemessage:switch: true
    When this is set to true, all returning players will receive a welcome message. When this is false they wont get the message.
    money:switch: true
    When this is set true then the player will receive money instead of blocks.

    Metrics:
    http://mcstats.org/plugin/ReferGift

    Download:
    https://dl.dropbox.com/u/1015938/plugins/ReferGift.jar


    BukkitDev:
    http://dev.bukkit.org/server-mods/refergift/

    Todo:

    • proper chatting system
    Changelog:

    v1.0.8 - Semi rebuilt
    • Fixes all deprecations.
    • Fixes a couple silly command issues.
    • Removed chatting system till I get a proper one going.
    • started working on a new arraylist system.
    v1.0.9 - small update
    • Cleaned up plugin. file size is smaller
    • adds seperate file for arraylists only. Loads, saves, and fully understands the new file. file is called "lists.yml". its' located with the default config in the ReferGift folder.
    • Shutoff server and delete the old refergift folder. Start server with v1.0.9 installed and the new file will generate. Why should you delete the other config? It just prevents errors.
    Issues:

    Plugin wont work? Follow this form.
    • Plugin version your running
      -
    • Server version your running
      -
    • Java version your PC/server is running
      -
    • What did you do that caused this error? Be specific!
      -
    • Are you renting a server or are you dedicated? yes or no
      -
    • Provide photo evidence or possible video evidence.
      -
    • Getting a NPE? Any errors popping up in the console? Show me them within a
      -
      Code:
      
      
    if you find any -
    • Spelling issues
    • backward configs
    • bad permission nodes
    • or any other ridiculous issues post them here politely.
    Common errors while using my plugins:

    Lists not saving to correct location:
    • Fix - Stop server, delete config, restart server.

    [IMG]
    Based on a work at ReferGift
    Permissions beyond the scope of this license may be available at TopGear93 Profile.

    [IMG]

    This post has been edited 109 times. It was last edited by TopGear93 Jan 15, 2013.
  2. Offline

    md_5

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Approved
  3. Offline

    JPW

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Can you please add another Permission node for using the /refer command? I mean that only members can use it. (offline-server)
    Thank you,
    JPW
  4. Offline

    migsthegod

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Awesome!
    However i found a bug,

    If a player uses caps on his name, he can refer HIMSELF.

    Ex: MyNAmE <-player name
    player can refer self by using /referedby myname <-- note: no caps

    Could you make it case sensitive? :D
    TopGear93 likes this.
  5. Offline

    JamieSinn

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    you might want to add a anti self use by using the sender/target players
  6. Offline

    CayceH

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I have gotten this error:
    17:39:26 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'referedby' in plugin ReferGift v0.1
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:42)
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:166)
    at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:469)
    at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:907)
    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:867)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:850)
    at net.minecraft.server.Packet3Chat.handle(Packet3Chat.java:33)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:229)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:116)
    at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:78)
    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:554)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:452)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:490)
    Caused by: java.lang.RuntimeException: Permissions manager is not accessable. Is the PermissionsEx plugin enabled?
    at ru.tehkode.permissions.bukkit.PermissionsEx.getPermissionManager(PermissionsEx.java:150)
    at ru.tehkode.permissions.bukkit.PermissionsEx.getUser(PermissionsEx.java:157)
    at ru.tehkode.permissions.bukkit.superperms.PermissiblePEX.isPermissionSet(PermissiblePEX.java:199)
    at org.bukkit.permissions.PermissibleBase.hasPermission(PermissibleBase.java:71)
    at ru.tehkode.permissions.bukkit.superperms.PermissiblePEX.checkPermission(PermissiblePEX.java:112)
    at ru.tehkode.permissions.bukkit.superperms.PermissiblePEX.hasPermission(PermissiblePEX.java:101)
    at org.bukkit.craftbukkit.entity.CraftHumanEntity.hasPermission(CraftHumanEntity.java:99)
    at org.bukkit.craftbukkit.CraftServer.broadcast(CraftServer.java:958)
    at org.bukkit.craftbukkit.CraftServer.broadcastMessage(CraftServer.java:322)
    at org.bukkit.Bukkit.broadcastMessage(Bukkit.java:122)
    at us.topgear93.refergift.ReferGift.onCommand(ReferGift.java:71)
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40)
    ... 12 more

    EDIT: I think it is a problem with PermissionsEX just want to make sure.

    This post has been edited 1 time. It was last edited by CayceH Mar 16, 2012.
  7. Offline

    kahlilnc

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Support Moniez? :(
  8. Offline

    FreeZoneCraft

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I agree bro! Add eco support Iconomy4-5-6 and BOSEco :D
  9. Offline

    HARDLINE_98

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    You should so you can make the console perform commands and make them last a certain amount of time after somebody has been referred. Also if they refer a certain amount of people it performs a different command.
  10. Offline

    simuciokas

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I agree too, i would like to see eco support added :)
  11. Offline

    columb

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Permission to use /referedby <name>? Would be useful for server with permission based whitelist.
  12. Offline

    gustebeast

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Suggestions:
    • If the new player puts the referrer as someone who isn't online, the 'gift' is stored until that player logs in.
    • Prevent the "refer yourself" glitch where you type your own name with odd capitalization. For instance, /referedby GuStEbEaSt gives me the reward.
    • Make a time out. The new player (newbie) only has X seconds to type the command after joining.
    • If that time expires, the newbie is logged into the system as not referring anyone.
    • A command for newbies who wern't referred (e.g. /referredby none, or /notreferred)
    • A system to shut off outside chat for the newbie (to prevent others from tricking the newbie)
    • Permissions for the refer command (to prevent advanced groups from using it)
    • Checks previous players to integrate a 'Did you mean?' system. If newbie types /referredby doug, it would reply back, "Do you mean 'doug378'?". This would make it more simple for the newbie.
    • Make messages configurable (Just to be complete)

    This post has been edited 5 times. It was last edited by gustebeast Mar 19, 2012.
  13. Offline

    painisgod

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    how do i change so you can only gain 3 diamonds?
  14. Offline

    gustebeast

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Thanks for looking at the suggestions, preferably do them top to bottom, as I rated them in importance.
    P.S. thanks, ive been looking for a plugin of this nature for ages :D

    This post has been edited 1 time. It was last edited by gustebeast Mar 19, 2012.
    TopGear93 likes this.
  15. Offline

    gustebeast

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Yes. If i was an average player looking for rewards, I would hang out at the spawn and, when a new person joined, immediatly say "if you type /referedby gustebeast, ill give you 10 iron!". The new player, would of course do it, not knowing what the command does. I think this would be a big problem, and that the only solution is to turn off chat for the player. One example is Buycraft, when you type /buy, it opens up a chat thing, and you dont recieve any chat from anyone else. Here it would be the same way, except the chat would be off until the person typed the command. (by outside chat, I just mean all global chat)
    TopGear93 likes this.
  16. Offline

    gustebeast

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Also, a note about the capitalization error. Please don't fix it by adding case sensitivity, as this would make it much harder for the new player to get the username right. Instead, you should actually remove capitalization entirely, so if the newbie types /referedby GuStEbEaSt, the plugin would read it as gustebeast, instead of replying "that user doesn't exist"

    This post has been edited 2 times. It was last edited by gustebeast Mar 20, 2012.
  17. Offline

    gustebeast

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    any idea on how long the delay feature might take? just wondering cause i could implement this plugin now and work around the delay, or could have it built in.

    This post has been edited 2 times. It was last edited by gustebeast Mar 20, 2012.
  18. Offline

    gustebeast

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Its 5:47 now, so it would be ready at around 8?
    Oh and could you get the gift storage feature in too? Those are the two features I need to be able to run it.

    This post has been edited 2 times. It was last edited by gustebeast Mar 20, 2012.
  19. Offline

    gustebeast

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    if you can, get storage instead of delay. Without storage, the person needs to be online at the time, usually when I refer people, it is at school or something, they wouldn't necessarily join at a time when I was online.
  20. Offline

    duker02

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Sorry to be such a pain, but my OCD is kicking in. Can you please change the command to /referredby? I see that in all of your commands you spelled "referred" wrong. Sorry, but I love this plugin and it's bugging me that people have to type in a misspelled command.
    TopGear93 likes this.
  21. Offline

    gustebeast

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Hey TopGear, you made messages configurable, but not entirely. Could you make it show exactly what appears in chat. So in the config it would be say...
    ( getreferedby: [&cReferGift&f] &6 ' &fgot refered by &6 ' ) instead of ( getreferedby: ' got refered by ' )
    I ask because I might want to change the prefix [ReferGift] to [RG] and I probably will want to change the color scheme.
    And yes please do fix refered to referred

    This post has been edited 2 times. It was last edited by gustebeast Mar 20, 2012.
  22. Offline

    gustebeast

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    sounds good! Please do post up any stable versions you land at though :), even if all the to-do's arn't there yet.
    P.S. I could help u test if u need it.

    This post has been edited 1 time. It was last edited by gustebeast Mar 21, 2012.
  23. Offline

    Ebins

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I can't get this to work for iPermissions. It only works when Owner/Op does the referral.. doesn't work for anyone else. They all have the permission refergift.allow.... any suggestions? My users REALLY want this! :D
  24. Offline

    gustebeast

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I have a great idea! dont use iPermissions! PermissionsBukkit works for any node, and is easy to use.
  25. Offline

    Ebins

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Oops, I said iPermissions? Sorry, that was a major typo.. I AM using bPermissions and I also have vault installed. =/ I don't get any error messages when the server is loading, so I don't know what the issue is :(
  26. Offline

    gustebeast

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    No worries, most developes dont even listen to the issues that given to them, your fast compared to the ones I've worked worked with!
  27. Offline

    gustebeast

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Also, can you open your profile to the public? Its just kind of annoying to not know when your online or when u were last online.
  28. Offline

    bellettiboy

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    ok i fricking love this plugin about 10 of my players bring there firiends now thank yyou so muchhh ::))))0
    TopGear93 likes this.
  29. Offline

    Rowtag

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Command doesn't work for me /referedby or /notrefered, just shows unknown command.
  30. Offline

    peng_bears

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    waiting on a couple of todos to be completed but this looks like a good idea and nice plugin, will be checking it out soon, good work

Share This Page