fix command error and chat bug

This commit is contained in:
lenis0012 2016-11-30 18:23:37 +01:00
parent 90a6b3a829
commit dd82fe80ba
3 changed files with 7 additions and 4 deletions

View file

@ -4,7 +4,7 @@
<groupId>com.lenis0012.bukkit</groupId>
<artifactId>marriage2</artifactId>
<version>2.0.14</version>
<version>2.0.15-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Marriage</name>
<url>http://dev.bukkit.org/server-mods/marriage-reloaded/</url>

View file

@ -33,7 +33,7 @@ public class CommandHelp extends Command {
String alias = command instanceof CommandMarry ? "" : command.getAliases()[0] + " ";
String text = "&a/marry " + alias + command.getUsage() + " &f- &7" + command.getDescription();
if(command.getExecutionFee() == 0.0 || !Bukkit.getVersion().contains("Spigot")) {
if(command.getExecutionFee() == 0.0 || !Bukkit.getVersion().contains("Spigot") || !marriage.dependencies().isEconomyEnabled()) {
reply(text);
continue;
}

View file

@ -90,7 +90,7 @@ public class ChatListener implements Listener {
status = ChatColor.translateAlternateColorCodes('&', status);
}
event.setFormat(format.replace("{marriage_status}", status));
format = format.replace("{marriage_status}", status);
}
// Gender format
@ -98,8 +98,11 @@ public class ChatListener implements Listener {
String gender = mplayer.getGender().getChatPrefix();
gender = formatIcons(gender);
gender = ChatColor.translateAlternateColorCodes('&', gender);
event.setFormat(format.replace("{marriage_gender}", gender));
format = format.replace("{marriage_gender}", gender);
}
// Set format
event.setFormat(format);
}
private String formatIcons(String text) {