Filled Money Plugin

Discussion in 'Archived: Plugin Requests' started by 17xDillz1997, Aug 23, 2014.

  1. Offline

    17xDillz1997

    Basically I want it to be when a player joins, and someone welcomes them, they get $75. No config, no nothing. But make it so that after 7 seconds, any welcoming won't work on the player and they won't get money. Pretty simple. A timer makes it so they can't welcome too late. Thanks.
     
  2. Offline

    MCMastery

    What do you mean by "welcome"? And who is "they get the money"?
     
  3. Offline

    17xDillz1997

    When a player joins, to make people want to welcome others, the player gets $75 for welcoming a new player. Just by saying 'Welcome' within 7 seconds of the newcomer joining, they get the money.
     
  4. Offline

    Marten Mooij

  5. Online

    timtower Administrator Administrator Moderator

    Marten Mooij Always use Vault, it works with every economy plugin.
     
  6. Offline

    Marten Mooij

    17xDillz1997 likes this.
  7. Offline

    17xDillz1997

    Is anyone working on this?
     
  8. Offline

    iNooBxJoKez

    I thought you could set the money players start with, with Essentials?
     
  9. Offline

    17xDillz1997

    ...
    NO.
    This is so when someone WELCOMES someone, they get MONEY.
     
  10. Offline

    kps1796

    17xDillz1997 I can do this - but how is my plugin supposed to know if the player is joining for the first time?
    EDIT: nevermind, I think I know how.
    Do you need a message to be displayed as well?
     
  11. Offline

    Marten Mooij

    kps1796
    Code:
    if(player.hasPlayedBefore() == false){
    //World Explodes
     
  12. Offline

    xAstraah

    Last edited by a moderator: Jun 10, 2016
    dentych likes this.
  13. Offline

    17xDillz1997

    I wanted it for when a player joins for the first time. This way people cannot just leave and join and say 'welcome' to get money.

    I realised a few bugs:
    People can say 'Welcome' multiple times to get cash.
    If any sentence has 'Welcome' in it with a capital 'W' they get $75.

    Thanks for your effort so far, you're amazing.
     
  14. Offline

    xAstraah

    @17xDillz199,
    I have added the following code:
    Code:java
    1. if(sd.contains(p.getName())) {
    2. return;
    3. }
    4.  
    5. sd.add(p.getName());
    6.  
    7. Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(this, new Runnable() {
    8. public void run() {
    9. sd.remove(p.getName());
    10. }
    11. }, 140L);

    New download: https://drive.google.com/file/d/0B3nfDLDrJYvdRmFoZ0NaNm9jek0/edit?usp=sharing

    Changes:
    - Stopped being able to spam 'Welcome' and receive more money. Now cancels if they have already said it.

    NOTE: If a sentance contains Welcome it will give them $75 as long as the ArrayList is not empty. This is so that it can support messages such as "Welcome you whale!", or "Welcome xAstraah!" Also it checks for Lowercase too.

    EDIT: New Source: http://pastebin.com/raw.php?i=pTf18rmK
     
  15. Offline

    17xDillz1997

    So this isn't if they join for first time?
     
  16. Offline

    xAstraah

  17. Offline

    17xDillz1997

    I welcome myself after I join, and after anytime I join, (even if I'm not new), I still get $75.
     
  18. Offline

    xAstraah

  19. Offline

    17xDillz1997

    Works perfectly, I thank you so very much. Do you want me to put this on Bukkit or keep it private? I could credit you if you want.
     
  20. Online

    timtower Administrator Administrator Moderator

    17xDillz1997 You aren't exactly allowed to upload files that aren't yours.
     
  21. Offline

    xAstraah

    17xDillz1997, I give permission for this plugin to be posted on BukkitDev but i would like the be a Plugin Manager or Whatever on the post. Also i will update it if so. And credit will be given at the top of the page.
     
  22. Offline

    17xDillz1997

    timtower xAstraah

    Exactly why I asked.
    No problem, I'll keep it private for now.
     

Share This Page