Compare commits
No commits in common. "master" and "1.1" have entirely different histories.
5 changed files with 7 additions and 29 deletions
|
@ -11,5 +11,3 @@ Permissions:
|
||||||
/chat [on/off/clear] - sloudpl.chat
|
/chat [on/off/clear] - sloudpl.chat
|
||||||
|
|
||||||
Bypass chat off - sloudpl.chat.bypass
|
Bypass chat off - sloudpl.chat.bypass
|
||||||
|
|
||||||
To write in chat with color - sloudchat.colors
|
|
2
pom.xml
2
pom.xml
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
<groupId>pl.sloudpl</groupId>
|
<groupId>pl.sloudpl</groupId>
|
||||||
<artifactId>SloudChat</artifactId>
|
<artifactId>SloudChat</artifactId>
|
||||||
<version>1.2</version>
|
<version>1.1</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>SloudChat</name>
|
<name>SloudChat</name>
|
||||||
|
|
|
@ -21,10 +21,6 @@ public class onPlayerChat implements Listener {
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void PlayerChat(AsyncPlayerChatEvent event){
|
public void PlayerChat(AsyncPlayerChatEvent event){
|
||||||
|
|
||||||
if(event.isCancelled()){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
|
|
||||||
if(!plugin.isChatEnabled && !player.hasPermission("sloudpl.chat.bypass")){
|
if(!plugin.isChatEnabled && !player.hasPermission("sloudpl.chat.bypass")){
|
||||||
|
@ -73,17 +69,9 @@ public class onPlayerChat implements Listener {
|
||||||
plugin.getLogger().warning("Chat format contains PlaceholderAPI variables but PlaceholderAPI is not installed!");
|
plugin.getLogger().warning("Chat format contains PlaceholderAPI variables but PlaceholderAPI is not installed!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(player.hasPermission("sloudchat.colors")){
|
|
||||||
|
|
||||||
format = format.replace("{MESSAGE}", message);
|
|
||||||
format = ChatColor.translateAlternateColorCodes('&', format);
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
format = ChatColor.translateAlternateColorCodes('&', format);
|
|
||||||
format = format.replace("{MESSAGE}", message);
|
format = format.replace("{MESSAGE}", message);
|
||||||
|
|
||||||
}
|
format = ChatColor.translateAlternateColorCodes('&', format);
|
||||||
|
|
||||||
event.setFormat(format.replace("%", "%%"));
|
event.setFormat(format.replace("%", "%%"));
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ public class onPlayerChat1_16 implements Listener {
|
||||||
|
|
||||||
if(!plugin.isChatEnabled && !player.hasPermission("sloudpl.chat.bypass")){
|
if(!plugin.isChatEnabled && !player.hasPermission("sloudpl.chat.bypass")){
|
||||||
|
|
||||||
player.sendMessage(ColorUtils.convertHexColors(ChatColor.translateAlternateColorCodes('&', plugin.getConfig().getString("disabled-chat-msg"))));
|
player.sendMessage(ChatColor.translateAlternateColorCodes('&', plugin.getConfig().getString("disabled-chat-msg")));
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -71,17 +71,9 @@ public class onPlayerChat1_16 implements Listener {
|
||||||
plugin.getLogger().warning("Chat format contains PlaceholderAPI variables but PlaceholderAPI is not installed!");
|
plugin.getLogger().warning("Chat format contains PlaceholderAPI variables but PlaceholderAPI is not installed!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(player.hasPermission("sloudchat.colors")){
|
|
||||||
|
|
||||||
format = format.replace("{MESSAGE}", message);
|
|
||||||
format = ColorUtils.convertHexColors(ChatColor.translateAlternateColorCodes('&', format));
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
format = ColorUtils.convertHexColors(ChatColor.translateAlternateColorCodes('&', format));
|
|
||||||
format = format.replace("{MESSAGE}", message);
|
format = format.replace("{MESSAGE}", message);
|
||||||
|
|
||||||
}
|
format = ColorUtils.convertHexColors(ChatColor.translateAlternateColorCodes('&', format));
|
||||||
|
|
||||||
event.setFormat(format.replace("%", "%%"));
|
event.setFormat(format.replace("%", "%%"));
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@ name: SloudChat
|
||||||
version: '${project.version}'
|
version: '${project.version}'
|
||||||
main: pl.sloudpl.sloudchat.SloudChat
|
main: pl.sloudpl.sloudchat.SloudChat
|
||||||
authors: [SloudPL]
|
authors: [SloudPL]
|
||||||
api-version: '1.13'
|
api-version: '1.18'
|
||||||
softdepend:
|
softdepend:
|
||||||
- LuckPerms
|
- LuckPerms
|
||||||
- PlaceholderAPI
|
- PlaceholderAPI
|
||||||
|
|
Loading…
Add table
Reference in a new issue