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

    Satros

    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.

    Features:
    • 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)

    Conflicts:
    **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.
    KNOWN CONFLICTING PLUGINS
    • 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

    #Costs
    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


    Commands:
    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**
    Possible Color Values: DARK_BLUE, DARK_GREEN, DARK_AQUA, DARK_RED, DARK_PURPLE, GOLD, GRAY(Default), BLUE, GREEN, AQUA, LIGHT_PURPLE, YELLOW
    /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:
    Code:
                - 'clans.all'
    Else use these nodes:
    Code:
                - 'clans.create'
                - 'clans.invite'
                - 'clans.list'
                - 'clans.accept'
                - 'clans.info.self'
                - 'clans.info.other'
                - 'clans.kick'
                - 'clans.leave'
                - 'clans.disband'
                - 'clans.color'
                - 'clans.buyarea'
                - 'clans.buyalert'
                - 'clans.buyguardian'
                - 'clans.motd'
                - 'clans.tag'
                - 'clans.rank.create'
                - 'clans.rank.name'
                - 'clans.rank.set'
                - 'clans.rank.moveall'
                - 'clans.rank.flag'
                - 'clans.rank.info'
                - 'clans.rank.delete'
                - 'clans.teamchat'
                - 'clans.tktoggle'
    


    API
    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:
    Code:
    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;
        }
    
        @Override
        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.");
                }
            }
        }
    
        @Override
        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:
    Code:
    import com.bukkit.Satros.Clans.Clans;
    In your main plugin class declare:
    Code:
    public static Clans Clans = null;
    Once you do this you are able to use the 3 functions provided.
    Functions:
    Clans.useTags()
    //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).

    Clans.LeftOrRight()
    //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.
    Code:
        public void onPlayerChat(PlayerChatEvent event)
        {
            String msg = event.getMessage();
            Player player = event.getPlayer();
            event.setCancelled(true);
            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
    
      }


    Screenshots:
    Teamchat and Clan Tags
    http://i.imgur.com/vmjvr.png
    Team List
    http://i.imgur.com/9oJ6q.png
    Team Info Command (My Own Team)
    http://i.imgur.com/VUbQc.png
    Team Info Command (Another Team)
    http://i.imgur.com/l4g7N.png
    Team Online Command
    http://i.imgur.com/OobGn.png

    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

    Demo
    Connect to Play.Kingdom-SMP.com:25565

    [​IMG]
    Like my work? Feel free to donate
    Donate

    Changelog:
    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

    Arjan

    Can you explain how the /team buyarea - works? I used it and it said i created the area, afterwards I did /team buyalert and /team buyguardian but when another clan enter the terrain nothing happens, and I don't know how big the area is?? And please, add a /team deletearea - command! Still need help with the buyarea command! Someone explain? :/
     
  3. Offline

    Zenolijo

    This fullfills my needs for clans perfectly!
    Still, i dont really understand how the /team buyarea works, can anyone post a vid from YouTube or something?
    This plugin would be great with some more development!
     
  4. Offline

    Jack_Miller

    BOSEconomy support? :D and Permissionsbukkit?
     
  5. Offline

    iJumbo

    Help! I want to add this to my server. When I type /t create <name> it responds, " You must be in a team and have permission to team chat." Im using Permissions 3.x, Setrank, iConomy ( With and Without iConomy says same thing), and of course clans. ALSO Admins (Being me) have all permissions ('*')
     
  6. Offline

    Casier

    Hi, really cool Plugin !
    Please, add the compatibility with Essentials !

    my log (open)
    Code:
    2011-11-01 16:48:20 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'team' in plugin Clans v1.7
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:42)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:163)
        at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:355)
        at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:757)
        at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:722)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:715)
        at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:92)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:471)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    Caused by: java.lang.NullPointerException
        at com.bukkit.Satros.Clans.Clans.onCommand(Clans.java:198)
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40)
        ... 12 more


    I use CB #1337 and this Plugins : ChestShop
    Clans (Of course :D)
    ecoCreature
    Essentials
    EssentialsChat
    EssentialsProtect
    EssentialsSpawn
    HawkEye
    iConomy
    PermissionsBukkit
    Register
    SuperpermsBridge
    Vault
    WorldEdit
    WorldGuard


    Thank you so much !
     
  7. Offline

    iJumbo

    Could you get it working? I don't have a teams.dat file
     
  8. Offline

    Casier

    I haven't teams.dat file if EssentialsChat is loaded.

    I'm going to use an other chat plugin like mChat or other...

    When i remove EssentialsChat, Clans work but it can't use iConomy. My create-team-cost config is 20,000, when i want to create a team, the plugin say i must have 20,000 on my account (i have 1,000,000,000,000,000,000 on my account), so if i write a price on the config, i can't create team... But if the create-team-cost config is 0, i can create team

    I use Register 1.5 and iConomy 6.0.5b
     
  9. Offline

    iJumbo

    Im not using essentialschat or mChat, even without herochat it doesn't work.
     
  10. Offline

    Mike77

    When i type a command on the server, i have this message : "an internal error occured while attempting to perform this command" ?

    What can i do please ?
     
  11. Offline

    Casier

    Please ! Can you update your plugin for Craftbukkit #1337 and can you repair the conflict with essentialsChat and the bug with the money ?

    Thank you so much
     
  12. Offline

    OZ4RK

    I realize you may be busy, but I have a feature request:
    Could you please revise your code so that the clan tags do not completely override any other prefixes put in by other plugins like mchat and ichat? Clan tags are a necessity and so are my in-server ranks. Please get back to me and tell me if this is practical or not. Thanks :)
     
  13. Offline

    OZ4RK

    Can we get BOSEconomy compatibility? I've seen it done easily because BOSEconomy is a register plugin.
     
  14. Offline

    Nuinbot

    Is this plugin still being updated or should I look for something else? I am also curious if clans can be added to Worldguard Regions. Thanks.
     
  15. Offline

    Squady

    THE DOWNLOAD DOESN'T WORK D:
     
  16. Offline

    Javaprogrammer

    Oooyeah!!! It looks great!!! Just gonna test it!
     
  17. Offline

    Chrisski3

    No one on my server can send messages. When someone tries to use the chat, the server sheet gets a message:
    [SEVERE] Could not pass event PLAYER_CHAT to Clans
    java.lang.NullPointerException
    at com.bukkit.Satros.Clans.ClansPlayerListener.onPlayerChat(ClansPlayerListener.java:35)
    at org.bukkit.plugin.java.JavaPluginLoader$6.execute(JavaPluginLoader.java:300)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:339)
    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:727)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:715)
    at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:93)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:527)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:425)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)
     
  18. Offline

    Kylefraser

    does this work on 1.1 r-3?
     
  19. Offline

    superj

    NEEDS: /team Base and /team setbase If you would do these custom for me or just add them soon that would be awesome!!!
     
  20. Offline

    BERKYT

    PLEASE GIVE ME DOWNLOAD LINK! =((
     

Share This Page