Inactive [MECH/INFO] Clans v1.8.2 -Team Chat, Organization, Optional Area Defenses + More [1185]

Discussion in 'Inactive/Unsupported Plugins' started by Satros, Jun 4, 2011.

  1. Offline


    Clans - Team Chat, Organization, Optional Area Defenses + More!
    Version: v1.8.2
    Works with bukkit release [1185], [1060], [860], [818]

    This plugin aims to make PVP more fun by adding a team/faction/clan type aspect to the game, while only making minimal and optional restrictions to normal minecraft gameplay. (Semi-Vanilla). Clans is extremely configurable as to not impose any features on server admins that they may not want. Teams are simple to use but also very customizable.

    • Team Chat
    • Easy Team Organization (Saves teams when server goes offline, team lists, etc)
    • Customizable ranks within teams
    • Optional use of Team Area Defenses
    • Optional clan tags and colors in chat
    • Optionally turn Friendly-Fire off or on
    • Permissions support (Optional)
    • --Permissions Prefix/Suffix Chat Support (Optional)
    • iConomy support (Optional)
    Download Clans v1.8.2:
    Clans v1.8.2
    1.8 Source Code

    Old Versions:
    (Clans v1.8.1)(Clans v1.8 | src)(Clans v1.7 | src)(Clans v1.6 | src)

    **May Conflict with plugins that modify Chat, if this is the case set "use-chat-tags: " to false in the config file or disable the conflicting plugin.
    **Will also conflict with any plugins that have /t or /team commands.
    • iChat (Chat Related, set use-chat-tags: false or disable iChat)
    • HeroicChat (Chat Related, set use-chat-tags: false)
    • Essentials (Not sure why, probably multiple reasons)
    • War (uses /team)
    Config (config.cfg)

    Show Spoiler

    use-chat-tags: true
    use-clans-chat: true
    inc-permissions-prefixandsuffix: false
    max-tag-characters: 6
    tag-orientation: right

    min-teamlist-teamsize: 3
    min-color-teamsize: 3
    min-area-teamsize: 15

    team-kill-default: true
    allow-tk-toggle: false

    use-team-areas: true
    max-team-area: 210
    allow-guardian: true
    guardian-damage: 1
    allow-alerter: true
    alert-time-buffer: 25

    use-iconomy: false

    #Recommend increasing these if using iConomy
    create-team-cost: 0
    team-area-cost: 10
    guardian-cost: 50
    alerter-cost: 25

    #These are not used if using iConomy
    create-team-currency: 41
    team-area-currency: 41
    guardian-currency: 41
    alerter-currency: 41
    Config Meanings
    Show Spoiler

    use chat tags - use to disable clan tags in chat.
    use clans chat - disable if you plan on using another chat plugin such as Heroic chat, iChat, or Essentials Chat.
    inc permissions prefixandsuffix - if using clans chat, whether or not to include the suffixes and prefixes from permissions, also if a prefix is only a color it will be applied to the playername otherwise the tag (if on the left) would make it do nothing.
    max tag characters - the max characters in a clan tag
    tag orientation - whether the clan tag is displaed before or after a players name in chat

    min teamlist teamsize - minimum number of team members a team must have to show up on /team list
    min color teamsize - minimum number of team members a team must have to set their color
    min area teamsize: - minimum number of team members a team must have to use team area commands

    team kill default - whether friendly fire is on or off be default
    allow tk toggle - whether players can toggle friendly fire on and off

    use team areas - whether or not teams have have areas, if set to false will not take any extra resources for areas
    max team area - the maximum size a team area can grow to
    allow guardian - whether or not teams can buy and use offline area protection
    guardian damage - the amount of damage offline area protection does to those who place or destroy blocks, 1 = half a heart
    allow alerter - whether or not teams can buy and use intruder alerts for their area
    alert time buffer - how long between intruder alerts are received in chat, in seconds

    use iconomy - whether or not you want to use iConomoy for area and team creation purchases

    create team cost - the cost of creating a team, either for iConomy or in items below
    team area cost - the cost of claiming a team area, either for iConomy or in items below
    guardian cost - the cost of getting offline area protection, either for iConomy or in items below
    alerter cost - the cost of getting intruder alerts, either for iConomy or in items below

    #These are not used if using iConomy
    create team currency - item number used for purchasing the above, not used if using iConomy
    team area currency - item number used for purchasing the above, not used if using iConomy
    guardian currency - item number used for purchasing the above, not used if using iConomy
    alerter currency - item number used for purchasing the above, not used if using iConomy

    Show Spoiler

    Team Chat
    /t <MESSAGE> Message your entire team.

    Team General Commands
    /team help <1/2/3/4> Lists commands and what they do.
    /team create <teamname> Creates a team.

    /team invite <playername> Invites a player to your team. **CASE SENSITIVE**
    /team accept Accept your most recent invite to join a team.
    /team reject Reject your most recent invite to join a team.
    /team leave Quit a team.
    /team disband Deletes a team if you are the last one in it.
    /team info Lists players and rankings of your own team.
    /team info <teamname> Lists players and rankings of a specified team.
    /team online Lists team members that are online.
    /team list Lists all teams with more than the configured number of members and how many members they have.
    /team kick <playername> Kicks a player from the team **CASE SENSITIVE**
    /team motd Displays the team's Message of the Day (Also displays at login).
    /team motd <message> Sets a team's Message of the Day **LEADER ONLY**
    /team tag <tag> Sets a team's tag **LEADER ONLY**
    /team color <color> Sets the color of the team's tag. **LEADER ONLY**
    /team tk <on/off> Turns friendly fire/team killing on or off.

    Team Ranks
    /team rankcreate <rankname> Creates a new rank at the bottom of your team's ranks.
    /team rankname <ranknumber> <rankname> Renames a rank.
    /team setrank <playername> <ranknumber> Sets the rank of a player in the team.
    /team rankmoveall <oldranknumber> <newranknumber> Moves all players in a rank to a new rank **LEADER ONLY**
    /team rankflag <ranknumber> <kick/teamchat/rankedit/invite/promote> <true/false> Sets the permissions for a specified rank.
    /team rankinfo <ranknumber> Gives the rank name and rank's permissions for a specified rank.
    /team rankdelete <ranknumber> Deletes a rank from the team structure, rank must be empty.

    Team Area Defenses (Can be disabled in config)
    /team BuyArea <areaname>
    This sets an area based on the origin of the user. The radius of the area is based on team size with a max radius that can be configured. Costs a configured amount of items to use, default is 10 gold blocks, (must have in inventory). Must have at least the configured minimum area team size (default 15) members in your team to use. LEADER ONLY COMMAND. THIS IS A REQUIREMENT TO BUY THE BELOW DEFENSES:
    /team BuyAlert
    This will add intruder alerts to your area. If a player who is not on your team places or destroys within your team's area all online players will be alerted. (Does not alert if the last alert was within 20 seconds as to not spam chat). Costs a configured amount of items (Default 25 gold blocks). LEADER ONLY.
    /team BuyGuardian
    This will add offline protection to your base as described by the following: If an entire team is offline and they have guardian, if a player not in that team tries to break or place a block in the team's area the player will lose half a heart of health IF AND ONLY IF that player was not already inside the team's area when the team became offline. This is to protect from people logging off explicitly to protect their base. (This means if someone is in your base and you log off they wont get hurt and can destroy all they want). Costs a configured amount of items (Default 50 gold blocks). LEADER ONLY.

    Permission Nodes (Optional)
    Show Spoiler

    To allow all Commands:
                - 'clans.all'
    Else use these nodes:
                - 'clans.create'
                - 'clans.invite'
                - 'clans.list'
                - 'clans.accept'
                - ''
                - ''
                - 'clans.kick'
                - 'clans.leave'
                - 'clans.disband'
                - 'clans.color'
                - 'clans.buyarea'
                - 'clans.buyalert'
                - 'clans.buyguardian'
                - 'clans.motd'
                - 'clans.tag'
                - 'clans.rank.create'
                - ''
                - 'clans.rank.set'
                - 'clans.rank.moveall'
                - 'clans.rank.flag'
                - ''
                - 'clans.rank.delete'
                - 'clans.teamchat'
                - 'clans.tktoggle'

    Show Spoiler

    You can use the Clans API for chat plugins that want to display the proper clans tags with their plug-in;
    First you will need to add Clans.jar to the list of External Jars for your project.

    Next you will need to hook into Clans from the Server Listener, replace [YOURPLUGIN] in the example with the name of your plugin:
    import org.bukkit.event.server.PluginDisableEvent;
    import org.bukkit.event.server.PluginEnableEvent;
    import org.bukkit.event.server.ServerListener;
    import org.bukkit.plugin.Plugin;
    import com.bukkit.Satros.Clans.Clans;
    public class [YOURPLUGIN]ServListener extends ServerListener {
        private [YOURPLUGIN] plugin;
        public [YOURPLUGIN]ServListener([YOURPLUGIN] plugin) {
            this.plugin = plugin;
        public void onPluginDisable(PluginDisableEvent event) {
            if ([YOURPLUGIN].Clans != null) {
                if (event.getPlugin().getDescription().getName().equals("Clans")) {
                    plugin.Clans = null;
                    System.out.println("[[YOURPLUGIN]] un-hooked from Clans.");
        public void onPluginEnable(PluginEnableEvent event) {
            if (plugin.Clans == null) {
                Plugin Clans = plugin.getServer().getPluginManager().getPlugin("Clans");
                if (Clans != null) {
                    if (Clans.isEnabled())
                        plugin.Clans = (Clans)Clans;
                        System.out.println("[[YOURPLUGIN]] hooked into Clans.");
    Next in your main plugin class:
    import com.bukkit.Satros.Clans.Clans;
    In your main plugin class declare:
    public static Clans Clans = null;
    Once you do this you are able to use the 3 functions provided.
    //returns true or false on whether or not tags should be displayed at all. This should be checked first, if this is false then you essentially don't need to do anything.

    Clans.getColorAndTag(String playername)
    //Returns a string, colored tag given a player in the [Tag] form (with brackets and color pre-applied).

    //Returns a string "right" or "left" whether the tag should be displayed on the right or left side of a name.

    Here is example code of how clans should work with Chat Plugins within your PlayerListener.
        public void onPlayerChat(PlayerChatEvent event)
            String msg = event.getMessage();
            Player player = event.getPlayer();
            if ( [YOURPLUGIN].Clans.UseTags() ) //If clans allows the use of tags
                    //Get pre-assembled tag
                    String tag = [YOURPLUGIN].Clans.getColorAndTag(player.getDisplayName());
                    if ( [YOURPLUGIN].Clans.LeftOrRight().equals("left") //if tag should be on the left
                           plugin.getServer().broadcastMessage(tag + " " + player.getDisplayName() + ": " + msg);
                    else //tag should be on the right
                           plugin.getServer().broadcastMessage(player.getDisplayName() + " " + tag  +  ": " + msg);
            else //do whatever you would normally do

    Teamchat and Clan Tags
    Team List
    Team Info Command (My Own Team)
    Team Info Command (Another Team)
    Team Online Command

    To-Do (In Next Version)
    Change the internal structure
    Blacklisted Areas
    Area List and Area Info
    Area Info Rank Flag
    Optional Capture System
    --Optional Rewards System
    --Optional Score Sytem
    Fixing Rare Ranks Issue

    Planned for the Future
    MySQL Support
    Multiworld Support

    Connect to

    Like my work? Feel free to donate

    Show Spoiler

    Version 1.8.2
    • Fixed bug where people not on in a team wouldn't be able to kill each other with teamkill off by default
    Version 1.8.1
    • Fixed an issue with rank promotion
    • Fixed a bug where setting the team kill default to false wasn't working correctly
    Version 1.8
    • Added Permissions Prefix and Suffix Support for Clans Chat
    • Added API for Chat Plugin Developers to get players Clan Tags and related Config Options
    • No longer allows you to purchase defenses that have already been purchased.
    Version 1.7
    • Added iConomy Support
    • Added Anti-Friendly Fire Configs and Commands
    • Added /team help
    • More config options for clan tags
    • Team info now has rank numbers next to the rank name
    • Revamped the config file and made it less ambiguous
    • Small formatting changes for some errors
    • Creating a tag and color now gives feedback when successful
    • Teams.txt renamed to Teams.dat
    Version 1.6
    • Added config file
    Version 1.5
    • Added Permissions Support.
    Version 1.4
    • Added optional team area defenses for protecting bases.
    • Changed where the team data file is saved
    • Small miscellaneous bug fixes.
    Version 1.2
    • Changed the formatting and colors of the info, list, and t commands.
    • /team list now only displays teams with 2 or more members.
    • Added /team online, to see which members of your team are online.
    • Added a team MOTDs
    Version 1.1
    • Added more frequent saving of Teams
    Version 1
    • Initial Beta Release
  2. Offline


    Can you add iConomy support?
    Thanks for the plugin it's awesome :D
  3. Offline


    Kinda like a light weight factions plugin?
  4. Offline


    How do the protection areas work?
  5. Offline


    Great to see these in this section Satros! I'll be installing this the moment those TK flags are implemented!
    Some info is at the commands section.
  6. Offline


    Sure i'll look into it, I don't know much about iConomy at the moment though, is there anything in particular that you would use iConomy for with this (beside buying areas/defenses cause that seems obvious).

    In a way, it is different in a lot of ways, but also more customizable in a way
    I made this plugin mostly because I was unhappy with the current team plugins such as factions (just wasn't a good fit for what I wanted my server to be like).

    If team areas are enabled in the config, teams with a certain numbers of members (set in config file) can use area defense commands (there is 3 of them). To use these commands the leader of a team must have a certain number of an item in their inventory (for example it is by default blocks of gold (41) for each of the commands.

    First a leader will have to buy an area, using the buyarea command. The command bases the team's area with a radius (TeamSize * 10)/2 (will not get bigger than the max area set in the config) with the point of origin being where the command was used (it is a square area).

    The leader can then "buy" defenses for their area (there is currently 2 available defenses)

    Alert will alert members of a team when a block is placed or destroyed within their area, this makes defending a lot easier.

    Guardian will hurt intruders destroying or placing blocks for a set amount of damage (set in config default is 1 or half a heart). It will only hurt intruders however if the team is offline and if the intruder was not already inside the area when the last team member logged off (team became offline).

    These can be disabled or you can pick and choose them in the config file. Sorry if that is confusing, but it is actually pretty simple once you start using it. I might add more possible defenses later but we will see.
  7. Offline


    Not really, it's just more comfortable to use iConomy instead of items.
  8. Offline


    Can you make it that if i make a room where the teams should be seperated, there are 2 teleporters. For example team blue goes in the teleporter and team orange also. When they get into the teleporter they get teleported to a battlefield/arena. There they automaticly have their team because of the orange teleporter and the bleu teleporter.
    Maybe players get automaticly armor on? Like team gold gets gold and team steel gets steel.

    Well maybe verry hard to understand but this is what i want:

    -Portals to join a team automaticly, and maybe even teleport to a battlefiel/arena (Without commands all, portals do
    -Configurable armour when players join the game (So when they pass the portal)
  9. Offline


    I take it if you give a group the clans.invite permission, they still need permission from the leader to be able to invite people to the clan?

    Suggestion, make a clanhelp command that explains the various commands!

    Bug report;

    I'm getting this when I tried to create a clan:

    2011-06-05 12:48:28 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'team' in plugin Clans v1.6
  10. Offline


    changelog should be at the end
  11. Offline


    can only admin create teams? if normal players can make teams can i change that?
  12. Offline


    Look at the permission nodes.
  13. Offline


    o ok thanks
  14. Offline


    Okay I moved it sorry

    Yes, their "rank" within a team must have the invite flag set to true in order to invite.

    /team rankflag <RANKNUMBER> invite true
    (Where RANKNUMBER is the number of their rank with leader being "1" and the rank under that being 2)

    I'll add it in the next version with the TK flags

    That's weird but i'm really not sure why it is doing that, works fine for me and everyone on my server. Can you give me more info? Any more errors or line numbers along with that error? How are you using the command? (just so I can make sure it is correct). Did it create the team successfully when you used it or no?
  15. Offline


    this is just what i've been waiting for since hMod's Guilds plugin thank you very much!!
  16. Offline


    Could you make one without the region for more of a "lightweight" plugin for clans/guild?

    I would love to use this with Towny and or World Guard.

    Thanks, appreciate it.

    Also maybe charge user's to make a new clan or guild?
  17. Offline


    Just set "allow-team-areas: false" in the config file and it will not use any extra CPU power or ram for regions or anything like that. (essentially ignores regions and block placement/destruction completely except for 1 line of code that is only executed at start up).

    I'll think about adding a cost for making a team, perhaps when I add in iConomy (although there will be an option to purchase without using iConomy like there is now as well)
  18. Offline


    Thanks for replying, sounds good, I'll test it out!


    Tested it on your server.

    I must say it's pretty awesome.

    1. The only thing that kind of bug's me is that it's really flashy, it's proably me, and I'm proably not used to the tag being on the right side.

    Could it be on the left side instead? or make it configurable please?

    2. I would love iConomy support when you can, however, does the "Team" kind of act as a "Guild" or more of a "Party" system, or both essentially? (That way I won't need Parties plugin!)

    3. I'll defintely put this on my server asap when we can get some iConomy support!

    All in all, great work, keep it up dude!

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 16, 2016
  19. Offline


    Most defiantly, I meant to add configs for clan tag stuff in this version but I forgot, should be easy enough though. Also if you really don't like the tags at all you can always set use-chat-tags: false in the config file.

    I would say both really, though i'm not sure what the difference is exactly however, maybe you could expand on that?

    Thanks! I appreciate the feedback.

    Things that will be added in the next version (Hopefully this week):
    -iConomy Support
    -The ability to turn team killing off (and back on), will be configurable if you don't want users to be able to do this
    -Tag options in config (left or right, also configurable size limit, [right now it is hardcoded to 5 characters])
    BioRage likes this.
  20. Offline


    Grate Plugins!

    I hade found a "bug"

    In the File on Line 1181 its the wrong Directorie.

    String strManyDirectories="Plugins/Clans";
    String strManyDirectories="plugins/Clans";
    Have you Planed to go on GitHub with your Code?
  21. Offline


    I'm just trying to use the /team create <name> command, which ingame gives an internal error and in the log it just gives those two lines I quoted earlier. No teams are created when that comes up.
  22. Offline


    Thanks for the reply. Let's see if I can make sense....

    Essentially it is like this in way (minus the tp, which I don't like anyways!)

    -- I mean the way at the moment it can be used fine.. I think I was looking at two ways.

    1. Guild/Clan : You pay a fee to create, than you get a "special" tag (Like how you have on your server atm)

    2. Team : You can simply create a "team" or a "party" essentially, to roam around with friends, and what not.

    3. Obviously they both have their own unique chat with /guildchat /gc

    But, I'm not sure this is what you were wanting when you made the plugin! But in all in all let me know what you think.


    Are you using newest permissions/CB?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 16, 2016
  23. Offline


    Very awesome Plugin!
    If you use the teamchat, can read a Clanmember(f.e. B2KU) the teamchat and the global chat at the same time, without channelchanges?

    So you can write in the teamchat with any command (f.e. /tm) and wihthout a command in the global chat.
    For comfortable teamchat you can also use /tm on to write without a command in the teamchat and to chat in the globalchat you use /tm off and chat without a command.

    Thanks for the nice Plugin!

    ohhh sorry, i hadn't see the teamchat screenshot!
    It looks very good...
    Works /teamchat on/off or something like that?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 16, 2016
  24. Offline


    Bump for a great plugin
  25. Offline


    if you have any plugin that uses the same command that uses the Clan, will give an error.
    Such as the War plugin and xAuth
  26. Offline


    No you just do "/t messagehere" and it will send that message to everyone in your team.

    Interesting thanks for reporting, not sure why xAuth doesn't work though I don't see the conflicting command

    Make sure you are using this version of permissions if you are using permissions
    I guess what I would try next is try running the server with just Clans 1.6 and no other plugins and see if you can create a team, if you can it might be another plugin conflicting. Also make sure you put Clans-Config.txt in plugins/Clans/

    It could be either really. I know the plugin is used in different ways on my server. Some people form up big teams with the goal of taking over the server and that I guess is more like a guild sort of, but other players just form small groups with their friends and run around looting and what not. It works the same, also a team doesnt HAVE to have a tag, so I guess that would be more similar to a "party".

    Thanks I fixed that up I must of overlooked it. I might put it on GitHub, at the moment I have never really used git before but I figure I should learn how to use it eventually so I may put it up there. (Gotta clean up the documentation first too, its kinda disorganized and messy at the moment)
  27. Offline


    Could this be because of the capital P in your plugins directory with me on linux?

    21:50:31 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'team' in plugin Clans v1.6
            at org.bukkit.command.PluginCommand.execute(
            at org.bukkit.command.SimpleCommandMap.dispatch(
            at org.bukkit.craftbukkit.CraftServer.dispatchCommand(
            at net.minecraft.server.NetServerHandler.handleCommand(
            at net.minecraft.server.NetServerHandler.a(
            at net.minecraft.server.Packet3Chat.a(
            at net.minecraft.server.NetworkManager.b(
            at net.minecraft.server.NetServerHandler.a(
            at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
            at net.minecraft.server.MinecraftServer.h(
    Caused by: java.lang.NullPointerException
            at com.bukkit.Satros.Clans.Clans.onCommand(
            at org.bukkit.command.PluginCommand.execute(
            ... 12 more
    21:51:13 [SEVERE] Could not pass event PLAYER_QUIT to Clansjava.lang.NullPointerException
            at com.bukkit.Satros.Clans.ClansPlayerListener.onPlayerQuit(
            at org.bukkit.plugin.RegisteredListener.callEvent(
            at org.bukkit.plugin.SimplePluginManager.callEvent(
            at net.minecraft.server.ServerConfigurationManager.disconnect(
            at net.minecraft.server.NetServerHandler.a(
            at net.minecraft.server.NetworkManager.b(
            at net.minecraft.server.NetServerHandler.a(
            at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
            at net.minecraft.server.MinecraftServer.h(
  28. Offline


    hehe messy code :) i sea. ow yes its goood to learn git you can youse this for soooo many things. and its realy easy to learn ( ). When you go to git, i can make some pull requests for you :)
  29. Offline


    Hmm weird I actually am not sure why it is doing that. I have a few theories though. Probably the same problem LSky is running into.

    4 Questions, What version of bukkit, what command we're you trying, and what other plugins are you running, also does it work correctly if you try with all plugins except for clans disabled?
  30. Offline


    I'm on CB818. The first error happened on /team create. The second error when I logged off. Server runs fine with clans disabled. Plugins: Chat Censor, Essentials (Perhaps EssentialsChat specifically might be the issue?), Worldedit and Worldguard, Multiverse, Remote Toolkit, Craftbook, iWarning, CraftIRC.

    My server is in desperate need of this plugin which I am very excited about.. it fills a nice void where Factions, Towny & some other one I can't remember are way too overbearing and central.. whereas the premise of Clans fits nicely into a server rather than being the focal point of it. So +1 to this plugin keep up the good work, just can't wait to get it going on mine!

Share This Page