mirror of
https://github.com/TotalFreedomMC/TF-Marriage.git
synced 2025-02-05 14:22:45 +00:00
fix command error and chat bug
This commit is contained in:
parent
90a6b3a829
commit
dd82fe80ba
3 changed files with 7 additions and 4 deletions
2
pom.xml
2
pom.xml
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue