mirror of
https://github.com/songoda/EpicBosses.git
synced 2024-12-24 08:57:42 +01:00
1.0.0-SNAPSHOT-U82
+ Fixed issues with skill chance menu
This commit is contained in:
parent
f220a769fe
commit
478183508f
@ -35,8 +35,12 @@ public class SkillMainEditorPanel extends VariablePanelHandler<BossEntity> {
|
|||||||
@Override
|
@Override
|
||||||
public void openFor(Player player, BossEntity bossEntity) {
|
public void openFor(Player player, BossEntity bossEntity) {
|
||||||
Map<String, String> replaceMap = new HashMap<>();
|
Map<String, String> replaceMap = new HashMap<>();
|
||||||
|
Double chance = bossEntity.getSkills().getOverallChance();
|
||||||
|
|
||||||
|
if(chance == null) chance = 0.0;
|
||||||
|
|
||||||
replaceMap.put("{name}", BossAPI.getBossEntityName(bossEntity));
|
replaceMap.put("{name}", BossAPI.getBossEntityName(bossEntity));
|
||||||
|
replaceMap.put("{chance}", NumberUtils.get().formatDouble(chance));
|
||||||
|
|
||||||
PanelBuilder panelBuilder = getPanelBuilder().cloneBuilder();
|
PanelBuilder panelBuilder = getPanelBuilder().cloneBuilder();
|
||||||
|
|
||||||
@ -92,6 +96,10 @@ public class SkillMainEditorPanel extends VariablePanelHandler<BossEntity> {
|
|||||||
newChance = 0.0;
|
newChance = 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(newChance > 100.0) {
|
||||||
|
newChance = 100.0;
|
||||||
|
}
|
||||||
|
|
||||||
bossEntity.getSkills().setOverallChance(newChance);
|
bossEntity.getSkills().setOverallChance(newChance);
|
||||||
Message.Boss_Skill_SetChance.msg(event.getWhoClicked(), modifyValue, NumberUtils.get().formatDouble(newChance));
|
Message.Boss_Skill_SetChance.msg(event.getWhoClicked(), modifyValue, NumberUtils.get().formatDouble(newChance));
|
||||||
openFor((Player) event.getWhoClicked(), bossEntity);
|
openFor((Player) event.getWhoClicked(), bossEntity);
|
||||||
|
2
pom.xml
2
pom.xml
@ -19,7 +19,7 @@
|
|||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<plugin.version>maven-version-number-SNAPSHOT-U81</plugin.version>
|
<plugin.version>maven-version-number-SNAPSHOT-U82</plugin.version>
|
||||||
<plugin.name>EpicBosses</plugin.name>
|
<plugin.name>EpicBosses</plugin.name>
|
||||||
<plugin.main>com.songoda.epicbosses.CustomBosses</plugin.main>
|
<plugin.main>com.songoda.epicbosses.CustomBosses</plugin.main>
|
||||||
<plugin.author>AMinecraftDev</plugin.author>
|
<plugin.author>AMinecraftDev</plugin.author>
|
||||||
|
Loading…
Reference in New Issue
Block a user