mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-03 19:15:44 +00:00
Implemented the ability to add a reason while muting a
player. The form of the mute is /mute [Player] [Time] [Reason] or /mute [Player] [Reason] or /mute [Player] [Time] or /mute [Player]. These are the various forms of the mute command and acts exactly like the old command just with a reason. The final adjustments to the MuteReason
This commit is contained in:
commit
f8ea7f5e1f
26 changed files with 76 additions and 36 deletions
|
@ -517,12 +517,18 @@ public abstract class UserData extends PlayerExtension implements IConf {
|
|||
}
|
||||
|
||||
public String getMuteReason() {
|
||||
return muteReason;
|
||||
if (muteReason != null) {
|
||||
return muteReason;
|
||||
}
|
||||
else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
public void setMuteReason (String reason) {
|
||||
if (reason.equals("")) {
|
||||
config.removeProperty ("muteReason");
|
||||
muteReason = null;
|
||||
} else {
|
||||
muteReason = reason;
|
||||
config.setProperty ("muteReason", reason);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue