Start work on the booster api
This commit is contained in:
parent
2e47148476
commit
b6cefd5403
36
api/src/main/java/com/alttd/boosters/api/Booster.java
Normal file
36
api/src/main/java/com/alttd/boosters/api/Booster.java
Normal 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();
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
package com.alttd.boosters.api;
|
||||
|
||||
public class BoosterManager {
|
||||
|
||||
|
||||
}
|
||||
53
api/src/main/java/com/alttd/boosters/api/BoosterType.java
Normal file
53
api/src/main/java/com/alttd/boosters/api/BoosterType.java
Normal 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;
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user