9
0
mirror of https://github.com/Auxilor/EcoMobs.git synced 2025-12-20 15:39:31 +00:00

Fixed %player% bug

This commit is contained in:
Auxilor
2021-07-09 22:37:28 +02:00
parent d5dced49b3
commit a335b5b52e
4 changed files with 11 additions and 12 deletions

View File

@@ -46,7 +46,7 @@ allprojects {
}
dependencies {
compileOnly 'com.willfp:eco:5.2.0'
compileOnly 'com.willfp:eco:5.7.1'
compileOnly 'org.jetbrains:annotations:19.0.0'

View File

@@ -3,6 +3,7 @@ package com.willfp.ecobosses;
import com.willfp.eco.core.AbstractPacketAdapter;
import com.willfp.eco.core.EcoPlugin;
import com.willfp.eco.core.command.AbstractCommand;
import com.willfp.eco.core.command.impl.PluginCommand;
import com.willfp.eco.core.integrations.IntegrationLoader;
import com.willfp.ecobosses.bosses.EcoBosses;
import com.willfp.ecobosses.bosses.listeners.AttackListeners;
@@ -35,7 +36,7 @@ public class EcoBossesPlugin extends EcoPlugin {
* Internal constructor called by bukkit on plugin load.
*/
public EcoBossesPlugin() {
super("EcoBosses", 86576, 10635, "com.willfp.ecobosses.proxy", "&9");
super(86576, 10635, "com.willfp.ecobosses.proxy", "&9");
instance = this;
}
@@ -98,13 +99,8 @@ public class EcoBossesPlugin extends EcoPlugin {
return new ArrayList<>();
}
/**
* EcoEnchants-specific commands.
*
* @return A list of all commands.
*/
@Override
public List<AbstractCommand> getCommands() {
public List<PluginCommand> getPluginCommands() {
return Arrays.asList(
new CommandEbreload(this),
new CommandEbdrop(this),
@@ -145,4 +141,9 @@ public class EcoBossesPlugin extends EcoPlugin {
TabCompleterEbspawn.class
);
}
@Override
protected String getMinimumEcoVersion() {
return "5.7.1";
}
}

View File

@@ -372,7 +372,7 @@ public class EcoBoss extends PluginDependent {
this.topDamagerCommands = new HashMap<>();
for (int i = 1; i <= 3; i++) {
this.topDamagerCommands.put(i, new ArrayList<>());
for (String string : this.getConfig().getStrings("rewards.top-damager-commands." + i)) {
for (String string : this.getConfig().getStrings("rewards.top-damager-commands." + i, false)) {
double chance = 100;
if (string.contains("::")) {
String[] split = string.split("::");
@@ -388,7 +388,7 @@ public class EcoBoss extends PluginDependent {
// Nearby Rewards
this.nearbyRadius = this.getConfig().getDouble("rewards.nearby-player-commands.radius");
this.nearbyPlayersCommands = new HashMap<>();
for (String string : this.getConfig().getStrings("rewards.nearby-player-commands.commands")) {
for (String string : this.getConfig().getStrings("rewards.nearby-player-commands.commands", false)) {
double chance = 100;
if (string.contains("::")) {
String[] split = string.split("::");

View File

@@ -1,7 +1,5 @@
package com.willfp.ecobosses.bosses.util.obj;
import lombok.Data;
public record ImmunityOptions(boolean immuneToFire,
boolean immuneToSuffocation,
boolean immuneToDrowning,