mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-08 15:46:54 +02:00
Merge branch 'essmaster' into essrelease
This commit is contained in:
@@ -108,7 +108,8 @@ public class EssentialsPlayerListener extends PlayerListener
|
|||||||
}
|
}
|
||||||
|
|
||||||
Location afk = user.getAfkPosition();
|
Location afk = user.getAfkPosition();
|
||||||
if (afk == null || !event.getTo().getWorld().equals(afk.getWorld()) || afk.distanceSquared(event.getTo()) > 9) {
|
if (afk == null || !event.getTo().getWorld().equals(afk.getWorld()) || afk.distanceSquared(event.getTo()) > 9)
|
||||||
|
{
|
||||||
user.updateActivity(true);
|
user.updateActivity(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -314,14 +315,13 @@ public class EssentialsPlayerListener extends PlayerListener
|
|||||||
user.setNPC(false);
|
user.setNPC(false);
|
||||||
|
|
||||||
final long currentTime = System.currentTimeMillis();
|
final long currentTime = System.currentTimeMillis();
|
||||||
user.checkBanTimeout(currentTime);
|
boolean banExpired = user.checkBanTimeout(currentTime);
|
||||||
user.checkMuteTimeout(currentTime);
|
user.checkMuteTimeout(currentTime);
|
||||||
user.checkJailTimeout(currentTime);
|
user.checkJailTimeout(currentTime);
|
||||||
|
|
||||||
if (user.isBanned() || event.getResult() == Result.KICK_BANNED)
|
if (banExpired == false && (user.isBanned() || event.getResult() == Result.KICK_BANNED))
|
||||||
{
|
{
|
||||||
final String banReason = user.getBanReason();
|
final String banReason = user.getBanReason();
|
||||||
LOGGER.log(Level.INFO, "Banned for '" + banReason + "'");
|
|
||||||
event.disallow(Result.KICK_BANNED, banReason != null && !banReason.isEmpty() && !banReason.equalsIgnoreCase("ban") ? banReason : Util.i18n("defaultBanReason"));
|
event.disallow(Result.KICK_BANNED, banReason != null && !banReason.isEmpty() && !banReason.equalsIgnoreCase("ban") ? banReason : Util.i18n("defaultBanReason"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@@ -381,7 +381,8 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
|
|||||||
this.hidden = hidden;
|
this.hidden = hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void checkJailTimeout(final long currentTime)
|
//Returns true if status expired during this check
|
||||||
|
public boolean checkJailTimeout(final long currentTime)
|
||||||
{
|
{
|
||||||
if (getJailTimeout() > 0 && getJailTimeout() < currentTime && isJailed())
|
if (getJailTimeout() > 0 && getJailTimeout() < currentTime && isJailed())
|
||||||
{
|
{
|
||||||
@@ -396,26 +397,34 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
|
|||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void checkMuteTimeout(final long currentTime)
|
//Returns true if status expired during this check
|
||||||
|
public boolean checkMuteTimeout(final long currentTime)
|
||||||
{
|
{
|
||||||
if (getMuteTimeout() > 0 && getMuteTimeout() < currentTime && isMuted())
|
if (getMuteTimeout() > 0 && getMuteTimeout() < currentTime && isMuted())
|
||||||
{
|
{
|
||||||
setMuteTimeout(0);
|
setMuteTimeout(0);
|
||||||
sendMessage(Util.i18n("canTalkAgain"));
|
sendMessage(Util.i18n("canTalkAgain"));
|
||||||
setMuted(false);
|
setMuted(false);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void checkBanTimeout(final long currentTime)
|
//Returns true if status expired during this check
|
||||||
|
public boolean checkBanTimeout(final long currentTime)
|
||||||
{
|
{
|
||||||
if (getBanTimeout() > 0 && getBanTimeout() < currentTime && isBanned())
|
if (getBanTimeout() > 0 && getBanTimeout() < currentTime && isBanned())
|
||||||
{
|
{
|
||||||
setBanTimeout(0);
|
setBanTimeout(0);
|
||||||
setBanned(false);
|
setBanned(false);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateActivity(final boolean broadcast)
|
public void updateActivity(final boolean broadcast)
|
||||||
|
@@ -22,3 +22,4 @@ v 1.1:
|
|||||||
- Added a BukkitPermsUpdateTask to only update superperms once on a load/reload.
|
- Added a BukkitPermsUpdateTask to only update superperms once on a load/reload.
|
||||||
- Fix for GM not checking inheritance for known superperms nodes.
|
- Fix for GM not checking inheritance for known superperms nodes.
|
||||||
- Optimized getAllPlayersPermissions and fixed pushing unknown perms to superperms.
|
- Optimized getAllPlayersPermissions and fixed pushing unknown perms to superperms.
|
||||||
|
v 1.2:
|
@@ -1,5 +1,5 @@
|
|||||||
name: GroupManager
|
name: GroupManager
|
||||||
version: "1.1 (Phoenix)"
|
version: "1.2 (Phoenix)"
|
||||||
main: org.anjocaido.groupmanager.GroupManager
|
main: org.anjocaido.groupmanager.GroupManager
|
||||||
website: http://www.anjocaido.info/
|
website: http://www.anjocaido.info/
|
||||||
description: Provides on-the-fly system for permissions system created by Nijikokun. But all in memory, and with flat-file saving schedule.
|
description: Provides on-the-fly system for permissions system created by Nijikokun. But all in memory, and with flat-file saving schedule.
|
||||||
|
Reference in New Issue
Block a user