mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-07-03 12:31:46 +00:00
We have added the ability for the Mute to contain a reason, which is stored for the duration of the mute in the user's data file. Currently we need to add in the mute reason code into some other commands such as /afk and /me and /seen ect. We will also need to fix a problem with the reason when we dont add in a time frame for the mute, which should mute the player indefinatly rather then cancelling the mute and throwing a DataFormat exception.
This commit is contained in:
parent
3512c4c8e6
commit
4ff9fe8666
4 changed files with 16 additions and 3 deletions
|
@ -521,8 +521,12 @@ public abstract class UserData extends PlayerExtension implements IConf {
|
|||
}
|
||||
|
||||
public void setMuteReason (String reason) {
|
||||
muteReason = reason;
|
||||
config.setProperty ("muteReason", reason);
|
||||
if (reason.equals("")) {
|
||||
config.removeProperty ("muteReason");
|
||||
} else {
|
||||
muteReason = reason;
|
||||
config.setProperty ("muteReason", reason);
|
||||
}
|
||||
config.save();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue