mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-26 11:07:55 +01:00
New permission: essentials.sleepingignored
This commit is contained in:
parent
cecb9867d9
commit
ae7275c7ad
@ -268,6 +268,9 @@ public class EssentialsPlayerListener extends PlayerListener
|
||||
|
||||
user.setDisplayName(user.getNick());
|
||||
user.setAfk(false);
|
||||
if (user.isAuthorized("essentials.sleepingignored")) {
|
||||
user.setSleepingIgnored(true);
|
||||
}
|
||||
|
||||
if (!ess.getSettings().isCommandDisabled("motd") && user.isAuthorized("essentials.motd"))
|
||||
{
|
||||
|
@ -117,6 +117,7 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
|
||||
{
|
||||
takeMoney(value, null);
|
||||
}
|
||||
|
||||
public void takeMoney(double value, CommandSender initiator)
|
||||
{
|
||||
if (value == 0)
|
||||
@ -306,7 +307,7 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
|
||||
@Override
|
||||
public void setAfk(boolean set)
|
||||
{
|
||||
this.setSleepingIgnored(set);
|
||||
this.setSleepingIgnored(this.isAuthorized("essentials.sleepingignored") ? true : set);
|
||||
super.setAfk(set);
|
||||
}
|
||||
|
||||
@ -314,7 +315,7 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
|
||||
public boolean toggleAfk()
|
||||
{
|
||||
boolean now = super.toggleAfk();
|
||||
this.setSleepingIgnored(now);
|
||||
this.setSleepingIgnored(this.isAuthorized("essentials.sleepingignored") ? true : now);
|
||||
return now;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user