mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-07-03 20:41:37 +00:00
Started work on implementing the mute reason, and decided to write it to the UserData just like the Ban and TempBan reasons
This commit is contained in:
parent
430f08b25f
commit
3512c4c8e6
2 changed files with 19 additions and 0 deletions
|
@ -73,6 +73,7 @@ public abstract class UserData extends PlayerExtension implements IConf {
|
|||
godmode = _getGodModeEnabled();
|
||||
muted = _getMuted();
|
||||
muteTimeout = _getMuteTimeout();
|
||||
muteReason = _getMuteReason ();
|
||||
jailed = _getJailed();
|
||||
jailTimeout = _getJailTimeout();
|
||||
lastLogin = _getLastLogin();
|
||||
|
@ -491,6 +492,7 @@ public abstract class UserData extends PlayerExtension implements IConf {
|
|||
}
|
||||
|
||||
private boolean muted;
|
||||
private String muteReason;
|
||||
|
||||
public boolean _getMuted() {
|
||||
return config.getBoolean("muted", false);
|
||||
|
@ -510,6 +512,20 @@ public abstract class UserData extends PlayerExtension implements IConf {
|
|||
config.save();
|
||||
}
|
||||
|
||||
public String _getMuteReason() {
|
||||
return config.getString("muteReason");
|
||||
}
|
||||
|
||||
public String getMuteReason() {
|
||||
return muteReason;
|
||||
}
|
||||
|
||||
public void setMuteReason (String reason) {
|
||||
muteReason = reason;
|
||||
config.setProperty ("muteReason", reason);
|
||||
config.save();
|
||||
}
|
||||
|
||||
private long muteTimeout;
|
||||
|
||||
private long _getMuteTimeout() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue