Update to new AuthMeReloaded API (Fixes #174)

This commit is contained in:
Phoenix616 2018-10-15 20:27:17 +01:00
parent 4ef24c3828
commit 2243c2fbc6
2 changed files with 7 additions and 8 deletions

View File

@ -35,7 +35,7 @@
</repository>
<repository>
<id>authme-repo</id>
<url>http://ci.xephi.fr/plugin/repository/everything/</url>
<url>https://repo.codemc.org/repository/maven-public/</url>
</repository>
<repository>
<id>minebench-repo</id>
@ -156,7 +156,7 @@
<dependency>
<groupId>fr.xephi</groupId>
<artifactId>authme</artifactId>
<version>5.2-SNAPSHOT</version>
<version>5.5.0-SNAPSHOT</version>
<scope>provided</scope>
<exclusions>
<exclusion>

View File

@ -1,5 +1,6 @@
package com.Acrobot.ChestShop.Listeners;
import fr.xephi.authme.api.v3.AuthMeApi;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
@ -9,11 +10,9 @@ import com.Acrobot.ChestShop.Configuration.Properties;
import com.Acrobot.ChestShop.Events.PreTransactionEvent;
import com.Acrobot.ChestShop.Events.PreTransactionEvent.TransactionOutcome;
import fr.xephi.authme.api.NewAPI;
public class AuthMeChestShopListener implements Listener {
NewAPI AuthMeAPI = NewAPI.getInstance();
private AuthMeApi authmeApi = AuthMeApi.getInstance();
@EventHandler(ignoreCancelled = true, priority = EventPriority.LOWEST)
public void onPreTransaction(PreTransactionEvent event) {
@ -26,15 +25,15 @@ public class AuthMeChestShopListener implements Listener {
return;
}
if (AuthMeAPI.isUnrestricted(player)) {
if (authmeApi.isUnrestricted(player)) {
return;
}
if (!AuthMeAPI.isRegistered(player.getName()) && Properties.AUTHME_ALLOW_UNREGISTERED) {
if (!authmeApi.isRegistered(player.getName()) && Properties.AUTHME_ALLOW_UNREGISTERED) {
return;
}
if (AuthMeAPI.isAuthenticated(player)) {
if (authmeApi.isAuthenticated(player)) {
return;
}