mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-09 16:17:37 +02:00
Allow the 'userIsNotAway' and 'userIsAway' translation messages to be empty.
This commit is contained in:
@@ -538,7 +538,11 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
|
|||||||
if (broadcast && !isHidden())
|
if (broadcast && !isHidden())
|
||||||
{
|
{
|
||||||
setDisplayNick();
|
setDisplayNick();
|
||||||
ess.broadcastMessage(this, _("userIsNotAway", getDisplayName()));
|
final String msg = _("userIsNotAway", getDisplayName());
|
||||||
|
if (!msg.isEmpty())
|
||||||
|
{
|
||||||
|
ess.broadcastMessage(this, msg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
lastActivity = System.currentTimeMillis();
|
lastActivity = System.currentTimeMillis();
|
||||||
@@ -571,7 +575,11 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
|
|||||||
if (!isHidden())
|
if (!isHidden())
|
||||||
{
|
{
|
||||||
setDisplayNick();
|
setDisplayNick();
|
||||||
ess.broadcastMessage(this, _("userIsAway", getDisplayName()));
|
final String msg = _("userIsAway", getDisplayName());
|
||||||
|
if (!msg.isEmpty())
|
||||||
|
{
|
||||||
|
ess.broadcastMessage(this, msg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -32,12 +32,13 @@ public class Commandafk extends EssentialsCommand
|
|||||||
private void toggleAfk(User user)
|
private void toggleAfk(User user)
|
||||||
{
|
{
|
||||||
user.setDisplayNick();
|
user.setDisplayNick();
|
||||||
|
String msg = "";
|
||||||
if (!user.toggleAfk())
|
if (!user.toggleAfk())
|
||||||
{
|
{
|
||||||
//user.sendMessage(_("markedAsNotAway"));
|
//user.sendMessage(_("markedAsNotAway"));
|
||||||
if (!user.isHidden())
|
if (!user.isHidden())
|
||||||
{
|
{
|
||||||
ess.broadcastMessage(user, _("userIsNotAway", user.getDisplayName()));
|
msg = _("userIsNotAway", user.getDisplayName());
|
||||||
}
|
}
|
||||||
user.updateActivity(false);
|
user.updateActivity(false);
|
||||||
}
|
}
|
||||||
@@ -46,8 +47,12 @@ public class Commandafk extends EssentialsCommand
|
|||||||
//user.sendMessage(_("markedAsAway"));
|
//user.sendMessage(_("markedAsAway"));
|
||||||
if (!user.isHidden())
|
if (!user.isHidden())
|
||||||
{
|
{
|
||||||
ess.broadcastMessage(user, _("userIsAway", user.getDisplayName()));
|
msg = _("userIsAway", user.getDisplayName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!msg.isEmpty())
|
||||||
|
{
|
||||||
|
ess.broadcastMessage(user, msg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user