mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-10 10:28:22 +01:00
fixed some wonky commit thing that happened, thus the following modifications are brought to you by Delbertina.
This commit is contained in:
parent
4f8ea06db1
commit
c8cb9b3735
@ -51,7 +51,12 @@ public class Commandafk extends EssentialsCommand {
|
||||
private void toggleAfk(User sender, User user, String message) throws Exception {
|
||||
if (message != null && sender != null) {
|
||||
if (sender.isMuted()) {
|
||||
throw new Exception(tl("voiceSilenced"));
|
||||
if (sender.getMuteReason ().equals ("")) {
|
||||
throw new Exception(tl("voiceSilenced"));
|
||||
}
|
||||
else {
|
||||
throw new Exception(tl("voiceSilenced") + tl("muteFormat", sender.getMuteReason ()));
|
||||
}
|
||||
}
|
||||
if (!sender.isAuthorized("essentials.afk.message")) {
|
||||
throw new Exception(tl("noPermToAFKMessage"));
|
||||
|
@ -48,7 +48,12 @@ public class Commandmail extends EssentialsCommand {
|
||||
}
|
||||
|
||||
if (user.isMuted()) {
|
||||
throw new Exception(tl("voiceSilenced"));
|
||||
if (user.getMuteReason ().equals ("")) {
|
||||
throw new Exception(tl("voiceSilenced"));
|
||||
}
|
||||
else {
|
||||
throw new Exception(tl("voiceSilenced") + tl("muteFormat", user.getMuteReason ()));
|
||||
}
|
||||
}
|
||||
|
||||
User u = getPlayer(server, args[1], true, true);
|
||||
|
@ -24,7 +24,12 @@ public class Commandme extends EssentialsCommand {
|
||||
@Override
|
||||
public void run(Server server, User user, String commandLabel, String[] args) throws Exception {
|
||||
if (user.isMuted()) {
|
||||
throw new Exception(tl("voiceSilenced"));
|
||||
if (user.getMuteReason ().equals ("")) {
|
||||
throw new Exception(tl("voiceSilenced"));
|
||||
}
|
||||
else {
|
||||
throw new Exception(tl("voiceSilenced") + tl("muteFormat", user.getMuteReason ()));
|
||||
}
|
||||
}
|
||||
|
||||
if (args.length < 1) {
|
||||
|
@ -28,7 +28,12 @@ public class Commandr extends EssentialsCommand {
|
||||
User user = ess.getUser(sender.getPlayer());
|
||||
|
||||
if (user.isMuted()) {
|
||||
throw new Exception(tl("voiceSilenced"));
|
||||
if (user.getMuteReason ().equals ("")) {
|
||||
throw new Exception(tl("voiceSilenced"));
|
||||
}
|
||||
else {
|
||||
throw new Exception(tl("voiceSilenced") + tl("muteFormat", user.getMuteReason ()));
|
||||
}
|
||||
}
|
||||
|
||||
message = FormatUtil.formatMessage(user, "essentials.msg", message);
|
||||
|
@ -117,7 +117,12 @@ public class Commandseen extends EssentialsCommand {
|
||||
sender.sendMessage(tl("whoisJail", (user.getJailTimeout() > 0 ? DateUtil.formatDateDiff(user.getJailTimeout()) : tl("true"))));
|
||||
}
|
||||
if (user.isMuted()) {
|
||||
sender.sendMessage(tl("whoisMuted", (user.getMuteTimeout() > 0 ? DateUtil.formatDateDiff(user.getMuteTimeout()) : tl("true"))));
|
||||
if (user.getMuteReason ().equals ("")) {
|
||||
sender.sendMessage(tl("whoisMuted", (user.getMuteTimeout() > 0 ? DateUtil.formatDateDiff(user.getMuteTimeout()) : tl("true"))));
|
||||
}
|
||||
else {
|
||||
sender.sendMessage(tl("whoisMuted", (user.getMuteTimeout() > 0 ? DateUtil.formatDateDiff(user.getMuteTimeout()) : tl("true"))) + tl("muteFormat", user.getMuteReason ()));
|
||||
}
|
||||
}
|
||||
final String location = user.getGeoLocation();
|
||||
if (location != null && (!(sender.isPlayer()) || ess.getUser(sender.getPlayer()).isAuthorized("essentials.geoip.show"))) {
|
||||
|
@ -56,8 +56,12 @@ public class Commandwhois extends EssentialsCommand {
|
||||
sender.sendMessage(tl("whoisAFK", tl("false")));
|
||||
}
|
||||
sender.sendMessage(tl("whoisJail", (user.isJailed() ? user.getJailTimeout() > 0 ? DateUtil.formatDateDiff(user.getJailTimeout()) : tl("true") : tl("false"))));
|
||||
sender.sendMessage(tl("whoisMuted", (user.isMuted() ? user.getMuteTimeout() > 0 ? DateUtil.formatDateDiff(user.getMuteTimeout()) : tl("true") : tl("false"))));
|
||||
|
||||
if (user.getMuteReason ().equals ("")) {
|
||||
sender.sendMessage(tl("whoisMuted", (user.isMuted() ? user.getMuteTimeout() > 0 ? DateUtil.formatDateDiff(user.getMuteTimeout()) : tl("true") : tl("false"))));
|
||||
}
|
||||
else {
|
||||
sender.sendMessage(tl("whoisMuted", (user.isMuted() ? user.getMuteTimeout() > 0 ? DateUtil.formatDateDiff(user.getMuteTimeout()) : tl("true") : tl("false"))+ tl("muteFormat", user.getMuteReason ())));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user