fix unable to attack mounts with no player on them

This commit is contained in:
2021-09-17 15:26:40 +02:00
parent 2669c538cd
commit 0eccf1b1af
3 changed files with 9 additions and 10 deletions
+5 -6
View File
@@ -6,7 +6,7 @@
<groupId>me.youhavetrouble</groupId>
<artifactId>PreventStabby</artifactId>
<version>1.3-pre3</version>
<version>1.3-pre4</version>
<packaging>jar</packaging>
<name>PreventStabby</name>
@@ -74,8 +74,8 @@
<url>https://oss.sonatype.org/content/groups/public/</url>
</repository>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
<id>bs-repo</id>
<url>https://ci.pluginwiki.us/plugin/repository/everything/</url>
</repository>
<repository>
<id>sk89q-repo</id>
@@ -102,10 +102,9 @@
<version>0.9.12</version>
</dependency>
<dependency>
<groupId>com.github.Thatsmusic99</groupId>
<groupId>com.github.thatsmusic99</groupId>
<artifactId>ConfigurationMaster</artifactId>
<version>v1.0-RC-2</version>
<scope>compile</scope>
<version>v1.0.3</version>
</dependency>
<dependency>
<groupId>org.bstats</groupId>
@@ -22,9 +22,9 @@ public final class PreventStabby extends JavaPlugin {
@Getter private static PreventStabby plugin;
private ConfigCache configCache;
protected PlayerManager playerManager;
protected DatabaseSQLite sqLite;
protected SmartCache smartCache;
private PlayerManager playerManager;
private DatabaseSQLite sqLite;
private SmartCache smartCache;
@Override
public void onEnable() {
@@ -52,7 +52,7 @@ public class Util {
playerPassengersWithPvpEnabled.add(player.getUniqueId());
}
if (playerPassengersWithPvpEnabled.isEmpty()) {
if (!mount.getPassengers().isEmpty() && playerPassengersWithPvpEnabled.isEmpty()) {
PluginMessages.sendActionBar(attacker, config.getCannot_attack_mounts_victim());
return true;
}