Fixed chat color issue
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -3,7 +3,7 @@
|
||||
<groupId>de.web.basman93</groupId>
|
||||
<artifactId>KickPlayerOnJoin</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>1.0.1</version>
|
||||
<version>1.0.2</version>
|
||||
<name>KickPlayerOnJoin</name>
|
||||
<url></url>
|
||||
<build>
|
||||
|
||||
@@ -3,7 +3,7 @@ package de.web.basman93;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.Color;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
@@ -19,7 +19,7 @@ public class KickPlayerOnJoin extends JavaPlugin implements Listener {
|
||||
private boolean active = true;
|
||||
private FileConfiguration config = getConfig();
|
||||
private List<String> playerlist = new ArrayList<String>();
|
||||
private final String prefix = Color.SILVER + "[K" + Color.GRAY + "P" + Color.SILVER + "OJ] ";
|
||||
private final String prefix = ChatColor.GRAY + "[K" + ChatColor.DARK_GRAY + "P" + ChatColor.GRAY + "OJ] ";
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
@@ -83,9 +83,9 @@ public class KickPlayerOnJoin extends JavaPlugin implements Listener {
|
||||
} else {
|
||||
sender.sendMessage(prefix + "Version: " + getDescription().getVersion());
|
||||
if(cop(sender, "kpoj.info"))
|
||||
sender.sendMessage(prefix + "Active: " + (active ? Color.GREEN + "yes" : Color.RED + "no"));
|
||||
sender.sendMessage(prefix + "Active: " + (active ? ChatColor.GREEN + "yes" : ChatColor.RED + "no"));
|
||||
if(sender.hasPermission("kpoj.info") && sender instanceof Player)
|
||||
sender.sendMessage(prefix + "Status: " + (playerlist.contains(sender.getName()) ? Color.GREEN + "Allowed" : Color.RED + "Disallowed"));
|
||||
sender.sendMessage(prefix + "Status: " + (playerlist.contains(sender.getName()) ? ChatColor.GREEN + "Allowed" : ChatColor.RED + "Disallowed"));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user