Merge pull request #16 from Xephi/master

Up
This commit is contained in:
Gabriele C. 2015-07-25 10:09:48 +02:00
commit f08c462afd
3 changed files with 11 additions and 8 deletions

View File

@ -862,8 +862,10 @@ public class AuthMePlayerListener implements Listener {
if (!Settings.isForcedRegistrationEnabled) if (!Settings.isForcedRegistrationEnabled)
return; return;
if (causeByAuthMe.containsKey(name) && causeByAuthMe.get(name)) if (causeByAuthMe.containsKey(name)) {
causeByAuthMe.remove(name);
return; return;
}
event.setCancelled(true); event.setCancelled(true);
} }

View File

@ -52,7 +52,9 @@ public class AsyncronousJoin {
} }
public void process() { public void process() {
AuthMePlayerListener.gameMode.put(name, player.getGameMode()); if (AuthMePlayerListener.gameMode.containsKey(name))
AuthMePlayerListener.gameMode.remove(name);
AuthMePlayerListener.gameMode.putIfAbsent(name, player.getGameMode());
BukkitScheduler sched = plugin.getServer().getScheduler(); BukkitScheduler sched = plugin.getServer().getScheduler();
if (plugin.getCitizensCommunicator().isNPC(player) || Utils.getInstance().isUnrestricted(player) || CombatTagComunicator.isNPC(player)) { if (plugin.getCitizensCommunicator().isNPC(player) || Utils.getInstance().isUnrestricted(player) || CombatTagComunicator.isNPC(player)) {
@ -74,9 +76,8 @@ public class AsyncronousJoin {
@Override @Override
public void run() { public void run() {
AuthMePlayerListener.causeByAuthMe.put(name, true); AuthMePlayerListener.causeByAuthMe.putIfAbsent(name, true);
player.setGameMode(gM); player.setGameMode(gM);
AuthMePlayerListener.causeByAuthMe.put(name, false);
player.kickPlayer("You are not the Owner of this account, please try another name!"); player.kickPlayer("You are not the Owner of this account, please try another name!");
if (Settings.banUnsafeIp) if (Settings.banUnsafeIp)
plugin.getServer().banIP(ip); plugin.getServer().banIP(ip);
@ -125,9 +126,8 @@ public class AsyncronousJoin {
@Override @Override
public void run() { public void run() {
AuthMePlayerListener.causeByAuthMe.put(name, true); AuthMePlayerListener.causeByAuthMe.putIfAbsent(name, true);
Utils.forceGM(player); Utils.forceGM(player);
AuthMePlayerListener.causeByAuthMe.put(name, false);
} }
}); });
@ -164,9 +164,8 @@ public class AsyncronousJoin {
@Override @Override
public void run() { public void run() {
AuthMePlayerListener.causeByAuthMe.put(name, true); AuthMePlayerListener.causeByAuthMe.putIfAbsent(name, true);
Utils.forceGM(player); Utils.forceGM(player);
AuthMePlayerListener.causeByAuthMe.put(name, false);
} }
}); });

View File

@ -51,6 +51,8 @@ permissions:
authme.passpartu: true authme.passpartu: true
authme.l: true authme.l: true
authme.reg: true authme.reg: true
authme.email: true
authme.captcha: true
authme.admin.*: authme.admin.*:
description: Gives access to all authme admin commands description: Gives access to all authme admin commands
children: children: