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/)
* [LoginSecurity](https://dev.bukkit.org/bukkit-plugins/loginsecurity/)
* [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

View File

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

View File

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