mirror of
https://github.com/TuxCoding/FastLogin.git
synced 2025-07-30 02:37:34 +02:00
Added support for LogIt
This commit is contained in:
@ -3,6 +3,7 @@
|
|||||||
* Added support for AuthMe 3.X
|
* Added support for AuthMe 3.X
|
||||||
* Fixed premium logins if the server is not fully started
|
* Fixed premium logins if the server is not fully started
|
||||||
* Added other command argument to /premium and /cracked
|
* Added other command argument to /premium and /cracked
|
||||||
|
* Added support for LogIt
|
||||||
|
|
||||||
######1.2.1
|
######1.2.1
|
||||||
|
|
||||||
|
@ -44,6 +44,7 @@ So they don't need to enter passwords. This is also called auto login (auto-logi
|
|||||||
|
|
||||||
* [AuthMe (both 5.X and 3.X)](http://dev.bukkit.org/bukkit-plugins/authme-reloaded/)
|
* [AuthMe (both 5.X and 3.X)](http://dev.bukkit.org/bukkit-plugins/authme-reloaded/)
|
||||||
* [xAuth](http://dev.bukkit.org/bukkit-plugins/xauth/)
|
* [xAuth](http://dev.bukkit.org/bukkit-plugins/xauth/)
|
||||||
|
* [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](http://dev.bukkit.org/bukkit-plugins/crazylogin/)
|
||||||
* [LoginSecurity](http://dev.bukkit.org/bukkit-plugins/loginsecurity/)
|
* [LoginSecurity](http://dev.bukkit.org/bukkit-plugins/loginsecurity/)
|
||||||
|
@ -40,6 +40,11 @@
|
|||||||
<url>http://repo.luricos.de/bukkit-plugins/</url>
|
<url>http://repo.luricos.de/bukkit-plugins/</url>
|
||||||
</repository>
|
</repository>
|
||||||
|
|
||||||
|
<repository>
|
||||||
|
<id>logit-only-repo</id>
|
||||||
|
<url>http://ci.ac3-servers.eu/job/LogIt-Classic/2/maven-repository/repository/</url>
|
||||||
|
</repository>
|
||||||
|
|
||||||
<!--Github automatic maven builds-->
|
<!--Github automatic maven builds-->
|
||||||
<repository>
|
<repository>
|
||||||
<id>jitpack.io</id>
|
<id>jitpack.io</id>
|
||||||
@ -98,6 +103,18 @@
|
|||||||
</exclusions>
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.github.lucaseasedup.logit</groupId>
|
||||||
|
<artifactId>LogIt</artifactId>
|
||||||
|
<version>SNAPSHOT</version>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>*</groupId>
|
||||||
|
<artifactId>*</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.RoyalDev</groupId>
|
<groupId>com.github.RoyalDev</groupId>
|
||||||
<artifactId>RoyalAuth</artifactId>
|
<artifactId>RoyalAuth</artifactId>
|
||||||
|
@ -0,0 +1,36 @@
|
|||||||
|
package com.github.games647.fastlogin.bukkit.hooks;
|
||||||
|
|
||||||
|
import io.github.lucaseasedup.logit.CancelledState;
|
||||||
|
import io.github.lucaseasedup.logit.LogItCore;
|
||||||
|
import io.github.lucaseasedup.logit.account.Account;
|
||||||
|
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Github: https://github.com/XziomekX/LogIt
|
||||||
|
* Project page:
|
||||||
|
*
|
||||||
|
* Bukkit: Unknown
|
||||||
|
* Spigot: Unknown
|
||||||
|
*/
|
||||||
|
public class LogItHook implements BukkitAuthPlugin {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean forceLogin(Player player) {
|
||||||
|
return LogItCore.getInstance().getSessionManager().startSession(player) == CancelledState.NOT_CANCELLED;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isRegistered(String playerName) throws Exception {
|
||||||
|
return LogItCore.getInstance().getAccountManager().isRegistered(playerName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean forceRegister(Player player, String password) {
|
||||||
|
Account account = new Account(player.getName());
|
||||||
|
account.changePassword(password);
|
||||||
|
account.setLastActiveDate(System.currentTimeMillis() / 1000);
|
||||||
|
account.setRegistrationDate(System.currentTimeMillis() / 1000);
|
||||||
|
return LogItCore.getInstance().getAccountManager().insertAccount(account) == CancelledState.NOT_CANCELLED;
|
||||||
|
}
|
||||||
|
}
|
@ -19,6 +19,7 @@ softdepend:
|
|||||||
# Auth plugins
|
# Auth plugins
|
||||||
- xAuth
|
- xAuth
|
||||||
- AuthMe
|
- AuthMe
|
||||||
|
- LogIt
|
||||||
- CrazyLogin
|
- CrazyLogin
|
||||||
- LoginSecurity
|
- LoginSecurity
|
||||||
- RoyalAuth
|
- RoyalAuth
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
package com.github.games647.fastlogin.bungee.listener;
|
package com.github.games647.fastlogin.bungee.listener;
|
||||||
|
|
||||||
|
import com.github.games647.fastlogin.bungee.FastLoginBungee;
|
||||||
import com.github.games647.fastlogin.bungee.FastLoginBungee;
|
import com.github.games647.fastlogin.bungee.FastLoginBungee;
|
||||||
import com.github.games647.fastlogin.bungee.ForceLoginTask;
|
import com.github.games647.fastlogin.bungee.ForceLoginTask;
|
||||||
|
import com.github.games647.fastlogin.bungee.ForceLoginTask;
|
||||||
|
import com.github.games647.fastlogin.bungee.PlayerProfile;
|
||||||
import com.github.games647.fastlogin.bungee.PlayerProfile;
|
import com.github.games647.fastlogin.bungee.PlayerProfile;
|
||||||
import com.github.games647.fastlogin.bungee.hooks.BungeeAuthPlugin;
|
import com.github.games647.fastlogin.bungee.hooks.BungeeAuthPlugin;
|
||||||
import com.google.common.base.Charsets;
|
import com.google.common.base.Charsets;
|
||||||
|
Reference in New Issue
Block a user