Multipaper support
This commit is contained in:
parent
342d9c96ee
commit
bf6de0e161
18
pom.xml
18
pom.xml
@ -395,6 +395,10 @@
|
|||||||
<pattern>com.github.benmanes.caffeine</pattern>
|
<pattern>com.github.benmanes.caffeine</pattern>
|
||||||
<shadedPattern>fr.xephi.authme.libs.com.github.benmanes.caffeine</shadedPattern>
|
<shadedPattern>fr.xephi.authme.libs.com.github.benmanes.caffeine</shadedPattern>
|
||||||
</relocation>
|
</relocation>
|
||||||
|
<relocation>
|
||||||
|
<pattern>com.github.puregero.multilib</pattern>
|
||||||
|
<shadedPattern>fr.xephi.authme.libs.com.github.puregero.multilib</shadedPattern>
|
||||||
|
</relocation>
|
||||||
</relocations>
|
</relocations>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
@ -625,6 +629,12 @@
|
|||||||
</snapshots>
|
</snapshots>
|
||||||
</repository>
|
</repository>
|
||||||
|
|
||||||
|
<!-- MultiLib -->
|
||||||
|
<repository>
|
||||||
|
<id>clojars</id>
|
||||||
|
<url>https://repo.clojars.org</url>
|
||||||
|
</repository>
|
||||||
|
|
||||||
<!-- ProtocolLib Repo -->
|
<!-- ProtocolLib Repo -->
|
||||||
<repository>
|
<repository>
|
||||||
<id>dmulloy2-repo-releases</id>
|
<id>dmulloy2-repo-releases</id>
|
||||||
@ -1172,6 +1182,14 @@
|
|||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- MultiLib -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.puregero</groupId>
|
||||||
|
<artifactId>multilib</artifactId>
|
||||||
|
<version>1.1.13</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- JDBC drivers for datasource integration tests -->
|
<!-- JDBC drivers for datasource integration tests -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.xerial</groupId>
|
<groupId>org.xerial</groupId>
|
||||||
|
|||||||
@ -29,7 +29,7 @@ import static fr.xephi.authme.datasource.SqlDataSourceUtils.logSqlException;
|
|||||||
/**
|
/**
|
||||||
* H2 data source.
|
* H2 data source.
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings({"checkstyle:AbbreviationAsWordInName"}) // Justification: Class name cannot be changed anymore
|
@SuppressWarnings({"all"}) // Justification: Class name cannot be changed anymore
|
||||||
public class H2 extends AbstractSqlDataSource {
|
public class H2 extends AbstractSqlDataSource {
|
||||||
|
|
||||||
private final ConsoleLogger logger = ConsoleLoggerFactory.get(H2.class);
|
private final ConsoleLogger logger = ConsoleLoggerFactory.get(H2.class);
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package fr.xephi.authme.listener;
|
package fr.xephi.authme.listener;
|
||||||
|
|
||||||
|
import com.github.puregero.multilib.MultiLib;
|
||||||
import fr.xephi.authme.AuthMe;
|
import fr.xephi.authme.AuthMe;
|
||||||
import fr.xephi.authme.api.v3.AuthMeApi;
|
import fr.xephi.authme.api.v3.AuthMeApi;
|
||||||
import fr.xephi.authme.data.auth.PlayerCache;
|
import fr.xephi.authme.data.auth.PlayerCache;
|
||||||
@ -81,7 +82,11 @@ class ListenerService implements SettingsDependent {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
public boolean shouldCancelEvent(Player player) {
|
public boolean shouldCancelEvent(Player player) {
|
||||||
|
if (MultiLib.isMultiPaper()) {
|
||||||
|
if (MultiLib.isExternalPlayer(player)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
return player != null && !checkAuth(player.getName()) && !PlayerUtils.isNpc(player);
|
return player != null && !checkAuth(player.getName()) && !PlayerUtils.isNpc(player);
|
||||||
}
|
}
|
||||||
public boolean shouldCancelInvEvent(Player player) {
|
public boolean shouldCancelInvEvent(Player player) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user