Fail safetly if there session was started (prevents duplicate errors)

This commit is contained in:
games647
2016-11-26 10:06:27 +01:00
parent 41abffdb08
commit a25d97879f
5 changed files with 14 additions and 10 deletions

View File

@@ -1,6 +1,6 @@
# Use https://travis-ci.org/ for automatic tests # Use https://travis-ci.org/ for automatic tests
# speed up testing http://blog.travis-ci.com/2014-12-17-faster-builds-with-container-based-infrastructure/ # speed up testing https://blog.travis-ci.com/2014-12-17-faster-builds-with-container-based-infrastructure/
sudo: false sudo: false
# This is a java project # This is a java project

View File

@@ -41,7 +41,7 @@ So they don't need to enter passwords. This is also called auto login (auto-logi
* fastlogin.command.import * fastlogin.command.import
###Requirements: ###Requirements:
* Plugin: [ProtocolLib](http://www.spigotmc.org/resources/protocollib.1997/) or [ProtocolSupport](http://www.spigotmc.org/resources/protocolsupport.7201/) * Plugin: [ProtocolLib](https://www.spigotmc.org/resources/protocollib.1997/) or [ProtocolSupport](https://www.spigotmc.org/resources/protocolsupport.7201/)
* Tested Bukkit/[Spigot](https://www.spigotmc.org) 1.9 (could also work with other versions) * Tested Bukkit/[Spigot](https://www.spigotmc.org) 1.9 (could also work with other versions)
* Java 7+ * Java 7+
* Run Spigot and/or BungeeCord/Waterfall in offline mode (see server.properties or config.yml) * Run Spigot and/or BungeeCord/Waterfall in offline mode (see server.properties or config.yml)
@@ -49,14 +49,14 @@ So they don't need to enter passwords. This is also called auto login (auto-logi
####Bukkit/Spigot/PaperSpigot ####Bukkit/Spigot/PaperSpigot
* [AuthMe (both 5.X and 3.X)](http://dev.bukkit.org/bukkit-plugins/authme-reloaded/) * [AuthMe (both 5.X and 3.X)](https://dev.bukkit.org/bukkit-plugins/authme-reloaded/)
* [xAuth](http://dev.bukkit.org/bukkit-plugins/xauth/) * [xAuth](https://dev.bukkit.org/bukkit-plugins/xauth/)
* [LogIt](https://github.com/XziomekX/LogIt) * [LogIt](https://github.com/XziomekX/LogIt)
* [AdvancedLogin (Paid)](https://www.spigotmc.org/resources/advancedlogin.10510/) * [AdvancedLogin (Paid)](https://www.spigotmc.org/resources/advancedlogin.10510/)
* [CrazyLogin](http://dev.bukkit.org/bukkit-plugins/crazylogin/) * [CrazyLogin](https://dev.bukkit.org/bukkit-plugins/crazylogin/)
* [LoginSecurity](http://dev.bukkit.org/bukkit-plugins/loginsecurity/) * [LoginSecurity](https://dev.bukkit.org/bukkit-plugins/loginsecurity/)
* [RoyalAuth](http://dev.bukkit.org/bukkit-plugins/royalauth/) * [RoyalAuth](https://dev.bukkit.org/bukkit-plugins/royalauth/)
* [UltraAuth](http://dev.bukkit.org/bukkit-plugins/ultraauth-aa/) * [UltraAuth](https://dev.bukkit.org/bukkit-plugins/ultraauth-aa/)
####BungeeCord/Waterfall ####BungeeCord/Waterfall

View File

@@ -65,7 +65,7 @@
<dependency> <dependency>
<groupId>org.spigotmc</groupId> <groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId> <artifactId>spigot-api</artifactId>
<version>1.10-R0.1-SNAPSHOT</version> <version>1.10.2-R0.1-SNAPSHOT</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>

View File

@@ -31,6 +31,10 @@ public class ForceLoginTask extends ForceLoginMangement<ProxiedPlayer, CommandSe
PendingConnection pendingConnection = player.getPendingConnection(); PendingConnection pendingConnection = player.getPendingConnection();
session = core.getPlugin().getSession().get(pendingConnection); session = core.getPlugin().getSession().get(pendingConnection);
if (session == null) {
return;
}
super.run(); super.run();
if (!isOnlineMode()) { if (!isOnlineMode()) {

View File

@@ -48,7 +48,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version> <version>3.6.0</version>
<configuration> <configuration>
<source>1.8</source> <source>1.8</source>
<target>1.8</target> <target>1.8</target>