mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-24 10:09:50 +01:00
parent
dd7f1bcf25
commit
20d439578b
@ -493,10 +493,9 @@ public abstract class UserData extends PlayerExtension implements IConf
|
||||
config.setProperty("godmode", set);
|
||||
config.save();
|
||||
}
|
||||
|
||||
private boolean muted;
|
||||
|
||||
private boolean getMuted()
|
||||
public boolean getMuted()
|
||||
{
|
||||
return config.getBoolean("muted", false);
|
||||
}
|
||||
@ -512,13 +511,6 @@ public abstract class UserData extends PlayerExtension implements IConf
|
||||
config.setProperty("muted", set);
|
||||
config.save();
|
||||
}
|
||||
|
||||
public boolean toggleMuted()
|
||||
{
|
||||
boolean ret = !isMuted();
|
||||
setMuted(ret);
|
||||
return ret;
|
||||
}
|
||||
private long muteTimeout;
|
||||
|
||||
private long _getMuteTimeout()
|
||||
|
@ -28,13 +28,19 @@ public class Commandmute extends EssentialsCommand
|
||||
throw new Exception(_("muteExempt"));
|
||||
}
|
||||
long muteTimestamp = 0;
|
||||
|
||||
if (args.length > 1)
|
||||
{
|
||||
String time = getFinalArg(args, 1);
|
||||
final String time = getFinalArg(args, 1);
|
||||
muteTimestamp = Util.parseDateDiff(time, true);
|
||||
player.setMuted(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
player.setMuted(!player.getMuted());
|
||||
}
|
||||
player.setMuteTimeout(muteTimestamp);
|
||||
final boolean muted = player.toggleMuted();
|
||||
final boolean muted = player.getMuted();
|
||||
sender.sendMessage(
|
||||
muted
|
||||
? (muteTimestamp > 0
|
||||
|
Loading…
Reference in New Issue
Block a user