I'm planning on making a clans plugin, I don't know what methods to use and I'm not asking for the exact code I don't know anything about making clans, inviting player to clan, kick from clan and a clan msg that will send everyone in the clan the message. Where would I go about? Any tutorials?
I like your attitude about not wanting exact code. Please keep it. It will get you far. Learning by doing is way more helpful than getting code written for you As for your question. You should try writing out a draft or something to try for yourself. If you find yourself unable to do that, you might not have the required Java knowledge to code Bukkit Plugins. I would strongly advise you to have a decent knowledge of Java before plunging into Bukkit. Please tell me if my assumption was correct.
If you want config help, use this for ideas: Code: clans: clan1: members: {$uuid}: displayName: 1Achmed1 prefix: TehBeest {$uuid}: displayName: DamnHippo prefix: TehSupahBeest message: This is an example clan. owner: {$uuid} clan2: members: EvilSeph Notch message: So op. owner: EvilSeph So, you could save people with uuids and have the displayName automatically change if they change their username, and they could also have a prefix like Factions. Alternatively, you could save with usernames, but it's less secure.
1Achmed1 Rocoty the main part I don't get is creating the clan wouldn't I have to add them to a hashmap? How would I make it that when someone creates a clan it creates a new hashmap?
DamnHippo You can use this as a reference in the future: http://wiki.bukkit.org/Configuration_API_Reference#HashMaps_2
Garris0n Well that's rather broad. If the man doesn't know which methods to use how would he make a clan class.
Garris0n Yeah I know but throwing a suggestion to create a new class to a person who doesn't create methods is rather inappropriate. I've learnt my way through Tutorials, Source Codes and Videos so those videos will help him out if he's smart enough.
It's "inappropriate" that somebody who can't create a class is using the Bukkit API. If he doesn't know Java, he should go learn Java. Simple as that. Copying somebody else's code word-for-word is not going to help and will probably end up teaching him some bad habits.
Garris0n Why do you have to be so mad though? If people want to learn poorly let them, what's it with you? It's like some of you guys in the forums belong to a Java-Grammar-Nazi group. If everyone in these forums knew Java it wouldn't be necessary to help any of them (not like people don't need a little light shed upon them sometimes, but you know what I mean).
If I saw somebody burning to death in a house I could drag them out or I could sit there with some popcorn and watch. I'd rather drag them out of the house. This is the Bukkit forums, not the Java forums. There are better places for Java questions, like StackOverflow, and most of these questions have been answered. If people ask Bukkit questions they can be given answers. This is more of a "please give me free code" post. If the OP does not understand what "create a class" means they are obviously not experienced enough with Java to be working with the Bukkit API. Bukkit is an API, not a language. Java is a prerequisite, and if you don't know it, attempting to use Bukkit is like attempting to run before you are able to walk. It does not work out well. I have personal experience with not learning Java first, and I would never recommend that to anyone.
Psuedo code from gangs plugin: Code:java public class Gang{ private int power; private List<String> players = new ArrayList(); private String name; private List<String> invites = new ArrayList(); public Gang(int power, List<String> players, String name, List<String> invites) { this.power = power; this.players = players; this.name = name; this.invites = invites; } public String getName() { return this.name; } public int getPower() { return this.power; } public List<String> getPlayers() { return this.players; } public List<String> getInvites() { return this.invites; } public void setName(String name) { this.name = name; } public void setPower(int power) { this.power = power; } public void setPlayers(List<String> players) { this.players = players; } public void addPlayer(String playerName) { this.players.add(playerName); } public boolean removePlayer(String playerName) { if (this.players.contains(playerName)) { this.players.remove(playerName); return true; } return false; } public void setInvites(List<String> invites) { this.invites = invites; } public void addInvite(String player) { this.invites.add(player); } public boolean removeInvite(String playerName) { if (this.invites.contains(playerName)) { this.invites.remove(playerName); return true; } return false; }}