mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-18 16:45:37 +01:00
*make it look like i'm doing something*
This commit is contained in:
parent
b6bbe237ea
commit
301b609e93
@ -32,7 +32,7 @@ public class EssentialsBlockListener implements Listener
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
boolean unlimitedForUser = user.hasUnlimited(is);
|
final boolean unlimitedForUser = user.hasUnlimited(is);
|
||||||
if (unlimitedForUser && user.getGameMode() == GameMode.SURVIVAL)
|
if (unlimitedForUser && user.getGameMode() == GameMode.SURVIVAL)
|
||||||
{
|
{
|
||||||
ess.scheduleSyncDelayedTask(
|
ess.scheduleSyncDelayedTask(
|
||||||
|
@ -182,7 +182,8 @@ public class EssentialsPlayerListener implements Listener
|
|||||||
@EventHandler(priority = EventPriority.HIGH)
|
@EventHandler(priority = EventPriority.HIGH)
|
||||||
public void onPlayerLogin(final PlayerLoginEvent event)
|
public void onPlayerLogin(final PlayerLoginEvent event)
|
||||||
{
|
{
|
||||||
switch (event.getResult()) {
|
switch (event.getResult())
|
||||||
|
{
|
||||||
case ALLOWED:
|
case ALLOWED:
|
||||||
case KICK_FULL:
|
case KICK_FULL:
|
||||||
case KICK_BANNED:
|
case KICK_BANNED:
|
||||||
@ -199,7 +200,7 @@ public class EssentialsPlayerListener implements Listener
|
|||||||
user.checkMuteTimeout(currentTime);
|
user.checkMuteTimeout(currentTime);
|
||||||
user.checkJailTimeout(currentTime);
|
user.checkJailTimeout(currentTime);
|
||||||
|
|
||||||
if (banExpired == false && (user.isBanned() || event.getResult() == Result.KICK_BANNED))
|
if (!banExpired && (user.isBanned() || event.getResult() == Result.KICK_BANNED))
|
||||||
{
|
{
|
||||||
final String banReason = user.getBanReason();
|
final String banReason = user.getBanReason();
|
||||||
event.disallow(Result.KICK_BANNED, banReason != null && !banReason.isEmpty() && !banReason.equalsIgnoreCase("ban") ? banReason : _("defaultBanReason"));
|
event.disallow(Result.KICK_BANNED, banReason != null && !banReason.isEmpty() && !banReason.equalsIgnoreCase("ban") ? banReason : _("defaultBanReason"));
|
||||||
@ -291,7 +292,7 @@ public class EssentialsPlayerListener implements Listener
|
|||||||
{
|
{
|
||||||
for (Player player : ess.getServer().getOnlinePlayers())
|
for (Player player : ess.getServer().getOnlinePlayers())
|
||||||
{
|
{
|
||||||
User spyer = ess.getUser(player);
|
final User spyer = ess.getUser(player);
|
||||||
if (spyer.isSocialSpyEnabled() && !user.equals(spyer))
|
if (spyer.isSocialSpyEnabled() && !user.equals(spyer))
|
||||||
{
|
{
|
||||||
player.sendMessage(user.getDisplayName() + " : " + event.getMessage());
|
player.sendMessage(user.getDisplayName() + " : " + event.getMessage());
|
||||||
@ -400,7 +401,7 @@ public class EssentialsPlayerListener implements Listener
|
|||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.LOW)
|
@EventHandler(priority = EventPriority.LOW)
|
||||||
public void onPlayerPickupItem(PlayerPickupItemEvent event)
|
public void onPlayerPickupItem(final PlayerPickupItemEvent event)
|
||||||
{
|
{
|
||||||
if (event.isCancelled() || !ess.getSettings().getDisableItemPickupWhileAfk())
|
if (event.isCancelled() || !ess.getSettings().getDisableItemPickupWhileAfk())
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user