1.0.0-SNAPSHOT-U117

+ Added new command section for skills button
+ Started implementing boss new command/message arguments
This commit is contained in:
Charles 2018-12-10 22:44:31 +08:00
parent 7333c17a28
commit 033238bcf6
5 changed files with 55 additions and 14 deletions

View File

@ -39,6 +39,9 @@ public class BossHelpCmd extends SubCommand {
case 3:
Message.Boss_Help_Page3.msg(sender);
break;
case 4:
Message.Boss_Help_Page4.msg(sender);
break;
}
return;

View File

@ -39,6 +39,15 @@ public class BossNewCmd extends SubCommand {
return;
}
if(args.length >= 4 && args[1].equalsIgnoreCase("command")) {
return;
}
if(args.length >= 4 && args[1].equalsIgnoreCase("message")) {
}
if(args.length == 4 && args[1].equalsIgnoreCase("droptable")) {
String nameInput = args[2];
String typeInput = args[3];

View File

@ -1,5 +1,6 @@
package com.songoda.epicbosses.panel.skills.custom;
import com.google.gson.JsonObject;
import com.songoda.epicbosses.CustomBosses;
import com.songoda.epicbosses.api.BossAPI;
import com.songoda.epicbosses.managers.BossPanelManager;
@ -18,10 +19,7 @@ import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
/**
* @author Charles Cullen
@ -79,7 +77,20 @@ public class CommandSkillEditorPanel extends VariablePanelHandler<Skill> {
private ClickAction getAddNewAction(Skill skill) {
return event -> {
SubCommandSkillElement subCommandSkillElement = new SubCommandSkillElement(UUID.randomUUID().toString(), 100.0, new ArrayList<>());
CommandSkillElement commandSkillElement = this.plugin.getBossSkillManager().getCommandSkillElement(skill);
List<SubCommandSkillElement> subElements = commandSkillElement.getCommands();
subElements.add(subCommandSkillElement);
commandSkillElement.setCommands(subElements);
JsonObject jsonObject = BossAPI.convertObjectToJsonObject(commandSkillElement);
skill.setCustomData(jsonObject);
this.plugin.getSkillsFileManager().save();
openFor((Player) event.getWhoClicked(), skill);
};
}

View File

@ -52,35 +52,51 @@ public enum Message {
Boss_Help_NoPermission("&c&l(!) &cYou do not have access to this command."),
Boss_Help_Page1(
"&8&m----*--------&3&l[ &b&lBoss Help &7(Page 1/3) &3&l]&8&m--------*----\n" +
"&8&m----*--------&3&l[ &b&lBoss Help &7(Page 1/4) &3&l]&8&m--------*----\n" +
"&b/boss help (page) &8» &7Displays boss commands.\n" +
"&b/boss create [name] [entity] &8» &7Start the creation of a boss.\n" +
"&b/boss edit (name) &8» &7Edit the specified boss.\n" +
"&b/boss info [name] &8» &7Shows information on the specified boss.\n" +
"&b/boss nearby (radius) &8» &7Shows the nearby bosses.\n" +
"&b/boss reload &8» &7Reloads the boss plugin.\n" +
"&b/boss killall (world) &8» &7Kills all bosses/minions." +
"&b/boss killall (world) &8» &7Kills all bosses/minions.\n" +
"&7\n" +
"&7Use /boss help 2 to view the next page.\n" +
"&8&m----*-----------------------------------*----"),
Boss_Help_Page2(
"&8&m----*--------&3&l[ &b&lBoss Help &7(Page 2/3) &3&l]&8&m--------*----\n" +
"&b/boss spawn [name] (location) &8» &7Spawns a boss at your location or the specified location.\n" +
" &7&o(Separate location with commas, an example is: world,0,100,0)\n" +
"&8&m----*--------&3&l[ &b&lBoss Help &7(Page 2/4) &3&l]&8&m--------*----\n" +
"&b/boss spawn [name] (location) &8» &7Spawns a boss at your" +
" location or the specified location.\n" +
"&7&o(Separate location with commas, an example is: world,0,100,0)\n" +
"&b/boss time (section) &8» &7Shows the time left till next auto spawn.\n" +
"&b/boss droptable &8» &7Shows all current drop tables.\n" +
"&b/boss items &8» &7Shows all current custom items.\n" +
"&b/boss skills &8» &7Shows all current set skills.\n" +
"&7\n" +
"&7Use /boss help 3 to view the next page.\n" +
"&8&m----*-----------------------------------*----"),
Boss_Help_Page3(
"&8&m----*--------&3&l[ &b&lBoss Help &7(Page 3/3) &3&l]&8&m--------*----\n" +
"&8&m----*--------&3&l[ &b&lBoss Help &7(Page 3/4) &3&l]&8&m--------*----\n" +
"&b/boss debug &8» &7Used to toggle the debug aspect of the plugin.\n" +
"&b/boss giveegg [name] [player] (amount) &8» &7Used to be given a spawn item of the boss.\n" +
"&b/boss giveegg [name] [player] (amount) &8» &7Used to be given a " +
"spawn item of the boss.\n" +
"&b/boss list &8» &7Shows all the list of current boss entities.\n" +
"&b/boss new [droptable/skill] [name] [type] &8» &7Used to create new drop tables and skills.\n" +
"&b\n" +
"&b/boss new skill [name] [type] [mode] &8» &7Used to create a new skill section.\n" +
"&b/boss new droptable [name] [type] &8» &7Used to create a new drop table.\n" +
"&7\n" +
"&7Use /boss help 4 to view the next page.\n" +
"&8&m----*-----------------------------------*----"),
Boss_Help_Page4(
"&8&m----*--------&3&l[ &b&lBoss Help &7(Page 4/4) &3&l]&8&m--------*----\n" +
"&b/boss new command [name] [commands] &8» &7Used to create a new command section.\n" +
"&7&o(To add a new line use &7||&7&o in-between the messages.)\n" +
"&b/boss new message [name] [messages] &8» &7Used to create a new message section.\n" +
"&7&o(To add a new line use &7||&7&o in-between the messages.)\n" +
"&7\n" +
"&7\n" +
"&7\n" +
"&7\n" +
"&7Use /boss help [page] to view the next page.\n" +
"&8&m----*-----------------------------------*----"),
Boss_Info_NoPermission("&c&l(!) &cYou do not have access to this command."),
@ -122,6 +138,8 @@ public enum Message {
Boss_New_NoPermission("&c&l(!) &cYou do not have access to this command."),
Boss_New_InvalidArgs("&c&l(!) &cInvalid arguments! You must use &n/boss new droptable [name] (type)&c or &n/boss new skill [name]&c!"),
Boss_New_CreateArgumentsDropTable("&b&lEpicBosses &8» &7Create a new droptable with the command &f/boss new droptable [name] [type]&7."),
Boss_New_CreateArgumentsMessage("&b&lEpicBosses &8» &7Create a new message with the command &f/boss new message [name] [message(s)]. \n&7&oUse &f|| &7&oto reference a new line."),
Boss_New_CreateArgumentsCommand("&b&lEpicBosses &8» &7Create a new command with the command &f/boss new command [name] [command(s)]. \n&7&oUse &f|| &7&oto reference a new line."),
Boss_New_DropTableAlreadyExists("&c&l(!) &cThe specified DropTable name already exists. Please try another name."),
Boss_New_InvalidDropTableType("&c&l(!) &cThe specified DropTable type is invalid. Please use &fGive, Drop, Spray&c."),
Boss_New_DropTable("&b&lEpicBosses &8» &7You have created a new drop table with the name &f{0}&7 and type &f{1}&7."),

View File

@ -20,7 +20,7 @@
<properties>
<!--<plugin.version>maven-version-number-SNAPSHOT-U90</plugin.version>-->
<plugin.version>1.0.0-U116</plugin.version>
<plugin.version>1.0.0-U117</plugin.version>
<plugin.name>EpicBosses</plugin.name>
<plugin.main>com.songoda.epicbosses.CustomBosses</plugin.main>
<plugin.author>AMinecraftDev</plugin.author>