44 lines
1.2 KiB
Java
44 lines
1.2 KiB
Java
package me.loganb1max.minions.model.minions;
|
|
|
|
import me.loganb1max.minions.MinionsPlugin;
|
|
import me.loganb1max.minions.model.Minion;
|
|
import org.bukkit.Location;
|
|
import org.bukkit.block.Block;
|
|
import java.util.Set;
|
|
import java.util.UUID;
|
|
|
|
public class FisherMinion extends Minion {
|
|
|
|
public FisherMinion(final UUID owner, final String ownerName) {
|
|
super(
|
|
MinionsPlugin.getInstance().getConfig().getConfigurationSection("Fisher"),
|
|
owner,
|
|
ownerName
|
|
);
|
|
getReplacer().add("%radius%", String.valueOf(getRadius(getLevel()))).add("%chanceperblockpersecond%", String.valueOf(getChancePerBlockPerSecond(getLevel())));
|
|
}
|
|
|
|
public FisherMinion(final UUID owner, final String ownerName, final Location location, final double energy, final int level, final Set<Block> linkedBlocks) {
|
|
this(owner, ownerName);
|
|
setLocation(location);
|
|
setEnergy(energy);
|
|
setLevel(level);
|
|
setLinkedBlocks(linkedBlocks);
|
|
findStand();
|
|
}
|
|
|
|
public double getChancePerBlockPerSecond(final int level) {
|
|
return getSection().getDouble("Levels." + level + ".ChancePerBlockPerSecond", 0.0);
|
|
}
|
|
|
|
public int getRadius(final int level) {
|
|
return getSection().getInt("Levels." + level + ".Radius", 1);
|
|
}
|
|
|
|
@Override
|
|
public void tick() {
|
|
|
|
}
|
|
|
|
}
|