KitReward Plugin

Discussion in 'Archived: Plugin Requests' started by DiamondSworder, Oct 10, 2012.

  1. Offline

    DiamondSworder

    KitReward

    Plugin category: PvP

    Suggested name: KitReward

    What I want: I would like a plugin what pays you money when you kill a player
    EG
    if i killed you i could get payed a random amount of money between $10-100
    i would like a config what you can edit the message with it pays Eg
    [KitWars] You have killed (PLAYERNAME) You have been rewarded (AMOUNT)

    Ideas for commands: /Kitreward reload (To reload config)

    Ideas for permissions: Kitreward.reload (Allows Access to reload config)

    When I'd like it by: Asap
     
  2. Offline

    Woobie

    He did, so did i.
    We cant find anything that fits his needs.
     
  3. Offline

    W&L-Craft

    There is a plugin that rewards you when killing players, but i forgot the name,

    Im searching right now

    Oh, my bad it is really outdated :S

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

    Woobie

    There is alot of plugins that rewards the player for killing other players, but none of them fits his needs.
    I tried doing this by myself, but failed terribly.
    I think this doesnt have nothing to do with rewarding players with money :3
    Code:
    package me.woobie.pvpreward;
     
    import java.util.logging.Logger;
     
    import org.bukkit.ChatColor;
    import org.bukkit.entity.Player;
    import org.bukkit.event.EventHandler;
    import org.bukkit.event.Listener;
    import org.bukkit.event.entity.EntityDeathEvent;
    import org.bukkit.plugin.PluginManager;
    import org.bukkit.plugin.RegisteredServiceProvider;
    import org.bukkit.plugin.java.JavaPlugin;
     
    public class Main extends JavaPlugin implements Listener {
     
        private static final Logger log = Logger.getLogger("Minecraft");
        private static Main Economy = null;
     
        public void onEnable() {
            System.out.println("Plugin Enabled");
            PluginManager pm = getServer().getPluginManager();
            pm.registerEvents(this, this);
            if (!setupEconomy() ) {
                    log.info(String.format("[%s] - Disabled due to no Vault dependency found!", getDescription().getName()));
                    getServer().getPluginManager().disablePlugin(this);
                    return;
            }
        }
     
        public void onDisable() {
            System.out.println("Plugin Disabled");
        }
       
            @EventHandler
            public void onDeath(EntityDeathEvent e) {
                if (e.getEntity() instanceof Player) {
                    Player killer = (Player) e.getEntity();
                    if(killer.getKiller() != null) {
                        Main.Economy.bankDeposit(killer, 100);
                        killer.sendMessage(ChatColor.GRAY + "Test");
                    }
                }
            }
           
           
            private void bankDeposit(Player killer, int i) {
               
            }
     
            private boolean setupEconomy() {
                    if (getServer().getPluginManager().getPlugin("Vault") == null) {
                        return false;
                    }
                    RegisteredServiceProvider<Main> rsp = getServer().getServicesManager().getRegistration(Main.class);
                    if (rsp == null) {
                        return false;
                    }
                    Economy = rsp.getProvider();
                    return Economy != null;
                }
       
    }
     
  5. Offline

    DiamondSworder

Share This Page