Miniwarbos int value = map.get(player); if(value >= 10 && value < 30) { //Do something }
Qwahchees Are you serious? A HashMap is a lot less intensive than looping. Also why loop through every possible ammo amount anyway? Just use...
Qwahchees What?! That doesn't make any sense, why are you using a loop for this and why are you comparing each number to the max ammo? public...
ArthurHoeke You should probably learn Java before continuing. if(hitBlock.getType().getData() == 4) { //Do stuff }
rfsantos1996 Didn't think so. I need to create a Skyblock type plugin where each player has their own world but I don't want the server to hang...
I have been searching for about an hour now but can't find a good answer. Is it possible in any way to load and create worlds without hanging the...
Xplosion 2002 Why are you bumping? xTrollxDudex told you what you need to know.
CrazyGuy3000 Will post one when I get home later. :)
Hi guys. I created this small class that can easily create a menu in chat similar to bukkit's /help command and I decided to share it. You can set...
I actually created something like this for a server today. I would recommend storing a player's name and an integer in a hashmap. On chat add one...
thomasjcf21 Can I see the whole class please?
thomasjcf21 I'm not writing the full code out but this is what I would do. public HashMap<String, Integer> votes = new HashMap<String, Integer>();...
Sarrabiscos I found the problem. You are running the task async when the event is already async. With the AsyncPlayerPreLoginEvent you can just...
EnderTroll68 Create a scoreboard objective and set the slot to BelowName (I think that's what it is called.)
thomasjcf21 I have already told you what you need to change. Also not to sound rude but you are "nooby at java".
Separate names with a comma.