mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-10 10:28:22 +01:00
Added space when adding reason to string. Dirty :/
This commit is contained in:
parent
6ffbb86169
commit
290379651d
@ -51,8 +51,12 @@ public class Commandafk extends EssentialsCommand {
|
|||||||
private void toggleAfk(User sender, User user, String message) throws Exception {
|
private void toggleAfk(User sender, User user, String message) throws Exception {
|
||||||
if (message != null && sender != null) {
|
if (message != null && sender != null) {
|
||||||
if (sender.isMuted()) {
|
if (sender.isMuted()) {
|
||||||
throw new Exception(tl("voiceSilenced") + (sender.hasMuteReason() ?
|
if (sender.getMuteReason ().equals ("")) {
|
||||||
tl("muteReason", sender.getMuteReason()) : ""));
|
throw new Exception(tl("voiceSilenced"));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
throw new Exception(tl("voiceSilenced") + " " + tl("muteReason", sender.getMuteReason ()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!sender.isAuthorized("essentials.afk.message")) {
|
if (!sender.isAuthorized("essentials.afk.message")) {
|
||||||
throw new Exception(tl("noPermToAFKMessage"));
|
throw new Exception(tl("noPermToAFKMessage"));
|
||||||
|
@ -48,8 +48,12 @@ public class Commandmail extends EssentialsCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (user.isMuted()) {
|
if (user.isMuted()) {
|
||||||
throw new Exception(tl("voiceSilenced") + (user.hasMuteReason() ?
|
if (user.getMuteReason ().equals ("")) {
|
||||||
tl("muteReason", user.getMuteReason()) : ""));
|
throw new Exception(tl("voiceSilenced"));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
throw new Exception(tl("voiceSilenced") + " " + tl("muteReason", user.getMuteReason ()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
User u = getPlayer(server, args[1], true, true);
|
User u = getPlayer(server, args[1], true, true);
|
||||||
|
@ -24,8 +24,12 @@ public class Commandme extends EssentialsCommand {
|
|||||||
@Override
|
@Override
|
||||||
public void run(Server server, User user, String commandLabel, String[] args) throws Exception {
|
public void run(Server server, User user, String commandLabel, String[] args) throws Exception {
|
||||||
if (user.isMuted()) {
|
if (user.isMuted()) {
|
||||||
throw new Exception(tl("voiceSilenced") + (user.hasMuteReason() ?
|
if (user.getMuteReason ().equals ("")) {
|
||||||
tl("muteReason", user.getMuteReason()) : ""));
|
throw new Exception(tl("voiceSilenced"));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
throw new Exception(tl("voiceSilenced") + " " + tl("muteReason", user.getMuteReason ()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (args.length < 1) {
|
if (args.length < 1) {
|
||||||
|
@ -72,8 +72,8 @@ public class Commandmute extends EssentialsCommand {
|
|||||||
sender.sendMessage(tl("mutedPlayerFor", user.getDisplayName(), muteTime));
|
sender.sendMessage(tl("mutedPlayerFor", user.getDisplayName(), muteTime));
|
||||||
user.sendMessage(tl("playerMutedFor", muteTime));
|
user.sendMessage(tl("playerMutedFor", muteTime));
|
||||||
} else {
|
} else {
|
||||||
sender.sendMessage(tl("mutedPlayerFor", user.getDisplayName(), muteTime) + tl("muteReason",user.getMuteReason()));
|
sender.sendMessage(tl("mutedPlayerFor", user.getDisplayName(), muteTime) + " " + tl("muteReason",user.getMuteReason()));
|
||||||
user.sendMessage(tl("playerMutedFor", muteTime) + tl("muteReason",user.getMuteReason()));
|
user.sendMessage(tl("playerMutedFor", muteTime) + " " + tl("muteReason",user.getMuteReason()));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (user.getMuteReason ().equals ("")) {
|
if (user.getMuteReason ().equals ("")) {
|
||||||
@ -82,9 +82,9 @@ public class Commandmute extends EssentialsCommand {
|
|||||||
user.sendMessage(tl("playerMuted"));
|
user.sendMessage(tl("playerMuted"));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
sender.sendMessage(tl("mutedPlayer", user.getDisplayName()) + tl("muteReason",user.getMuteReason()));
|
sender.sendMessage(tl("mutedPlayer", user.getDisplayName()) + " " + tl("muteReason",user.getMuteReason()));
|
||||||
/** Send the player a message, why they were muted **/
|
/** Send the player a message, why they were muted **/
|
||||||
user.sendMessage(tl("playerMuted")+ tl("muteReason",user.getMuteReason()));
|
user.sendMessage(tl("playerMuted") + " " + tl("muteReason",user.getMuteReason()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
final String message;
|
final String message;
|
||||||
@ -93,14 +93,14 @@ public class Commandmute extends EssentialsCommand {
|
|||||||
message = tl("muteNotifyFor", sender.getSender().getName(), user.getName(), muteTime);
|
message = tl("muteNotifyFor", sender.getSender().getName(), user.getName(), muteTime);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
message = (tl("muteNotifyFor", sender.getSender().getName(), user.getName(), muteTime) + tl("muteReason",user.getMuteReason()));
|
message = (tl("muteNotifyFor", sender.getSender().getName(), user.getName(), muteTime) + " " + tl("muteReason",user.getMuteReason()));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (user.getMuteReason ().equals ("")) {
|
if (user.getMuteReason ().equals ("")) {
|
||||||
message = tl("muteNotify", sender.getSender().getName(), user.getName());
|
message = tl("muteNotify", sender.getSender().getName(), user.getName());
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
message = (tl("muteNotify", sender.getSender().getName(), user.getName()) + tl("muteReason",user.getMuteReason()));
|
message = (tl("muteNotify", sender.getSender().getName(), user.getName()) + " " + tl("muteReason",user.getMuteReason()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
server.getLogger().log(Level.INFO, message);
|
server.getLogger().log(Level.INFO, message);
|
||||||
|
@ -28,8 +28,12 @@ public class Commandr extends EssentialsCommand {
|
|||||||
User user = ess.getUser(sender.getPlayer());
|
User user = ess.getUser(sender.getPlayer());
|
||||||
|
|
||||||
if (user.isMuted()) {
|
if (user.isMuted()) {
|
||||||
throw new Exception(tl("voiceSilenced") + (user.hasMuteReason() ?
|
if (user.getMuteReason ().equals ("")) {
|
||||||
tl("muteReason", user.getMuteReason()) : ""));
|
throw new Exception(tl("voiceSilenced"));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
throw new Exception(tl("voiceSilenced") + " " + tl("muteReason", user.getMuteReason ()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
message = FormatUtil.formatMessage(user, "essentials.msg", message);
|
message = FormatUtil.formatMessage(user, "essentials.msg", message);
|
||||||
|
@ -117,8 +117,12 @@ public class Commandseen extends EssentialsCommand {
|
|||||||
sender.sendMessage(tl("whoisJail", (user.getJailTimeout() > 0 ? DateUtil.formatDateDiff(user.getJailTimeout()) : tl("true"))));
|
sender.sendMessage(tl("whoisJail", (user.getJailTimeout() > 0 ? DateUtil.formatDateDiff(user.getJailTimeout()) : tl("true"))));
|
||||||
}
|
}
|
||||||
if (user.isMuted()) {
|
if (user.isMuted()) {
|
||||||
throw new Exception(tl("whoisMuted", (user.getMuteTimeout() > 0 ? DateUtil.formatDateDiff(user.getMuteTimeout()) : tl("true"))) + (user.hasMuteReason() ?
|
if (user.getMuteReason ().equals ("")) {
|
||||||
tl("muteReason", user.getMuteReason()) : ""));
|
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("muteReason", user.getMuteReason ()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
final String location = user.getGeoLocation();
|
final String location = user.getGeoLocation();
|
||||||
if (location != null && (!(sender.isPlayer()) || ess.getUser(sender.getPlayer()).isAuthorized("essentials.geoip.show"))) {
|
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("whoisAFK", tl("false")));
|
||||||
}
|
}
|
||||||
sender.sendMessage(tl("whoisJail", (user.isJailed() ? user.getJailTimeout() > 0 ? DateUtil.formatDateDiff(user.getJailTimeout()) : tl("true") : tl("false"))));
|
sender.sendMessage(tl("whoisJail", (user.isJailed() ? user.getJailTimeout() > 0 ? DateUtil.formatDateDiff(user.getJailTimeout()) : tl("true") : tl("false"))));
|
||||||
throw new Exception(tl("voiceSilenced") + (user.hasMuteReason() ?
|
if (user.getMuteReason ().equals ("")) {
|
||||||
tl("muteReason", user.getMuteReason()) : ""));
|
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("muteReason", user.getMuteReason ())));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user