Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
5981af630a
4
pom.xml
4
pom.xml
@ -513,7 +513,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-install-plugin</artifactId>
|
<artifactId>maven-install-plugin</artifactId>
|
||||||
<version>3.1.0</version>
|
<version>3.1.2</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
<!-- Deploy the jars as artifacts into the remote repository -->
|
<!-- Deploy the jars as artifacts into the remote repository -->
|
||||||
<plugin>
|
<plugin>
|
||||||
@ -1193,7 +1193,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.xerial</groupId>
|
<groupId>org.xerial</groupId>
|
||||||
<artifactId>sqlite-jdbc</artifactId>
|
<artifactId>sqlite-jdbc</artifactId>
|
||||||
<version>3.45.3.0</version>
|
<version>3.46.0.0</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|||||||
@ -10,7 +10,7 @@ public final class PlayerUtils {
|
|||||||
// Utility class
|
// Utility class
|
||||||
private PlayerUtils() {
|
private PlayerUtils() {
|
||||||
}
|
}
|
||||||
private static final boolean IS_LEAVES_SERVER = Utils.isClassLoaded("top.leavesmc.leaves.LeavesConfig");
|
private static final boolean isLeavesServer = Utils.isClassLoaded("top.leavesmc.leaves.LeavesConfig") || Utils.isClassLoaded("org.leavesmc.leaves.LeavesConfig");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the IP of the given player.
|
* Returns the IP of the given player.
|
||||||
@ -29,7 +29,7 @@ public final class PlayerUtils {
|
|||||||
* @return True if the player is an NPC, false otherwise
|
* @return True if the player is an NPC, false otherwise
|
||||||
*/
|
*/
|
||||||
public static boolean isNpc(Player player) {
|
public static boolean isNpc(Player player) {
|
||||||
if (IS_LEAVES_SERVER) {
|
if (isLeavesServer) {
|
||||||
return player.hasMetadata("NPC") || player.getAddress() == null;
|
return player.hasMetadata("NPC") || player.getAddress() == null;
|
||||||
} else {
|
} else {
|
||||||
return player.hasMetadata("NPC");
|
return player.hasMetadata("NPC");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user