GH Mount fixes
This commit is contained in:
parent
e412c2cc05
commit
930f90fdf3
@ -15,7 +15,7 @@ public class GemHuntersMountGadget extends GameModifierGadget
|
||||
{
|
||||
super(manager, category, type.getName() + " Mount", new String[] {
|
||||
C.cGray + "Changed your active Mount",
|
||||
C.cGray + "in " + F.greenElem("Gem Hunters") + "to " + type.getName() + ".",
|
||||
C.cGray + "in " + F.greenElem("Gem Hunters") + " to " + type.getName() + ".",
|
||||
}, -7, type.getMaterial(), type.getMaterialData());
|
||||
|
||||
_type = type;
|
||||
|
@ -6,6 +6,7 @@ import org.bukkit.entity.Horse;
|
||||
import org.bukkit.entity.Horse.Variant;
|
||||
|
||||
import mineplex.core.disguise.DisguiseManager;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.core.utils.UtilVariant;
|
||||
|
||||
public enum GemHuntersMountType
|
||||
@ -18,6 +19,7 @@ public enum GemHuntersMountType
|
||||
{
|
||||
return UtilVariant.spawnHorse(location, Variant.DONKEY);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
private final String _name;
|
||||
@ -38,6 +40,10 @@ public enum GemHuntersMountType
|
||||
|
||||
public abstract Horse spawn(Location location, DisguiseManager manager);
|
||||
|
||||
public void onUpdate(UpdateEvent event, Horse horse)
|
||||
{
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return _name;
|
||||
|
@ -30,6 +30,7 @@ import mineplex.core.common.Rank;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.disguise.DisguiseManager;
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
import mineplex.core.gadget.gadgets.gamemodifiers.GameCosmeticManager;
|
||||
@ -321,4 +322,26 @@ public class MountModule extends MiniClientPlugin<MountData>
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void updateSkins(UpdateEvent event)
|
||||
{
|
||||
for (Player player : UtilServer.getPlayersCollection())
|
||||
{
|
||||
MountData data = Get(player);
|
||||
|
||||
if (data.getEntity() == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
GemHuntersMountGadget gadget = (GemHuntersMountGadget) _gadget.getGameCosmeticManager().getActiveCosmetic(
|
||||
player,
|
||||
GameDisplay.GemHunters,
|
||||
"Mount Skins"
|
||||
);
|
||||
|
||||
gadget.getType().onUpdate(event, data.getEntity());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user