mirror of
				https://github.com/Aust1n46/VentureChat.git
				synced 2025-10-30 21:52:23 +00:00 
			
		
		
		
	Fix message remover and hex colors in placeholders.
This commit is contained in:
		
							parent
							
								
									2cf633af83
								
							
						
					
					
						commit
						b2d168835a
					
				| @ -4,6 +4,7 @@ import java.util.ArrayList; | |||||||
| import java.util.List; | import java.util.List; | ||||||
| 
 | 
 | ||||||
| import org.bukkit.Bukkit; | import org.bukkit.Bukkit; | ||||||
|  | import org.bukkit.ChatColor; | ||||||
| import org.bukkit.Material; | import org.bukkit.Material; | ||||||
| import org.bukkit.command.CommandSender; | import org.bukkit.command.CommandSender; | ||||||
| import org.bukkit.entity.Player; | import org.bukkit.entity.Player; | ||||||
| @ -88,15 +89,15 @@ public class VentureChatGui implements VentureCommand { | |||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         ItemMeta closeMeta = close.getItemMeta(); |         ItemMeta closeMeta = close.getItemMeta(); | ||||||
|         closeMeta.setDisplayName("<EFBFBD>oClose GUI"); |         closeMeta.setDisplayName(ChatColor.RED + "" + ChatColor.ITALIC + "Close GUI"); | ||||||
|         close.setItemMeta(closeMeta); |         close.setItemMeta(closeMeta); | ||||||
| 
 | 
 | ||||||
|         SkullMeta skullMeta = (SkullMeta) skull.getItemMeta(); |         SkullMeta skullMeta = (SkullMeta) skull.getItemMeta(); | ||||||
|         skullMeta.setOwner(target.getName()); |         skullMeta.setOwner(target.getName()); | ||||||
|         skullMeta.setDisplayName("<EFBFBD>b" + target.getName()); |         skullMeta.setDisplayName(ChatColor.AQUA + target.getName()); | ||||||
|         List<String> skullLore = new ArrayList<String>(); |         List<String> skullLore = new ArrayList<String>(); | ||||||
|         skullLore.add("<EFBFBD>7Channel: " + channel.getColor() + channel.getName()); |         skullLore.add(ChatColor.GRAY + "Channel: " + channel.getColor() + channel.getName()); | ||||||
|         skullLore.add("<EFBFBD>7Hash: " + channel.getColor() + hash); |         skullLore.add(ChatColor.GRAY + "Hash: " + channel.getColor() + hash); | ||||||
|         skullMeta.setLore(skullLore); |         skullMeta.setLore(skullLore); | ||||||
|         skull.setItemMeta(skullMeta); |         skull.setItemMeta(skullMeta); | ||||||
|         skull.setDurability((short) 3); |         skull.setDurability((short) 3); | ||||||
|  | |||||||
| @ -482,8 +482,8 @@ public class ChatListener implements Listener { | |||||||
| 		} | 		} | ||||||
| 		 | 		 | ||||||
| 		String globalJSON = Format.convertToJson(mcp, format, chat);  | 		String globalJSON = Format.convertToJson(mcp, format, chat);  | ||||||
| 		format = PlaceholderAPI.setBracketPlaceholders(mcp.getPlayer(), Format.FormatStringAll(format)); | 		format = Format.FormatStringAll(PlaceholderAPI.setBracketPlaceholders(mcp.getPlayer(), Format.FormatStringAll(format))); | ||||||
| 		String message = (format + chat).replaceAll("(\ufffd([a-z0-9]))", ""); // UTF-8 encoding issues. | 		String message = (format + chat).replaceAll("(\u00A7([a-z0-9]))", ""); // UTF-8 encoding issues. | ||||||
| 		int hash = message.hashCode(); | 		int hash = message.hashCode(); | ||||||
| 		 | 		 | ||||||
| 		//Create VentureChatEvent | 		//Create VentureChatEvent | ||||||
|  | |||||||
| @ -108,7 +108,7 @@ public class Format { | |||||||
| 				indexStart = matcher.start(); | 				indexStart = matcher.start(); | ||||||
| 				indexEnd = matcher.end(); | 				indexEnd = matcher.end(); | ||||||
| 				placeholder = remaining.substring(indexStart, indexEnd); | 				placeholder = remaining.substring(indexStart, indexEnd); | ||||||
| 				formattedPlaceholder = PlaceholderAPI.setBracketPlaceholders(icp.getPlayer(), placeholder); | 				formattedPlaceholder = Format.FormatStringAll(PlaceholderAPI.setBracketPlaceholders(icp.getPlayer(), placeholder)); | ||||||
| 				temp += convertToJsonColors(lastCode + remaining.substring(0, indexStart)) + ","; | 				temp += convertToJsonColors(lastCode + remaining.substring(0, indexStart)) + ","; | ||||||
| 				lastCode = getLastCode(lastCode + remaining.substring(0, indexStart)); | 				lastCode = getLastCode(lastCode + remaining.substring(0, indexStart)); | ||||||
| 				String action = ""; | 				String action = ""; | ||||||
|  | |||||||
| @ -1,151 +0,0 @@ | |||||||
| mute: |  | ||||||
|   usage: /mute [playername] [channel] |  | ||||||
|   aliases: [mp] |  | ||||||
|    |  | ||||||
| unmute: |  | ||||||
|   usage: /unmute [playername] [channel] |  | ||||||
|   aliases: [ump] |  | ||||||
|         |  | ||||||
| tell: |  | ||||||
|   usage: /tell [playername] [msg] |  | ||||||
|   aliases: [] |  | ||||||
|         |  | ||||||
| ignore: |  | ||||||
|   usage: /ignore [playername] or /ignore ? for more information |  | ||||||
|   aliases: [] |  | ||||||
|         |  | ||||||
| whisper: |  | ||||||
|   usage: /whisper [playername] [msg] |  | ||||||
|   aliases: [w] |  | ||||||
|         |  | ||||||
| channel: |  | ||||||
|   usage: /channel [channelname] |  | ||||||
|   aliases: [ch] |  | ||||||
|         |  | ||||||
| leave: |  | ||||||
|   usage: /leave [channelname] |  | ||||||
|   aliases: [lev] |  | ||||||
|          |  | ||||||
| join: |  | ||||||
|   usage: /join [channelname] |  | ||||||
|   aliases: [] |  | ||||||
|          |  | ||||||
| chlist: |  | ||||||
|   usage: /chlist |  | ||||||
|   aliases: [chl] |  | ||||||
|          |  | ||||||
| chwho: |  | ||||||
|   usage: /chwho [channelname] |  | ||||||
|   aliases: [chw] |  | ||||||
|          |  | ||||||
| setchannel: |  | ||||||
|   usage: /setchannel [playername] [channel] |  | ||||||
|   aliases: [sc] |  | ||||||
|          |  | ||||||
| kickchannel: |  | ||||||
|   usage: /kickchannel [playername] [channel] |  | ||||||
|   aliases: [kc] |  | ||||||
|          |  | ||||||
| message: |  | ||||||
|   usage: /message [playername] [msg] |  | ||||||
|   aliases: [msg,pm] |  | ||||||
|    |  | ||||||
| muteall: |  | ||||||
|   usage: /muteall [playername] |  | ||||||
|   aliases: [mpa] |  | ||||||
|          |  | ||||||
| unmuteall: |  | ||||||
|   usage: /unmuteall [playername] |  | ||||||
|   aliases: [umpa] |  | ||||||
|          |  | ||||||
| kickchannelall: |  | ||||||
|   usage: /kickchannelall [playername] |  | ||||||
|   aliases: [kca] |  | ||||||
|          |  | ||||||
| setchannelall: |  | ||||||
|   usage: /setchannelall [playername] |  | ||||||
|   aliases: [sca] |  | ||||||
|          |  | ||||||
| force: |  | ||||||
|   usage: /force [playername] [message] |  | ||||||
|   aliases: [for] |  | ||||||
|   |  | ||||||
| forceall: |  | ||||||
|   usage: /forceall [message] |  | ||||||
|   aliases: [fora] |  | ||||||
|          |  | ||||||
| listen: |  | ||||||
|   usage: /listen [channel] |  | ||||||
|   aliases: [lis] |  | ||||||
|         |  | ||||||
| chatreload: |  | ||||||
|   usage: /chatreload |  | ||||||
|   aliases: [cr] |  | ||||||
|          |  | ||||||
| afk: |  | ||||||
|   usage: /afk |  | ||||||
|   aliases: [] |  | ||||||
|          |  | ||||||
| reply: |  | ||||||
|   usage: /reply [msg] |  | ||||||
|   aliases: [r] |  | ||||||
|       |  | ||||||
| spy: |  | ||||||
|   usage: /spy |  | ||||||
|   aliases: [] |  | ||||||
|         |  | ||||||
| commandspy: |  | ||||||
|   usage: /commandspy |  | ||||||
|   aliases: [comspy] |  | ||||||
|          |  | ||||||
| chatinfo: |  | ||||||
|   usage: /chatinfo |  | ||||||
|   aliases: [ci] |  | ||||||
|         |  | ||||||
| channelinfo: |  | ||||||
|   usage: /channelinfo |  | ||||||
|   aliases: [chi] |  | ||||||
|          |  | ||||||
| mineversechat: |  | ||||||
|   usage: /mineversechat |  | ||||||
|   aliases: [mc] |  | ||||||
|          |  | ||||||
| me: |  | ||||||
|   usage: /me |  | ||||||
|   aliases: [] |  | ||||||
|          |  | ||||||
| filter: |  | ||||||
|   usage: /filter |  | ||||||
|   aliases: [fil] |  | ||||||
|          |  | ||||||
| broadcast: |  | ||||||
|   usage: /broadcast [msg] |  | ||||||
|   aliases: [bc] |  | ||||||
|          |  | ||||||
| commandblock: |  | ||||||
|   usage: /commandblock [player] [command] |  | ||||||
|   aliases: [cb] |  | ||||||
|          |  | ||||||
| nick: |  | ||||||
|   usage: /nick {player} [nickname] |  | ||||||
|   aliases: [] |  | ||||||
|          |  | ||||||
| party: |  | ||||||
|   usage: /party help |  | ||||||
|   aliases: [p,chatparty,cp] |  | ||||||
|         |  | ||||||
| edit: |  | ||||||
|   usage: /edit help |  | ||||||
|   aliases: [] |  | ||||||
|          |  | ||||||
| clearchat: |  | ||||||
|   usage: /clearchat |  | ||||||
|   aliases: [cc] |  | ||||||
|          |  | ||||||
| notifications: |  | ||||||
|   usage: /notifications |  | ||||||
|   aliases: [notify] |  | ||||||
|          |  | ||||||
| mail: |  | ||||||
|   usage: /mail help |  | ||||||
|   aliases: [] |  | ||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Aust1n46
						Aust1n46