mirror of
https://github.com/songoda/EpicBosses.git
synced 2024-11-07 02:29:36 +01:00
1.0.0-SNAPSHOT-U178
+ Connected MainAutoSpawnEditor to the rest of the panel + Updated TODO with more accurate time frame + Connected and set up auto spawn editing in BossPanelManager
This commit is contained in:
parent
78955cd09a
commit
ad42dd9e8d
4
TODO
4
TODO
@ -1,10 +1,10 @@
|
||||
02:00 -> Add the AutoSpawns Editing GUI (with a button for toggling the type of the autospawn, from wilderness, to spawner, to interval and a button for editing data)
|
||||
01:00 -> Add the AutoSpawns Editing GUI (with a button for toggling the type of the autospawn, from wilderness, to spawner, to interval and a button for editing data)
|
||||
01:00 -> Interval - Button to change coords, list of possible spawns, spawnIfChunkIsntLoaded, maxActiveBosses, bossesPerInterval, spawnRate, spawnType (Interval or Random), placeholder, message
|
||||
00:30 -> Add HolographicDisplay/PlaceholderAPI support for custom placeholders on AutoSpawnInterval times
|
||||
01:00 -> Add a new branch for the plugin and add support for Legacy version
|
||||
|
||||
-----------
|
||||
4:30 hrs
|
||||
3:30 hrs
|
||||
|
||||
|
||||
|
||||
|
@ -10,6 +10,7 @@ import com.songoda.epicbosses.entity.BossEntity;
|
||||
import com.songoda.epicbosses.entity.elements.EntityStatsElement;
|
||||
import com.songoda.epicbosses.entity.elements.EquipmentElement;
|
||||
import com.songoda.epicbosses.entity.elements.HandsElement;
|
||||
import com.songoda.epicbosses.panel.autospawns.MainAutoSpawnEditorPanel;
|
||||
import com.songoda.epicbosses.panel.bosses.*;
|
||||
import com.songoda.epicbosses.panel.bosses.commands.OnDeathCommandEditor;
|
||||
import com.songoda.epicbosses.panel.bosses.commands.OnSpawnCommandEditor;
|
||||
@ -128,7 +129,7 @@ public class BossPanelManager implements ILoadable, IReloadable {
|
||||
@Getter private DropTableNewRewardEditorPanel<DropTableElement> dropDropNewRewardEditPanel;
|
||||
@Getter private DropTableRewardsListEditorPanel<DropTableElement> dropDropRewardListPanel;
|
||||
|
||||
@Getter private IVariablePanelHandler<AutoSpawn> mainAutoSpawnEditPanel;
|
||||
@Getter private IVariablePanelHandler<AutoSpawn> mainAutoSpawnEditPanel, autoSpawnEntitiesEditPanel, autoSpawnSpecialSettingsEditorPanel, autoSpawnTypeEditorPanel;
|
||||
|
||||
private final CustomBosses customBosses;
|
||||
|
||||
@ -162,6 +163,7 @@ public class BossPanelManager implements ILoadable, IReloadable {
|
||||
|
||||
loadSkillEditMenus();
|
||||
loadDropTableEditMenus();
|
||||
loadAutoSpawnEditMenus();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -190,6 +192,7 @@ public class BossPanelManager implements ILoadable, IReloadable {
|
||||
|
||||
reloadSkillEditMenus();
|
||||
reloadDropTableEditMenus();
|
||||
reloadAutoSpawnEditMenus();
|
||||
}
|
||||
|
||||
public int isItemStackUsed(String name) {
|
||||
@ -233,6 +236,26 @@ public class BossPanelManager implements ILoadable, IReloadable {
|
||||
return new PanelBuilder(this.customBosses.getEditor().getConfigurationSection("ListPanel"), replaceMap);
|
||||
}
|
||||
|
||||
//---------------------------------------------
|
||||
//
|
||||
// A U T O S P A W N E D I T P A N E L S
|
||||
//
|
||||
//---------------------------------------------
|
||||
|
||||
private void loadAutoSpawnEditMenus() {
|
||||
FileConfiguration editor = this.customBosses.getEditor();
|
||||
PanelBuilder panelBuilder = new PanelBuilder(editor.getConfigurationSection("MainAutoSpawnEditMenu"));
|
||||
|
||||
this.mainAutoSpawnEditPanel = new MainAutoSpawnEditorPanel(this, panelBuilder, this.customBosses);
|
||||
}
|
||||
|
||||
private void reloadAutoSpawnEditMenus() {
|
||||
FileConfiguration editor = this.customBosses.getEditor();
|
||||
PanelBuilder panelBuilder = new PanelBuilder(editor.getConfigurationSection("MainAutoSpawnEditMenu"));
|
||||
|
||||
this.mainAutoSpawnEditPanel.initializePanel(panelBuilder);
|
||||
}
|
||||
|
||||
//---------------------------------------------
|
||||
//
|
||||
// D R O P T A B L E E D I T P A N E L S
|
||||
|
@ -20,7 +20,6 @@ import com.songoda.epicbosses.utils.panel.builder.PanelBuilderCounter;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
@ -63,9 +62,9 @@ public class MainAutoSpawnEditorPanel extends VariablePanelHandler<AutoSpawn> {
|
||||
PanelBuilderCounter counter = panel.getPanelBuilderCounter();
|
||||
|
||||
counter.getSlotsWith("Editing").forEach(slot -> panel.setOnClick(slot, getEditingAction(autoSpawn)));
|
||||
counter.getSlotsWith("SpecialSettings").forEach(slot -> {});
|
||||
counter.getSlotsWith("Type").forEach(slot -> {});
|
||||
counter.getSlotsWith("Entities").forEach(slot -> {});
|
||||
counter.getSlotsWith("SpecialSettings").forEach(slot -> panel.setOnClick(slot, event -> this.bossPanelManager.getAutoSpawnSpecialSettingsEditorPanel().openFor(player, autoSpawn)));
|
||||
counter.getSlotsWith("Type").forEach(slot -> panel.setOnClick(slot, event -> this.bossPanelManager.getAutoSpawnTypeEditorPanel().openFor(player, autoSpawn)));
|
||||
counter.getSlotsWith("Entities").forEach(slot -> panel.setOnClick(slot, event -> this.bossPanelManager.getAutoSpawnEntitiesEditPanel().openFor(player, autoSpawn)));
|
||||
counter.getSlotsWith("CustomSettings").forEach(slot -> {});
|
||||
|
||||
panel.openFor(player);
|
||||
|
Loading…
Reference in New Issue
Block a user