mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-29 04:04:43 +02:00
More API work
This commit is contained in:
@ -1,4 +1,6 @@
|
||||
package com.gmail.nossr50.mcmmo.api.data;
|
||||
|
||||
public interface MMOEntity {
|
||||
public interface MMOEntity<N> {
|
||||
|
||||
N getNative();
|
||||
}
|
||||
|
@ -1,7 +1,5 @@
|
||||
package com.gmail.nossr50.mcmmo.api.data;
|
||||
|
||||
public interface MMOPlayer<N> extends MMOEntity {
|
||||
public interface MMOPlayer<N> extends MMOEntity<N> {
|
||||
|
||||
|
||||
N getPlayer();
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package com.gmail.nossr50.mcmmo.api.platform;
|
||||
|
||||
import com.gmail.nossr50.mcmmo.api.platform.scheduler.PlatformScheduler;
|
||||
import com.gmail.nossr50.mcmmo.api.platform.util.MetadataStore;
|
||||
import com.gmail.nossr50.mcmmo.api.platform.util.MobHealthBarManager;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.logging.Logger;
|
||||
@ -35,4 +36,6 @@ public interface PlatformProvider {
|
||||
PlatformScheduler getScheduler();
|
||||
|
||||
void checkMetrics();
|
||||
|
||||
MobHealthBarManager getHealthBarManager();
|
||||
}
|
||||
|
@ -0,0 +1,27 @@
|
||||
package com.gmail.nossr50.mcmmo.api.platform.util;
|
||||
|
||||
|
||||
import com.gmail.nossr50.mcmmo.api.data.MMOEntity;
|
||||
import com.gmail.nossr50.mcmmo.api.data.MMOPlayer;
|
||||
|
||||
@Deprecated // Not really deprecated, just /really/ needs a do-over...
|
||||
public interface MobHealthBarManager<PT, ET> {
|
||||
/**
|
||||
* Fix issues with death messages caused by the mob healthbars.
|
||||
*
|
||||
* @param deathMessage The original death message
|
||||
* @param player The player who died
|
||||
* @return the fixed death message
|
||||
*/
|
||||
public String fixDeathMessage(String deathMessage, MMOPlayer<PT> player);
|
||||
|
||||
/**
|
||||
* Handle the creation of mob healthbars.
|
||||
*
|
||||
* @param target the targetted entity
|
||||
* @param damage damage done by the attack triggering this
|
||||
*/
|
||||
public void handleMobHealthbars(MMOEntity<ET> target, double damage);
|
||||
|
||||
|
||||
}
|
Reference in New Issue
Block a user