Guilds v2.1.2

Details

  • Filename
    Guilds_v2.1.2.jar
  • Uploaded by
  • Uploaded
    Dec 3, 2012
  • Size
    40.94 KB
  • Downloads
    530
  • MD5
    30fe30cdcd061c77cabd189e2de6b795

Supported Bukkit Versions

  • CB 1.4.5-R0.2

Changelog

Update to allow chat prefix, chat suffix, guild prefix and guild suffix:

String format = "";
		
		String GuildPrefix = "";
		String GuildSuffix = "";
		
		String ChatPrefix = "";
		String ChatSuffix = " ";
		
		if (plugin.chatFormat == null) {
			plugin.chatFormat = event.getFormat();
		}
		
		if (plugin.allowGuildPrefix == true) {
			Player player = event.getPlayer();
			Guild guild = plugin.getGuild(player);
			if (guild != null) {
				GuildPrefix = guild.getPLAYER_PREFIX();
				GuildSuffix = guild.getPLAYER_SUFFIX();
			}
		}
		
		if (plugin.allowChatFormat == true) {
			ChatPrefix = plugin.chatPrefix;
			ChatSuffix = plugin.chatSuffix;
		}
		
		format = ChatPrefix + GuildPrefix + "%1$s" + GuildSuffix + ChatSuffix + "%2$s";

		if (plugin.allowChatColor == true) {
			format = format.replaceAll("&([0-9a-fk-or])", "\u00A7$1");
		}