mirror of
https://github.com/songoda/EpicBosses.git
synced 2024-09-28 21:37:33 +02:00
1.0.0-SNAPSHOT-U203
+ Added in MasterMessage Panel + Fixed up a few things for release of the plugin
This commit is contained in:
parent
12f6eeef41
commit
e73e11308e
@ -46,7 +46,7 @@
|
|||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<finalName>${parent.artifactId}-${plugin.version}</finalName>
|
<finalName>${parent.artifactId}-${plugin.version} (1.13.x)</finalName>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
@ -82,24 +82,24 @@
|
|||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<!--<plugin>-->
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<!--<groupId>org.apache.maven.plugins</groupId>-->
|
||||||
<artifactId>maven-antrun-plugin</artifactId>
|
<!--<artifactId>maven-antrun-plugin</artifactId>-->
|
||||||
<version>1.8</version>
|
<!--<version>1.8</version>-->
|
||||||
<executions>
|
<!--<executions>-->
|
||||||
<execution>
|
<!--<execution>-->
|
||||||
<phase>install</phase>
|
<!--<phase>install</phase>-->
|
||||||
<configuration>
|
<!--<configuration>-->
|
||||||
<target>
|
<!--<target>-->
|
||||||
<copy file="target/${build.finalName}.jar" tofile="D:/Servers/1.13.2/plugins/${build.finalName}.jar"/>
|
<!--<copy file="target/${build.finalName}.jar" tofile="D:/Servers/1.13.2/plugins/${build.finalName}.jar"/>-->
|
||||||
</target>
|
<!--</target>-->
|
||||||
</configuration>
|
<!--</configuration>-->
|
||||||
<goals>
|
<!--<goals>-->
|
||||||
<goal>run</goal>
|
<!--<goal>run</goal>-->
|
||||||
</goals>
|
<!--</goals>-->
|
||||||
</execution>
|
<!--</execution>-->
|
||||||
</executions>
|
<!--</executions>-->
|
||||||
</plugin>
|
<!--</plugin>-->
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</project>
|
</project>
|
@ -66,9 +66,11 @@ public class BossShopPriceHandler implements IHandler {
|
|||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
|
|
||||||
if(NumberUtils.get().isDouble(input)) {
|
if(NumberUtils.get().isDouble(input)) {
|
||||||
getBossEntity().setPrice(NumberUtils.get().getDouble(input));
|
double amount = NumberUtils.get().getDouble(input);
|
||||||
|
getBossEntity().setPrice(amount);
|
||||||
getBossesFileManager().save();
|
getBossesFileManager().save();
|
||||||
setHandled(true);
|
setHandled(true);
|
||||||
|
Message.Boss_Edit_PriceSet.msg(getPlayer(), BossAPI.getBossEntityName(getBossEntity()), NumberUtils.get().formatDouble(amount));
|
||||||
|
|
||||||
finish();
|
finish();
|
||||||
} else {
|
} else {
|
||||||
|
@ -102,7 +102,7 @@ public class BossPanelManager implements ILoadable, IReloadable {
|
|||||||
@Getter private ISubVariablePanelHandler<BossEntity, EntityStatsElement> statisticMainEditMenu, entityTypeEditMenu;
|
@Getter private ISubVariablePanelHandler<BossEntity, EntityStatsElement> statisticMainEditMenu, entityTypeEditMenu;
|
||||||
@Getter private IVariablePanelHandler<BossEntity> mainBossEditMenu, dropsEditMenu, targetingEditMenu, skillsBossEditMenu, skillListBossEditMenu, commandsMainEditMenu, onSpawnCommandEditMenu,
|
@Getter private IVariablePanelHandler<BossEntity> mainBossEditMenu, dropsEditMenu, targetingEditMenu, skillsBossEditMenu, skillListBossEditMenu, commandsMainEditMenu, onSpawnCommandEditMenu,
|
||||||
onDeathCommandEditMenu, mainDropsEditMenu, mainTextEditMenu, mainTauntEditMenu, onSpawnTextEditMenu, onSpawnSubTextEditMenu, onDeathTextEditMenu, onDeathSubTextEditMenu, onDeathPositionTextEditMenu,
|
onDeathCommandEditMenu, mainDropsEditMenu, mainTextEditMenu, mainTauntEditMenu, onSpawnTextEditMenu, onSpawnSubTextEditMenu, onDeathTextEditMenu, onDeathSubTextEditMenu, onDeathPositionTextEditMenu,
|
||||||
onTauntTextEditMenu, spawnItemEditMenu, bossShopEditMenu;
|
onTauntTextEditMenu, spawnItemEditMenu, bossShopEditMenu, bossSkillMasterMessageTextEditMenu;
|
||||||
@Getter private BossListEditorPanel equipmentListEditMenu, weaponListEditMenu, statisticListEditMenu;
|
@Getter private BossListEditorPanel equipmentListEditMenu, weaponListEditMenu, statisticListEditMenu;
|
||||||
|
|
||||||
@Getter private IVariablePanelHandler<Skill> mainSkillEditMenu, customMessageEditMenu, skillTypeEditMenu, potionSkillEditorPanel, commandSkillEditorPanel, groupSkillEditorPanel, customSkillEditorPanel;
|
@Getter private IVariablePanelHandler<Skill> mainSkillEditMenu, customMessageEditMenu, skillTypeEditMenu, potionSkillEditorPanel, commandSkillEditorPanel, groupSkillEditorPanel, customSkillEditorPanel;
|
||||||
@ -461,6 +461,7 @@ public class BossPanelManager implements ILoadable, IReloadable {
|
|||||||
PanelBuilder panelBuilder3 = new PanelBuilder(editor.getConfigurationSection("TauntEditorPanel"));
|
PanelBuilder panelBuilder3 = new PanelBuilder(editor.getConfigurationSection("TauntEditorPanel"));
|
||||||
|
|
||||||
this.mainTextEditMenu = new TextMainEditorPanel(this, panelBuilder);
|
this.mainTextEditMenu = new TextMainEditorPanel(this, panelBuilder);
|
||||||
|
this.bossSkillMasterMessageTextEditMenu = new SkillMasterMessageTextEditorPanel(this, getListMenu("Boss.Text"), this.customBosses);
|
||||||
this.onSpawnSubTextEditMenu = new SpawnTextEditorPanel(this, panelBuilder1, this.customBosses);
|
this.onSpawnSubTextEditMenu = new SpawnTextEditorPanel(this, panelBuilder1, this.customBosses);
|
||||||
this.onDeathSubTextEditMenu = new DeathTextEditorPanel(this, panelBuilder2, this.customBosses);
|
this.onDeathSubTextEditMenu = new DeathTextEditorPanel(this, panelBuilder2, this.customBosses);
|
||||||
this.mainTauntEditMenu = new TauntTextEditorPanel(this, panelBuilder3, this.customBosses);
|
this.mainTauntEditMenu = new TauntTextEditorPanel(this, panelBuilder3, this.customBosses);
|
||||||
@ -566,6 +567,7 @@ public class BossPanelManager implements ILoadable, IReloadable {
|
|||||||
PanelBuilder panelBuilder3 = new PanelBuilder(editor.getConfigurationSection("TauntEditorPanel"));
|
PanelBuilder panelBuilder3 = new PanelBuilder(editor.getConfigurationSection("TauntEditorPanel"));
|
||||||
|
|
||||||
this.mainTextEditMenu.initializePanel(panelBuilder);
|
this.mainTextEditMenu.initializePanel(panelBuilder);
|
||||||
|
this.bossSkillMasterMessageTextEditMenu.initializePanel(getListMenu("Boss.Text"));
|
||||||
this.onSpawnSubTextEditMenu.initializePanel(panelBuilder1);
|
this.onSpawnSubTextEditMenu.initializePanel(panelBuilder1);
|
||||||
this.onDeathSubTextEditMenu.initializePanel(panelBuilder2);
|
this.onDeathSubTextEditMenu.initializePanel(panelBuilder2);
|
||||||
this.mainTauntEditMenu.initializePanel(panelBuilder3);
|
this.mainTauntEditMenu.initializePanel(panelBuilder3);
|
||||||
|
@ -94,6 +94,8 @@ public class MainBossEditPanel extends VariablePanelHandler<BossEntity> {
|
|||||||
if(bossEntity.isEditing()) {
|
if(bossEntity.isEditing()) {
|
||||||
this.bossEntityManager.killAllHolders(bossEntity);
|
this.bossEntityManager.killAllHolders(bossEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
openFor(player, bossEntity);
|
||||||
} else {
|
} else {
|
||||||
List<String> incompleteThings = bossEntity.getIncompleteSectionsToEnable();
|
List<String> incompleteThings = bossEntity.getIncompleteSectionsToEnable();
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ public class SkillMainEditorPanel extends VariablePanelHandler<BossEntity> {
|
|||||||
ServerUtils.get().runTaskAsync(() -> {
|
ServerUtils.get().runTaskAsync(() -> {
|
||||||
counter.getSlotsWith("OverallChance").forEach(slot -> panel.setOnClick(slot, getOverallChanceAction(bossEntity)));
|
counter.getSlotsWith("OverallChance").forEach(slot -> panel.setOnClick(slot, getOverallChanceAction(bossEntity)));
|
||||||
counter.getSlotsWith("SkillList").forEach(slot -> panel.setOnClick(slot, event -> this.bossPanelManager.getSkillListBossEditMenu().openFor((Player) event.getWhoClicked(), bossEntity)));
|
counter.getSlotsWith("SkillList").forEach(slot -> panel.setOnClick(slot, event -> this.bossPanelManager.getSkillListBossEditMenu().openFor((Player) event.getWhoClicked(), bossEntity)));
|
||||||
counter.getSlotsWith("Message").forEach(slot -> panel.setOnClick(slot, getMessageAction()));
|
counter.getSlotsWith("Message").forEach(slot -> panel.setOnClick(slot, event -> this.bossPanelManager.getBossSkillMasterMessageTextEditMenu().openFor((Player) event.getWhoClicked(), bossEntity)));
|
||||||
});
|
});
|
||||||
|
|
||||||
panel.openFor(player);
|
panel.openFor(player);
|
||||||
@ -113,9 +113,4 @@ public class SkillMainEditorPanel extends VariablePanelHandler<BossEntity> {
|
|||||||
openFor((Player) event.getWhoClicked(), bossEntity);
|
openFor((Player) event.getWhoClicked(), bossEntity);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO
|
|
||||||
private ClickAction getMessageAction() {
|
|
||||||
return event -> {};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,41 @@
|
|||||||
|
package com.songoda.epicbosses.panel.bosses.text;
|
||||||
|
|
||||||
|
import com.songoda.epicbosses.CustomBosses;
|
||||||
|
import com.songoda.epicbosses.api.BossAPI;
|
||||||
|
import com.songoda.epicbosses.entity.BossEntity;
|
||||||
|
import com.songoda.epicbosses.managers.BossPanelManager;
|
||||||
|
import com.songoda.epicbosses.panel.handlers.SingleMessageListEditor;
|
||||||
|
import com.songoda.epicbosses.utils.panel.base.IVariablePanelHandler;
|
||||||
|
import com.songoda.epicbosses.utils.panel.builder.PanelBuilder;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Charles Cullen
|
||||||
|
* @version 1.0.0
|
||||||
|
* @since 20-Jan-19
|
||||||
|
*/
|
||||||
|
public class SkillMasterMessageTextEditorPanel extends SingleMessageListEditor<BossEntity> {
|
||||||
|
|
||||||
|
public SkillMasterMessageTextEditorPanel(BossPanelManager bossPanelManager, PanelBuilder panelBuilder, CustomBosses plugin) {
|
||||||
|
super(bossPanelManager, panelBuilder, plugin);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getCurrent(BossEntity object) {
|
||||||
|
return object.getSkills().getMasterMessage();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateMessage(BossEntity object, String newPath) {
|
||||||
|
object.getSkills().setMasterMessage(newPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IVariablePanelHandler<BossEntity> getParentHolder() {
|
||||||
|
return this.bossPanelManager.getSkillsBossEditMenu();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getName(BossEntity object) {
|
||||||
|
return BossAPI.getBossEntityName(object);
|
||||||
|
}
|
||||||
|
}
|
@ -67,6 +67,7 @@ public enum Message {
|
|||||||
Boss_Edit_NotCompleteEnough("&c&l(!) &cThe boss is not set up enough to be enabled. Please make sure it has the following things: &f{0}&c Once these things are set try toggling again."),
|
Boss_Edit_NotCompleteEnough("&c&l(!) &cThe boss is not set up enough to be enabled. Please make sure it has the following things: &f{0}&c Once these things are set try toggling again."),
|
||||||
Boss_Edit_DoesntExist("&c&l(!) &cThe specified boss does not exist. Please try again with the proper name. If you cannot figure it out please check the bosses.json file to find the one you're looking for."),
|
Boss_Edit_DoesntExist("&c&l(!) &cThe specified boss does not exist. Please try again with the proper name. If you cannot figure it out please check the bosses.json file to find the one you're looking for."),
|
||||||
Boss_Edit_Price("&b&lEpicBosses &8» &7Please input the new price of the &f{0}&7 Boss Entity. Please do not add commas and only use numbers. To cancel this input in to chat &f- &7."),
|
Boss_Edit_Price("&b&lEpicBosses &8» &7Please input the new price of the &f{0}&7 Boss Entity. Please do not add commas and only use numbers. To cancel this input in to chat &f- &7."),
|
||||||
|
Boss_Edit_PriceSet("&b&lEpicBosses &8» &7You have set the price of &f{0}&7 to &a$&f{1}&7."),
|
||||||
|
|
||||||
Boss_GiveEgg_NoPermission("&c&l(!) &cYou do not have access to this command."),
|
Boss_GiveEgg_NoPermission("&c&l(!) &cYou do not have access to this command."),
|
||||||
Boss_GiveEgg_InvalidArgs("&c&l(!) &cYou must use &n/boss giveegg [name] [player] (amount)&c to give an egg."),
|
Boss_GiveEgg_InvalidArgs("&c&l(!) &cYou must use &n/boss giveegg [name] [player] (amount)&c to give an egg."),
|
||||||
|
2
pom.xml
2
pom.xml
@ -19,7 +19,7 @@
|
|||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<plugin.version>1.0.0-U202</plugin.version>
|
<plugin.version>1.0.0-U203</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