Merge branch 'master' of ssh://184.154.0.242:7999/min/mineplex

Conflicts:
	Plugins/Mineplex.Core/src/mineplex/core/account/CoreClientManager.java
This commit is contained in:
Chiss 2014-12-15 14:56:09 +11:00
commit d1be64d7e7
5 changed files with 43 additions and 59 deletions

View File

@ -5,13 +5,13 @@
<classpathentry kind="var" path="REPO_DIR/Plugins/Libraries/httpcore-4.2.jar"/>
<classpathentry kind="var" path="REPO_DIR/Plugins/Libraries/httpclient-4.2.jar"/>
<classpathentry kind="var" path="REPO_DIR/Plugins/Libraries/commons-codec-1.6.jar"/>
<classpathentry kind="var" path="REPO_DIR/Plugins/Libraries/craftbukkit.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/Mineplex.Core.Common"/>
<classpathentry combineaccessrules="false" kind="src" path="/Mineplex.ServerData"/>
<classpathentry kind="var" path="REPO_DIR/Plugins/Libraries/jedis-2.4.2.jar"/>
<classpathentry kind="var" path="REPO_DIR/Plugins/Libraries/commons-pool2-2.2.jar"/>
<classpathentry kind="var" path="REPO_DIR/Plugins/Libraries/commons-dbcp2-2.0.1.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/Mineplex.Database"/>
<classpathentry kind="var" path="REPO_DIR/Plugins/Libraries/jooq-3.4.2.jar"/>
<classpathentry kind="var" path="REPO_DIR/Plugins/Libraries/craftbukkit.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/Mineplex.Core.Common"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View File

@ -124,62 +124,57 @@ public class CoreClientManager extends MiniPlugin
public int getPlayerCountIncludingConnecting()
{
return Bukkit.getOnlinePlayers().size() + Math.max(0, _clientsConnecting);
return Bukkit.getOnlinePlayers().size() + _clientsConnecting;
}
@EventHandler(priority = EventPriority.LOWEST)
public void AsyncLogin(AsyncPlayerPreLoginEvent event)
{
try
_clientsConnecting++;
while (_clientsProcessing >= 5)
{
_clientsConnecting++;
while (_clientsProcessing >= 5)
{
try
{
Thread.sleep(25);
}
catch (InterruptedException e)
{
e.printStackTrace();
}
}
try
{
_clientsProcessing++;
LoadClient(Add(event.getName()), event.getUniqueId(), event.getAddress().getHostAddress());
Thread.sleep(25);
}
catch(Exception exception)
catch (InterruptedException e)
{
Logger.Instance.log(exception);
event.disallow(Result.KICK_OTHER, "Error retrieving information from web, please retry in a minute.");
System.out.println(exception.getMessage());
}
finally
{
_clientsProcessing--;
e.printStackTrace();
}
}
_clientsProcessing++;
try
{
LoadClient(Add(event.getName()), event.getUniqueId(), event.getAddress().getHostAddress());
}
catch(Exception exception)
{
Logger.Instance.log(exception);
event.disallow(Result.KICK_OTHER, "Error retrieving information from web, please retry in a minute.");
if (Bukkit.hasWhitelist() && !Get(event.getName()).GetRank().Has(Rank.MODERATOR))
{
for (OfflinePlayer player : Bukkit.getWhitelistedPlayers())
{
if (player.getName().equalsIgnoreCase(event.getName()))
{
return;
}
}
event.disallow(Result.KICK_WHITELIST, "You are not whitelisted my friend.");
}
System.out.println(exception.getMessage());
}
finally
{
_clientsProcessing--;
_clientsConnecting--;
}
if (Bukkit.hasWhitelist() && !Get(event.getName()).GetRank().Has(Rank.MODERATOR))
{
for (OfflinePlayer player : Bukkit.getWhitelistedPlayers())
{
if (player.getName().equalsIgnoreCase(event.getName()))
{
return;
}
}
event.disallow(Result.KICK_WHITELIST, "You are not whitelisted my friend.");
}
}
public void loadClientByName(final String playerName, final Runnable runnable)
@ -441,18 +436,6 @@ public class CoreClientManager extends MiniPlugin
}
}
@EventHandler
public void debug(UpdateEvent event)
{
if (event.getType() != UpdateType.SLOWER)
return;
System.out.println("=====");
System.out.println("Connecting : " + _clientsConnecting);
System.out.println("Processing : " + _clientsProcessing);
System.out.println("=====");
}
public void addStoredProcedureLoginProcessor(ILoginProcessor processor)
{
_loginProcessors.put(processor.getName(), processor);

View File

@ -2,8 +2,8 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="var" path="REPO_DIR/Plugins/Libraries/jooq-3.4.2.jar"/>
<classpathentry kind="var" path="REPO_DIR/Plugins/Libraries/jooq-meta-3.4.2.jar"/>
<classpathentry kind="var" path="REPO_DIR/Plugins/Libraries/jooq-codegen-3.4.2.jar"/>
<classpathentry kind="var" path="REPO_DIR/Plugins/Libraries/jooq-3.4.2.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View File

@ -3,7 +3,7 @@
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jre7"/>
<classpathentry kind="var" path="REPO_DIR/Plugins/Libraries/jedis-2.4.2.jar"/>
<classpathentry kind="var" path="REPO_DIR/Plugins/Libraries/commons-pool2-2.2.jar"/>
<classpathentry kind="var" path="REPO_DIR/Plugins/Libraries/gson-2.2.1.jar"/>
<classpathentry kind="var" path="REPO_DIR/Plugins/Libraries/commons-pool2-2.2.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View File

@ -142,10 +142,11 @@ public class Christmas extends SoloGame
"Defeat the Thief who stole the Presents!"
});
this.BlockBreakAllow.add(4);
this.HungerSet = 20;
this.WorldTimeSet = 2000;
this.PrepareFreeze = false;
BlockBreakAllow.add(4);
HungerSet = 20;
WorldTimeSet = 2000;
PrepareFreeze = false;
Manager.GetServerConfig().RewardGems = false;
}
//parse 129 19 47 48 103 86 137 56 22 45 121 14 15 16 87 88 89 153 173 172 162