Start work on the booster api

This commit is contained in:
destro174 2021-09-08 20:21:43 +02:00
parent 2e47148476
commit b6cefd5403
3 changed files with 95 additions and 0 deletions

View File

@ -0,0 +1,36 @@
package com.alttd.boosters.api;
import java.util.UUID;
public interface Booster {
boolean active();
void setActive(Boolean active);
BoosterType getType();
void setType(BoosterType boosterType);
int getMultiplier();
void setMultiplier(int multiplier);
Long getStartingTime();
void setStartingTime(long startingTime);
Long getDuration();
void setDuration(long duration);
String getActivator();
void setActivator(String activationReason);
long getTimeRemaining();
UUID getUUID();
void stopBooster();
}

View File

@ -0,0 +1,6 @@
package com.alttd.boosters.api;
public class BoosterManager {
}

View File

@ -0,0 +1,53 @@
package com.alttd.boosters.api;
public enum BoosterType {
/**
* MCMMO - implies all mcmmo skills are boosted
*/
MCMMO("mcmmo"),
/**
* MYPET - Boosts MyPet exp gains
*/
MYPET("mypet"),
/**
* VANILLAXP - increases exp gained by killing mobs
*/
VANILLAXP("vanillaxp"),
/**
* LUCK - Boosts luck based vanilla features
* Caps at max vanilla enchant + 1
* Boosts:
* - Mining with Fortune
* - Adds 1 extra looting level to any mob kills
* - Boosts luck of the sea by 1
*/
LUCK("luck"),
/**
* PHANTOM - Disables phantom spawns while this booster is active
*/
PHANTOM("phantom"),
/**
* IDK
*/
UNKNOWN("unknown");
public String BoosterName;
BoosterType(String BoosterName) {
this.BoosterName = BoosterName;
}
public String getBoosterName() {
return this.BoosterName;
}
public static BoosterType getByName(String text) {
for (BoosterType type : BoosterType.values()) {
if (type.BoosterName.equalsIgnoreCase(text)) {
return type;
}
}
return UNKNOWN;
}
}