killstreaks help

Discussion in 'Plugin Development' started by Retrosize, Dec 14, 2014.

Thread Status:
Not open for further replies.
  1. Offline


    hello i currently have this:
    public class PlayerListener implements Listener {
        public PlayerListener(Main plugin){
            plugin.getServer().getPluginManager().registerEvents(this, plugin);
    along with a killstreak sort of event but i want to know how can i set it so when the player dies their killstreak sets to 0
  2. Offline


    @Retrosize Well you are going to need to give us a lot more code to see what you are doing. That snippet of code does not tell us much. We need to see how you are tracking their kill streaks.
  3. Online

    timtower Administrator Administrator Moderator

  4. Offline


    @Retrosize To elaborate on Timtower's answer:
    1. public class PlayerListener implements Listener {
    2. public PlayerListener(Main plugin) {
    3. plugin.getServer().getPluginManager().registerEvents(this, plugin);
    4. }
    6. @EventHandler
    7. public void playerDeath(PlayerDeathEvent ev) {
    8. yourScoreMap.put(ev.getPlayer(), 0);
    9. }
    10. }

    This is not at all complete. You have to do whatever your plugin needs if you want this class to be finished.
  5. Offline

  6. Offline


    @3ShotGod Use a HashMap to store the Player's name and his current kill streak, and when he dies reset the HashMap xD
  7. Offline


    Im not the one who needs that lol
Thread Status:
Not open for further replies.

Share This Page