Use JitPack and update API reference

This commit is contained in:
ishland
2020-07-29 10:58:04 +08:00
parent 4acbcbfd19
commit 4e2b6c7810
4 changed files with 13 additions and 10 deletions

View File

@ -81,7 +81,7 @@ Possible values: `Premium`, `Cracked`, `Unknown`
* [CrazyLogin](https://dev.bukkit.org/bukkit-plugins/crazylogin/) * [CrazyLogin](https://dev.bukkit.org/bukkit-plugins/crazylogin/)
* [LoginSecurity](https://dev.bukkit.org/bukkit-plugins/loginsecurity/) * [LoginSecurity](https://dev.bukkit.org/bukkit-plugins/loginsecurity/)
* [UltraAuth](https://dev.bukkit.org/bukkit-plugins/ultraauth-aa/) * [UltraAuth](https://dev.bukkit.org/bukkit-plugins/ultraauth-aa/)
* [SodionAuth](https://github.com/Mohist-Community/SodionAuth) * [SodionAuth (2.0+)](https://github.com/Mohist-Community/SodionAuth)
### BungeeCord/Waterfall ### BungeeCord/Waterfall

View File

@ -235,12 +235,11 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>red.mohist.sodionauth</groupId> <groupId>com.github.Mohist-Community</groupId>
<artifactId>SodionAuth-Bukkit</artifactId> <artifactId>SodionAuth</artifactId>
<version>2.0-SNAPSHOT</version> <version>e3395df27a</version>
<optional>true</optional> <optional>true</optional>
<scope>system</scope> <scope>provided</scope>
<systemPath>${project.basedir}/lib/SodionAuth-Bukkit-2.0-API-only.jar</systemPath>
</dependency> </dependency>
</dependencies> </dependencies>
</project> </project>

View File

@ -37,13 +37,17 @@ public class SodionAuthHook implements AuthPlugin<Player> {
@Override @Override
public boolean forceRegister(Player player, String password) { public boolean forceRegister(Player player, String password) {
plugin.getLog().warn("AutoRegister is not implemented by SodionAuth yet."); try{
plugin.getLog().warn("Disable it to prevent further issue!"); return SodionAuthApi.register(new BukkitPlayer(player), password);
return false; } catch (UnsupportedOperationException e){
plugin.getLog().warn("Currently SodionAuth is not accepting forceRegister, " +
"It may be caused by unsupported AuthBackend");
return false;
}
} }
@Override @Override
public boolean isRegistered(String playerName) { public boolean isRegistered(String playerName) {
return SodionAuthApi.isRegister(playerName); return SodionAuthApi.isRegistered(playerName);
} }
} }