Skip to content

Commit

Permalink
removed all . since vanilla minecraft client does the same for hidden…
Browse files Browse the repository at this point in the history
… messages
  • Loading branch information
bierdosenhalter committed Aug 23, 2022
1 parent b16c1d4 commit 7740cca
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>org.zeroBzeroT.chatCo</groupId>
<artifactId>ChatCoPlus</artifactId>
<version>0.27.0</version>
<version>0.27.1</version>
<packaging>jar</packaging>
<name>${project.artifactId}</name>
<description>An efficient chat system with green-text, ignore, whispers and chat logging.</description>
Expand Down
22 changes: 11 additions & 11 deletions src/main/java/org/zeroBzeroT/chatCo/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,9 @@ public boolean onCommand(final CommandSender sender, final Command cmd, final St
if (cmd.getName().equalsIgnoreCase("togglechat") && this.getConfig().getBoolean("toggleChatEnabled", true)) {
try {
if (this.toggleChat((org.bukkit.entity.Player) sender)) {
sender.sendMessage(ChatColor.RED + "Your chat is now disabled until you type /togglechat or relog.");
sender.sendMessage(ChatColor.RED + "Your chat is now disabled until you type /togglechat or relog");
} else {
sender.sendMessage(ChatColor.RED + "Your chat has been re-enabled, type /togglechat to disable it again.");
sender.sendMessage(ChatColor.RED + "Your chat has been re-enabled, type /togglechat to disable it again");
}
} catch (IOException e) {
e.printStackTrace();
Expand All @@ -158,9 +158,9 @@ public boolean onCommand(final CommandSender sender, final Command cmd, final St
} else if (cmd.getName().equalsIgnoreCase("toggletells")) {
try {
if (this.toggleTells((org.bukkit.entity.Player) sender)) {
sender.sendMessage(ChatColor.RED + "You will no longer receive tells, type /toggletells to see them again.");
sender.sendMessage(ChatColor.RED + "You will no longer receive tells, type /toggletells to see them again");
} else {
sender.sendMessage(ChatColor.RED + "You now receive tells, type /toggletells to disable them again.");
sender.sendMessage(ChatColor.RED + "You now receive tells, type /toggletells to disable them again");
}
} catch (IOException e) {
e.printStackTrace();
Expand All @@ -176,19 +176,19 @@ public boolean onCommand(final CommandSender sender, final Command cmd, final St
} else if (cmd.getName().equalsIgnoreCase("ignore") && this.getConfig().getBoolean("ignoresEnabled", true)) {
try {
if (args.length < 1) {
sender.sendMessage(ChatColor.RED + "You forgot to type the name of the player.");
sender.sendMessage(ChatColor.RED + "You forgot to type the name of the player");
return true;
}

if (args[0].length() > 16) {
sender.sendMessage(ChatColor.RED + "You entered an invalid player name.");
sender.sendMessage(ChatColor.RED + "You entered an invalid player name");
return true;
}

final org.bukkit.entity.Player ignorable = Bukkit.getServer().getPlayer(args[0]);

if (ignorable == null) {
sender.sendMessage(ChatColor.RED + "You have entered a player who does not exist or is offline.");
sender.sendMessage(ChatColor.RED + "You have entered a player who does not exist or is offline");
return true;
}

Expand All @@ -207,7 +207,7 @@ public boolean onCommand(final CommandSender sender, final Command cmd, final St
++i;
}

sender.sendMessage(ChatColor.WHITE + "" + i + " players ignored.");
sender.sendMessage(ChatColor.WHITE + "" + i + " players ignored");
return true;
} catch (IOException e) {
e.printStackTrace();
Expand Down Expand Up @@ -300,9 +300,9 @@ private void ignorePlayer(final org.bukkit.entity.Player p, final String target)
String message = ChatColor.WHITE + "Chat messages from " + target + " will be ";

if (this.getCCPlayer(p).isIgnored(target)) {
message += " shown";
message += "shown";
} else {
message += " hidden";
message += "hidden";
}

p.sendMessage(message);
Expand All @@ -311,7 +311,7 @@ private void ignorePlayer(final org.bukkit.entity.Player p, final String target)

private void unIgnoreAll(final org.bukkit.entity.Player p) throws IOException {
this.getCCPlayer(p).unIgnoreAll();
String message = ChatColor.WHITE + "Ignore list deleted.";
String message = ChatColor.WHITE + "Ignore list deleted";
p.sendMessage(message);
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/zeroBzeroT/chatCo/Spoilers.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public void onPlayerCommandPreprocess(final PlayerCommandPreprocessEvent event)
final int numberOfPrints = Character.digit(parser, 15);

if (numberOfPrints > 5 || numberOfPrints < 1) {
player.sendMessage("The server only stores the last 5 spoilers to have been made.");
player.sendMessage("The server only stores the last 5 spoilers to have been made");
} else if (numberOfPrints < 5 && numberOfPrints > 1) {
for (int i = 0; i < numberOfPrints; ++i) {
player.sendMessage("Spoiler [" + (i + 1) + "]: " + this.Spoiler[i]);
Expand Down
26 changes: 13 additions & 13 deletions src/main/java/org/zeroBzeroT/chatCo/Whispers.java
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ public void onPlayerCommandPreprocess(final PlayerCommandPreprocessEvent event)
}

if (target == null && this.plugin.getCCPlayer(sender).LastReceiver != null) {
sender.sendMessage(ChatColor.RED + "The last person you sent a private message to is offline.");
sender.sendMessage(ChatColor.RED + "The last person you sent a private message to is offline");
} else if (target == null) {
sender.sendMessage(ChatColor.RED + "You have not initiated any private message in this session.");
sender.sendMessage(ChatColor.RED + "You have not initiated any private message in this session");
} else {
try {
if (this.plugin.getCCPlayer(target).tellsDisabled) {
Expand Down Expand Up @@ -129,11 +129,11 @@ public void onPlayerCommandPreprocess(final PlayerCommandPreprocessEvent event)
sender.sendMessage(String.valueOf(senderMessage) + message);

if (isIgnoring && this.plugin.getConfig().getBoolean("ChatCo.ignoreMessageEnabled", true)) {
sender.sendMessage(ChatColor.RED + target.getName() + " is ignoring you.");
sender.sendMessage(ChatColor.RED + target.getName() + " is ignoring you");
}

if (doNotSend && this.plugin.getConfig().getBoolean("ChatCo.chatDisabledMessageEnabled", true)) {
sender.sendMessage(ChatColor.RED + target.getName() + "'s chat is disabled.");
sender.sendMessage(ChatColor.RED + target.getName() + "'s chat is disabled");
}

if (!doNotSend && !isIgnoring) {
Expand Down Expand Up @@ -170,9 +170,9 @@ public void onPlayerCommandPreprocess(final PlayerCommandPreprocessEvent event)
}

if (target == null && this.plugin.getCCPlayer(sender).LastMessenger != null) {
sender.sendMessage(ChatColor.RED + "The last person you received a private message from is offline.");
sender.sendMessage(ChatColor.RED + "The last person you received a private message from is offline");
} else if (target == null) {
sender.sendMessage(ChatColor.RED + "You have not received any private messages in this session.");
sender.sendMessage(ChatColor.RED + "You have not received any private messages in this session");
} else {
try {
if (this.plugin.getCCPlayer(target).tellsDisabled) {
Expand Down Expand Up @@ -200,11 +200,11 @@ public void onPlayerCommandPreprocess(final PlayerCommandPreprocessEvent event)
sender.sendMessage(String.valueOf(senderMessage) + message);

if (isIgnoring && this.plugin.getConfig().getBoolean("ChatCo.ignoreMessageEnabled", true)) {
sender.sendMessage(ChatColor.RED + target.getName() + " is ignoring you.");
sender.sendMessage(ChatColor.RED + target.getName() + " is ignoring you");
}

if (doNotSend && this.plugin.getConfig().getBoolean("ChatCo.chatDisabledMessageEnabled", true)) {
sender.sendMessage(ChatColor.RED + target.getName() + "'s chat is disabled.");
sender.sendMessage(ChatColor.RED + target.getName() + "'s chat is disabled");
}

if (!doNotSend && !isIgnoring) {
Expand Down Expand Up @@ -238,7 +238,7 @@ public void onPlayerCommandPreprocess(final PlayerCommandPreprocessEvent event)

if (target == null) {
event.setCancelled(true);
sender.sendMessage(ChatColor.RED + args[1] + " is offline.");
sender.sendMessage(ChatColor.RED + args[1] + " is offline");
return;
}

Expand Down Expand Up @@ -271,11 +271,11 @@ public void onPlayerCommandPreprocess(final PlayerCommandPreprocessEvent event)
sender.sendMessage(String.valueOf(senderMessage) + message);

if (isIgnoring && this.plugin.getConfig().getBoolean("ChatCo.ignoreMessageEnabled", true)) {
sender.sendMessage(ChatColor.RED + target.getName() + " is ignoring you.");
sender.sendMessage(ChatColor.RED + target.getName() + " is ignoring you");
}

if (doNotSend && this.plugin.getConfig().getBoolean("ChatCo.chatDisabledMessageEnabled", true)) {
sender.sendMessage(ChatColor.RED + target.getName() + "'s chat is disabled.");
sender.sendMessage(ChatColor.RED + target.getName() + "'s chat is disabled");
}

if (!doNotSend && !isIgnoring) {
Expand Down Expand Up @@ -322,11 +322,11 @@ public void onPlayerCommandPreprocess(final PlayerCommandPreprocessEvent event)
sender.sendMessage(String.valueOf(senderMessage) + message);

if (isIgnoring && this.plugin.getConfig().getBoolean("ChatCo.ignoreMessageEnabled", true)) {
sender.sendMessage(String.valueOf(ChatColor.RED.toString()) + target + " is ignoring you.");
sender.sendMessage(String.valueOf(ChatColor.RED.toString()) + target + " is ignoring you");
}

if (doNotSend && this.plugin.getConfig().getBoolean("ChatCo.chatDisabledMessageEnabled", true)) {
sender.sendMessage(String.valueOf(ChatColor.RED.toString()) + target + "'s chat is disabled.");
sender.sendMessage(String.valueOf(ChatColor.RED.toString()) + target + "'s chat is disabled");
}

if (!doNotSend && !isIgnoring) {
Expand Down

0 comments on commit 7740cca

Please sign in to comment.