Plugin category: PVP Suggested name: SimpleKillStreak A bit about me: Just a server owner that wants to suggest a simple but cool plugin What I want: Nothing fancy. I was just thinking of having a plugin that announces a "message" when a player gets a "#/amount" of player kills in a row without dying. Ideas for commands: /ks 'x' 'message' -where 'x' is the number of kills in a row which when reached announces 'message' ****command is optional****if keeping it simple means just using a config file that would be fine. as long as messages are customizable Ideas for permissions: A simple "killstreak.allow" and "killstreak.configure/admin" is enough? Willing to pay up to: $1 When I'd like it by: "Yesterday, though obviously it'll take a while before anyone more than a few takes notice of this post, I'll keep bumping it." Devs who might be interested in this: wouldnt know
I might take this up. Seems simple enough. The only thing I see as a problem would be the command you suggest of changing the value, and the permissions. If I get this right, you want when someone gets a set amount of kills to be broadcasted in a message saying something like "KaiBB has 3 kills!" ? And will the permission allow for the message to be broadcasted? And last but not least, when you say "change "kill streak value"", do you mean the total kills, or the amount of kills in a streak? EDIT: And if the player gets killed, do you want the total kills reset? EDIT: So with the command you want to change the amount of kills in said streak?
Hi thanks for the interest! Couldn't find the quote button " If I get this right, you want when someone gets a set amount of kills to be broadcasted in a message saying something like "KaiBB has 3 kills!" ? " Yes that would be awesome "And will the permission allow for the message to be broadcasted?" Yeah. So that for example: only [VIP members] get killstreaks broadcasted. "when you say "change "kill streak value"", do you mean the total kills, or the amount of kills in a streak?" Ah yes kills in a streak, without dying. **also edited the main topic EDIT: And if the player gets killed, do you want the total kills reset? That would be awesome Again thanks for the interest! and goodluck!
I've started on this, but it won't be ready immediately, as I don't know how to set the command or permissions you specified.
Great! Thanks man! BTW, the command is optional. I realize that might make it not "Simple" A config where the message can be customized is enough?
btw heres a similar plugin with a "streak feature" http://forums.bukkit.org/threads/tp...-deathtp-tombstones-tomb-and-more-1597.40055/ but it has a lot of unnecessary stuff that increase its load
If only it was open source T_T Sorry, it'll take a while. Nobody seems to know how to get the attacker on death... When I find that one hthing out it'll be done -_-
there is onEntityDamage and onEntityDamageByEntity //the attacker event.getDamager(); //the defender event.getEntity(); if (event.getEntity().isDead()) { CLASSOBJECT.addKillStreak(1); something something... }
Nobody knows?! I answered a thread with the solution today, created by you! This is basically 90% of the difficulty of the plugin right here, handed to you.
Thanks Can you point me to this thread? Don't think it was mine. Nevermind It was my thread. Forgot to watch it -.- How do you use CLASSOBJECT? Would I rename it to the class containing what to do with the attacker? EDIT by Moderator: merged posts, please use the edit button instead of double posting.
I did use your code. I now need to tell it to add 1 to the killstreak EDIT: The reason I need to get help with adding 1 to the killstreak is, well, I'm TERRIBLE at learning plugin dev, I'm not good at tearing apart open-source and learning from it
Yes so if I had a class called KillStreakManager.java and inside of it contained flags...but you probably don't have that so you will have a hash map inside of your main class file: public Map<Player, Integer> killstreak = new HashMap<Player, Integer>(); int number = 0; if (event.getEntity().isDead()) { number += 1; MainClassObjectReference.killstreak.put((Player) event.getDamager(), number); .....logic code....logic stuff if ( MainClassObjectReference.killstreak. magical stuff to get the killstreak > 5){ broad cast message: 5 kill streak sddasdsdds } } Ugh...Trying to code in this small chat box with out auto indent :| EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Alright, you might want to create hashmap with the player (killer) as the key and an integer value of the amount of kills. public Map<Player, Integer> isIngame = new HashMap<Player, Integer>(); You could use this and put it at the top of your class. You will want to see if the player is already in the hashmap, if not, add the player and set the value to 0 (zero). If he already is, you will want to get the value and add 1 to it and put it back in the hashmap. You will also want to check if the integer is above a certain level to broadcast a message.
Could we do a TeamViewer meeting? I can listen to you speak with headphones, but I can't talk, the folks are asleep.
Don't worry, I would've been able to code this in under 10 minutes ;P Just wanted to have him actually understand it.
I give Rahazan 100% credit. He LITERALLY took over on this one. Go TeamViewer (; I'll give you a link momentarily. <Edit by Moderator: Redacted mediafire url> EDIT: Added the fixed Config, just copy all the files inside of the .rar to your plugins folder. Read the other posts on the 2nd page, too. Thanks for all the help, guys. I at least doubled my knowledge of Java doing this. Almost forgot: In the config, the minimum number of kills to start a streak is 3. If you want to change this, make it one less than the number you want. If you want the streak to start at 5, put 4. EDIT: Didn't realize you wanted the message changed. I'll get on that right now EDIT by Moderator: merged posts, please use the edit button instead of double posting.