mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-11-27 04:25:14 +01:00
Update to new AuthMeReloaded API (Fixes #174)
This commit is contained in:
parent
4ef24c3828
commit
2243c2fbc6
4
pom.xml
4
pom.xml
@ -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>
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user