I am making a mute command. I need to know how to store a players username and the Reason in a HashMap Reason (Move your mouse to reveal the content) Reason (open) Reason (close) Code: String reason = ""; for (int i = 1; i != args.length; i++) reason += args + " "; Then from a different class how to get the players name and the reason.
Make a HashMap that stores a UUID and String HashMap<UUID,String> mutes = new HashMap<UUID, String>();
So it should be: Code: public Map<UUID, String> mutedPlayers = new HashMap<>(); Anyway, in general, bubblefat_, it seems you don't really know the basics of Java, I'm not trying to offend you, but Map is a key Java feature, as well as the "public" modifier, along with for example, the "static" modifier. http://docs.oracle.com/javase/tutorial/ You should try learning about all of this before creating Bukkit plugins, otherwise the forums gets spammed with threads asking basic questions. Example of errors: "i != args.length" Use: i < args.length "String", use a StringBuilder, it's more efficient in loops.