mirror of
https://github.com/PikaMug/Quests.git
synced 2025-01-24 01:02:00 +01:00
New ride an entity condition, use as default. Fixes #1419
This commit is contained in:
parent
2fce15827e
commit
f595f67f01
@ -598,22 +598,28 @@ public class Quester {
|
||||
final Condition c = stage.getCondition();
|
||||
if (c != null) {
|
||||
p.sendMessage(ChatColor.LIGHT_PURPLE + Lang.get("stageEditorConditions") + ":");
|
||||
if (!c.getItemsWhileHoldingMainHand().isEmpty()) {
|
||||
if (!c.getEntitiesWhileRiding().isEmpty()) {
|
||||
String msg = "- " + Lang.get("conditionEditorRideEntity");
|
||||
for (final String e : c.getEntitiesWhileRiding()) {
|
||||
msg += ChatColor.AQUA + "\n \u2515 " + e;
|
||||
}
|
||||
p.sendMessage(ChatColor.YELLOW + msg);
|
||||
} else if (!c.getItemsWhileHoldingMainHand().isEmpty()) {
|
||||
String msg = "- " + Lang.get("conditionEditorItemsInMainHand");
|
||||
for (final ItemStack is : c.getItemsWhileHoldingMainHand()) {
|
||||
msg += ChatColor.AQUA + "\n - " + ItemUtil.getPrettyItemName(is.getType().name());
|
||||
msg += ChatColor.AQUA + "\n \u2515 " + ItemUtil.getPrettyItemName(is.getType().name());
|
||||
}
|
||||
p.sendMessage(ChatColor.YELLOW + msg);
|
||||
} else if (!c.getWorldsWhileStayingWithin().isEmpty()) {
|
||||
String msg = "- " + Lang.get("conditionEditorStayWithinWorld");
|
||||
for (final String w : c.getWorldsWhileStayingWithin()) {
|
||||
msg += ChatColor.AQUA + "\n - " + w;
|
||||
msg += ChatColor.AQUA + "\n \u2515 " + w;
|
||||
}
|
||||
p.sendMessage(ChatColor.YELLOW + msg);
|
||||
} else if (!c.getBiomesWhileStayingWithin().isEmpty()) {
|
||||
String msg = "- " + Lang.get("conditionEditorStayWithinBiome");
|
||||
for (final String b : c.getBiomesWhileStayingWithin()) {
|
||||
msg += ChatColor.AQUA + "\n - " + MiscUtil.snakeCaseToUpperCamelCase(b);
|
||||
msg += ChatColor.AQUA + "\n \u2515 " + MiscUtil.snakeCaseToUpperCamelCase(b);
|
||||
}
|
||||
p.sendMessage(ChatColor.YELLOW + msg);
|
||||
}
|
||||
|
@ -3362,6 +3362,22 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener
|
||||
throw new ConditionFormatException("fail-quest is not a true/false value", conditionKey);
|
||||
}
|
||||
}
|
||||
if (data.contains(conditionKey + "ride-entity")) {
|
||||
if (ConfigUtil.checkList(data.getList(conditionKey + "ride-entity"), String.class)) {
|
||||
final LinkedList<String> entities = new LinkedList<String>();
|
||||
for (final String s : data.getStringList(conditionKey + "ride-entity")) {
|
||||
final EntityType e = MiscUtil.getProperMobType(s);
|
||||
if (e == null) {
|
||||
throw new ConditionFormatException("ride-entity is not a valid entity type",
|
||||
conditionKey);
|
||||
}
|
||||
entities.add(s);
|
||||
}
|
||||
condition.setEntitiesWhileRiding(entities);
|
||||
} else {
|
||||
throw new ConditionFormatException("ride-entity is not a list of entity types", conditionKey);
|
||||
}
|
||||
}
|
||||
if (data.contains(conditionKey + "hold-main-hand")) {
|
||||
final LinkedList<ItemStack> temp = new LinkedList<ItemStack>();
|
||||
@SuppressWarnings("unchecked")
|
||||
|
@ -29,6 +29,7 @@ public class Condition {
|
||||
private final Quests plugin;
|
||||
private String name = "";
|
||||
private boolean failQuest = false;
|
||||
private LinkedList<String> entitiesWhileRiding = new LinkedList<String>();
|
||||
private LinkedList<ItemStack> itemsWhileHoldingMainHand = new LinkedList<ItemStack>();
|
||||
private LinkedList<String> worldsWhileStayingWithin = new LinkedList<String>();
|
||||
private LinkedList<String> biomesWhileStayingWithin = new LinkedList<String>();
|
||||
@ -52,6 +53,14 @@ public class Condition {
|
||||
public void setFailQuest(final boolean failQuest) {
|
||||
this.failQuest = failQuest;
|
||||
}
|
||||
|
||||
public LinkedList<String> getEntitiesWhileRiding() {
|
||||
return entitiesWhileRiding;
|
||||
}
|
||||
|
||||
public void setEntitiesWhileRiding(final LinkedList<String> entitiesWhileRiding) {
|
||||
this.entitiesWhileRiding = entitiesWhileRiding;
|
||||
}
|
||||
|
||||
public LinkedList<ItemStack> getItemsWhileHoldingMainHand() {
|
||||
return itemsWhileHoldingMainHand;
|
||||
@ -80,29 +89,37 @@ public class Condition {
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean check(final Quester quester, final Quest quest) {
|
||||
final Player player = quester.getPlayer();
|
||||
if (itemsWhileHoldingMainHand.isEmpty() == false) {
|
||||
if (!entitiesWhileRiding.isEmpty()) {
|
||||
for (final String e : entitiesWhileRiding) {
|
||||
if (player.isInsideVehicle() && player.getVehicle().getType().equals(MiscUtil.getProperMobType(e))) {
|
||||
return true;
|
||||
} else if (plugin.getSettings().getConsoleLogging() > 2) {
|
||||
plugin.getLogger().info("DEBUG: Condition entity does not match for= " + e);
|
||||
}
|
||||
}
|
||||
} else if (!itemsWhileHoldingMainHand.isEmpty()) {
|
||||
for (final ItemStack is : itemsWhileHoldingMainHand) {
|
||||
if (ItemUtil.compareItems(player.getItemInHand(), is, true, true) == 0) {
|
||||
return true;
|
||||
} else {
|
||||
} else if (plugin.getSettings().getConsoleLogging() > 2) {
|
||||
plugin.getLogger().info("DEBUG: Condition item does not match with code= "
|
||||
+ ItemUtil.compareItems(player.getItemInHand(), is, true, true));
|
||||
}
|
||||
}
|
||||
} else if (worldsWhileStayingWithin.isEmpty() == false) {
|
||||
} else if (!worldsWhileStayingWithin.isEmpty()) {
|
||||
for (final String w : worldsWhileStayingWithin) {
|
||||
if (player.getWorld().getName().equalsIgnoreCase(w)) {
|
||||
return true;
|
||||
} else {
|
||||
} else if (plugin.getSettings().getConsoleLogging() > 2) {
|
||||
plugin.getLogger().info("DEBUG: Condition world does not match for= " + w);
|
||||
}
|
||||
}
|
||||
} else if (biomesWhileStayingWithin.isEmpty() == false) {
|
||||
} else if (!biomesWhileStayingWithin.isEmpty()) {
|
||||
for (final String b : biomesWhileStayingWithin) {
|
||||
if (player.getWorld().getBiome(player.getLocation().getBlockX(), player.getLocation().getBlockZ())
|
||||
.name().equalsIgnoreCase(MiscUtil.getProperBiome(b).name())) {
|
||||
return true;
|
||||
} else {
|
||||
} else if (plugin.getSettings().getConsoleLogging() > 2) {
|
||||
plugin.getLogger().info("DEBUG: Condition biome does not match for= " + MiscUtil.getProperBiome(b));
|
||||
}
|
||||
}
|
||||
|
@ -79,6 +79,12 @@ public class ConditionFactory implements ConversationAbandonedListener {
|
||||
} else {
|
||||
context.setSessionData(CK.C_FAIL_QUEST, Lang.get("noWord"));
|
||||
}
|
||||
if (condition.getEntitiesWhileRiding() != null
|
||||
&& condition.getEntitiesWhileRiding().isEmpty() == false) {
|
||||
final LinkedList<String> entities = new LinkedList<String>();
|
||||
entities.addAll(condition.getEntitiesWhileRiding());
|
||||
context.setSessionData(CK.C_WHILE_RIDING_ENTITY, entities);
|
||||
}
|
||||
if (condition.getItemsWhileHoldingMainHand() != null
|
||||
&& condition.getItemsWhileHoldingMainHand().isEmpty() == false) {
|
||||
final LinkedList<ItemStack> items = new LinkedList<ItemStack>();
|
||||
@ -103,6 +109,7 @@ public class ConditionFactory implements ConversationAbandonedListener {
|
||||
context.setSessionData(CK.C_OLD_CONDITION, null);
|
||||
context.setSessionData(CK.C_NAME, null);
|
||||
context.setSessionData(CK.C_FAIL_QUEST, null);
|
||||
context.setSessionData(CK.C_WHILE_RIDING_ENTITY, null);
|
||||
context.setSessionData(CK.C_WHILE_HOLDING_MAIN_HAND, null);
|
||||
context.setSessionData(CK.C_WHILE_WITHIN_WORLD, null);
|
||||
context.setSessionData(CK.C_WHILE_WITHIN_BIOME, null);
|
||||
@ -186,6 +193,10 @@ public class ConditionFactory implements ConversationAbandonedListener {
|
||||
section.set("fail-quest", true);
|
||||
}
|
||||
}
|
||||
if (context.getSessionData(CK.C_WHILE_RIDING_ENTITY) != null) {
|
||||
section.set("ride-entity",
|
||||
context.getSessionData(CK.C_WHILE_RIDING_ENTITY));
|
||||
}
|
||||
if (context.getSessionData(CK.C_WHILE_HOLDING_MAIN_HAND) != null) {
|
||||
section.set("hold-main-hand",
|
||||
context.getSessionData(CK.C_WHILE_HOLDING_MAIN_HAND));
|
||||
|
@ -25,6 +25,7 @@ import me.blackvein.quests.Stage;
|
||||
import me.blackvein.quests.conditions.Condition;
|
||||
import me.blackvein.quests.convo.conditions.ConditionsEditorNumericPrompt;
|
||||
import me.blackvein.quests.convo.conditions.ConditionsEditorStringPrompt;
|
||||
import me.blackvein.quests.convo.conditions.tasks.EntityPrompt;
|
||||
import me.blackvein.quests.convo.conditions.tasks.PlayerPrompt;
|
||||
import me.blackvein.quests.convo.conditions.tasks.WorldPrompt;
|
||||
import me.blackvein.quests.events.editor.conditions.ConditionsEditorPostOpenNumericPromptEvent;
|
||||
@ -60,10 +61,11 @@ public class ConditionMainPrompt extends ConditionsEditorNumericPrompt {
|
||||
case 2:
|
||||
case 3:
|
||||
case 4:
|
||||
return ChatColor.BLUE;
|
||||
case 5:
|
||||
return ChatColor.GREEN;
|
||||
return ChatColor.BLUE;
|
||||
case 6:
|
||||
return ChatColor.GREEN;
|
||||
case 7:
|
||||
return ChatColor.RED;
|
||||
default:
|
||||
return null;
|
||||
@ -76,14 +78,16 @@ public class ConditionMainPrompt extends ConditionsEditorNumericPrompt {
|
||||
case 1:
|
||||
return ChatColor.YELLOW + Lang.get("conditionEditorSetName");
|
||||
case 2:
|
||||
return ChatColor.GOLD + Lang.get("eventEditorPlayer");
|
||||
return ChatColor.GOLD + Lang.get("conditionEditorEntity");
|
||||
case 3:
|
||||
return ChatColor.GOLD + Lang.get("conditionEditorWorld");
|
||||
return ChatColor.GOLD + Lang.get("eventEditorPlayer");
|
||||
case 4:
|
||||
return ChatColor.YELLOW + Lang.get("conditionEditorFailQuest") + ":";
|
||||
return ChatColor.GOLD + Lang.get("conditionEditorWorld");
|
||||
case 5:
|
||||
return ChatColor.GREEN + Lang.get("save");
|
||||
return ChatColor.YELLOW + Lang.get("conditionEditorFailQuest") + ":";
|
||||
case 6:
|
||||
return ChatColor.GREEN + Lang.get("save");
|
||||
case 7:
|
||||
return ChatColor.RED + Lang.get("exit");
|
||||
default:
|
||||
return null;
|
||||
@ -96,14 +100,15 @@ public class ConditionMainPrompt extends ConditionsEditorNumericPrompt {
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
return "";
|
||||
case 4:
|
||||
return "";
|
||||
case 5:
|
||||
if (context.getSessionData(CK.C_FAIL_QUEST) == null) {
|
||||
context.setSessionData(CK.C_FAIL_QUEST, Lang.get("noWord"));
|
||||
}
|
||||
return "" + ChatColor.AQUA + context.getSessionData(CK.C_FAIL_QUEST);
|
||||
case 5:
|
||||
case 6:
|
||||
case 7:
|
||||
return "";
|
||||
default:
|
||||
return null;
|
||||
@ -130,10 +135,12 @@ public class ConditionMainPrompt extends ConditionsEditorNumericPrompt {
|
||||
case 1:
|
||||
return new ConditionNamePrompt(context);
|
||||
case 2:
|
||||
return new PlayerPrompt(context);
|
||||
return new EntityPrompt(context);
|
||||
case 3:
|
||||
return new WorldPrompt(context);
|
||||
return new PlayerPrompt(context);
|
||||
case 4:
|
||||
return new WorldPrompt(context);
|
||||
case 5:
|
||||
final String s = (String) context.getSessionData(CK.C_FAIL_QUEST);
|
||||
if (s.equalsIgnoreCase(Lang.get("yesWord"))) {
|
||||
context.setSessionData(CK.C_FAIL_QUEST, Lang.get("noWord"));
|
||||
@ -141,13 +148,13 @@ public class ConditionMainPrompt extends ConditionsEditorNumericPrompt {
|
||||
context.setSessionData(CK.C_FAIL_QUEST, Lang.get("yesWord"));
|
||||
}
|
||||
return new ConditionMainPrompt(context);
|
||||
case 5:
|
||||
case 6:
|
||||
if (context.getSessionData(CK.C_OLD_CONDITION) != null) {
|
||||
return new ConditionSavePrompt(context, (String) context.getSessionData(CK.C_OLD_CONDITION));
|
||||
} else {
|
||||
return new ConditionSavePrompt(context, null);
|
||||
}
|
||||
case 6:
|
||||
case 7:
|
||||
return new ConditionExitPrompt(context);
|
||||
default:
|
||||
return new ConditionMainPrompt(context);
|
||||
|
@ -0,0 +1,185 @@
|
||||
/*******************************************************************************************************
|
||||
* Continued by PikaMug (formerly HappyPikachu) with permission from _Blackvein_. All rights reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
|
||||
* NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*******************************************************************************************************/
|
||||
|
||||
package me.blackvein.quests.convo.conditions.tasks;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.conversations.ConversationContext;
|
||||
import org.bukkit.conversations.Prompt;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Vehicle;
|
||||
|
||||
import me.blackvein.quests.convo.conditions.main.ConditionMainPrompt;
|
||||
import me.blackvein.quests.convo.quests.QuestsEditorNumericPrompt;
|
||||
import me.blackvein.quests.convo.quests.QuestsEditorStringPrompt;
|
||||
import me.blackvein.quests.events.editor.quests.QuestsEditorPostOpenNumericPromptEvent;
|
||||
import me.blackvein.quests.events.editor.quests.QuestsEditorPostOpenStringPromptEvent;
|
||||
import me.blackvein.quests.util.CK;
|
||||
import me.blackvein.quests.util.Lang;
|
||||
import me.blackvein.quests.util.MiscUtil;
|
||||
|
||||
public class EntityPrompt extends QuestsEditorNumericPrompt {
|
||||
|
||||
public EntityPrompt(final ConversationContext context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
private final int size = 2;
|
||||
|
||||
@Override
|
||||
public int getSize() {
|
||||
return size;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTitle(final ConversationContext context) {
|
||||
return Lang.get("conditionEditorEntity");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChatColor getNumberColor(final ConversationContext context, final int number) {
|
||||
switch (number) {
|
||||
case 1:
|
||||
return ChatColor.BLUE;
|
||||
case 2:
|
||||
return ChatColor.GREEN;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSelectionText(final ConversationContext context, final int number) {
|
||||
switch(number) {
|
||||
case 1:
|
||||
return ChatColor.YELLOW + Lang.get("conditionEditorRideEntity");
|
||||
case 2:
|
||||
return ChatColor.GREEN + Lang.get("done");
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public String getAdditionalText(final ConversationContext context, final int number) {
|
||||
switch(number) {
|
||||
case 1:
|
||||
if (context.getSessionData(CK.C_WHILE_RIDING_ENTITY) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
String text = "\n";
|
||||
for (final String s: (List<String>) context.getSessionData(CK.C_WHILE_RIDING_ENTITY)) {
|
||||
text += ChatColor.GRAY + " - " + ChatColor.BLUE + MiscUtil.getProperMobType(s) + "\n";
|
||||
}
|
||||
return text;
|
||||
}
|
||||
case 2:
|
||||
return "";
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPromptText(final ConversationContext context) {
|
||||
final QuestsEditorPostOpenNumericPromptEvent event = new QuestsEditorPostOpenNumericPromptEvent(context, this);
|
||||
context.getPlugin().getServer().getPluginManager().callEvent(event);
|
||||
|
||||
String text = ChatColor.AQUA + "- " + getTitle(context) + " -\n";
|
||||
for (int i = 1; i <= size; i++) {
|
||||
text += getNumberColor(context, i) + "" + ChatColor.BOLD + i + ChatColor.RESET + " - "
|
||||
+ getSelectionText(context, i) + " " + getAdditionalText(context, i) + "\n";
|
||||
}
|
||||
return text;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Prompt acceptValidatedInput(final ConversationContext context, final Number input) {
|
||||
switch(input.intValue()) {
|
||||
case 1:
|
||||
return new EntitiesPrompt(context);
|
||||
case 2:
|
||||
try {
|
||||
return new ConditionMainPrompt(context);
|
||||
} catch (final Exception e) {
|
||||
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("itemCreateCriticalError"));
|
||||
return Prompt.END_OF_CONVERSATION;
|
||||
}
|
||||
default:
|
||||
return new EntityPrompt(context);
|
||||
}
|
||||
}
|
||||
|
||||
public class EntitiesPrompt extends QuestsEditorStringPrompt {
|
||||
|
||||
public EntitiesPrompt(final ConversationContext context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTitle(final ConversationContext context) {
|
||||
return Lang.get("conditionEditorEntitiesTitle");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getQueryText(final ConversationContext context) {
|
||||
return Lang.get("conditionEditorEntitiesPrompt");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPromptText(final ConversationContext context) {
|
||||
final QuestsEditorPostOpenStringPromptEvent event = new QuestsEditorPostOpenStringPromptEvent(context, this);
|
||||
context.getPlugin().getServer().getPluginManager().callEvent(event);
|
||||
|
||||
String entities = ChatColor.LIGHT_PURPLE + getTitle(context) + "\n";
|
||||
final EntityType[] mobArr = EntityType.values();
|
||||
for (int i = 0; i < mobArr.length; i++) {
|
||||
final EntityType type = mobArr[i];
|
||||
if (type.getEntityClass() == null || !Vehicle.class.isAssignableFrom(type.getEntityClass())) {
|
||||
continue;
|
||||
}
|
||||
entities += MiscUtil.snakeCaseToUpperCamelCase(mobArr[i].name()) + ", ";
|
||||
}
|
||||
entities = entities.substring(0, entities.length() - 2) + "\n";
|
||||
return entities + ChatColor.YELLOW + getQueryText(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Prompt acceptInput(final ConversationContext context, final String input) {
|
||||
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false) {
|
||||
final LinkedList<String> mobTypes = new LinkedList<String>();
|
||||
for (final String s : input.split(" ")) {
|
||||
if (MiscUtil.getProperMobType(s) != null) {
|
||||
final EntityType type = MiscUtil.getProperMobType(s);
|
||||
if (type.getEntityClass() != null && Vehicle.class.isAssignableFrom(type.getEntityClass())) {
|
||||
mobTypes.add(s);
|
||||
context.setSessionData(CK.C_WHILE_RIDING_ENTITY, mobTypes);
|
||||
} else {
|
||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED
|
||||
+ Lang.get("stageEditorInvalidMob"));
|
||||
return new EntitiesPrompt(context);
|
||||
}
|
||||
} else {
|
||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED
|
||||
+ Lang.get("stageEditorInvalidMob"));
|
||||
return new EntitiesPrompt(context);
|
||||
}
|
||||
}
|
||||
}
|
||||
return new EntityPrompt(context);
|
||||
}
|
||||
}
|
||||
}
|
@ -229,14 +229,13 @@ public class WorldPrompt extends QuestsEditorNumericPrompt {
|
||||
|
||||
@Override
|
||||
public Prompt acceptInput(final ConversationContext context, final String input) {
|
||||
final Player player = (Player) context.getForWhom();
|
||||
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false) {
|
||||
final LinkedList<String> biomes = new LinkedList<String>();
|
||||
for (final String s : input.split(" ")) {
|
||||
if (MiscUtil.getProperBiome(s) != null) {
|
||||
biomes.add(s);
|
||||
} else {
|
||||
player.sendMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED
|
||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED
|
||||
+ Lang.get("conditionEditorInvalidBiome"));
|
||||
return new BiomesPrompt(context);
|
||||
}
|
||||
|
@ -179,6 +179,7 @@ public class CK {
|
||||
public static final String C_OLD_CONDITION = "oldCondition";
|
||||
public static final String C_NAME = "conName";
|
||||
public static final String C_FAIL_QUEST = "conFailQuest";
|
||||
public static final String C_WHILE_RIDING_ENTITY = "conRidingEntity";
|
||||
public static final String C_WHILE_HOLDING_MAIN_HAND = "conHoldingMainHand";
|
||||
public static final String C_WHILE_WITHIN_WORLD = "conWithinWorld";
|
||||
public static final String C_WHILE_WITHIN_BIOME = "conWithinBiome";
|
||||
|
@ -1,10 +1,5 @@
|
||||
conditions:
|
||||
HoldMainHand:
|
||||
RideThePig:
|
||||
fail-quest: true
|
||||
hold-main-hand:
|
||||
- ==: org.bukkit.inventory.ItemStack
|
||||
v: 2230
|
||||
type: DIAMOND_SWORD
|
||||
meta:
|
||||
==: ItemMeta
|
||||
meta-type: UNSPECIFIC
|
||||
ride-entity:
|
||||
- Pig
|
@ -403,9 +403,15 @@ conditionEditorDeleted: "Condition deleted. Quest and condition data reloaded."
|
||||
conditionEditorModifiedNote: 'Note: You have modified a condition that the following quests use:'
|
||||
conditionEditorForcedToQuit: "If you save the condition, anyone who is actively doing any of these quests will be forced to quit them."
|
||||
conditionEditorSetName: "Set name"
|
||||
conditionEditorEntity: "Entity"
|
||||
conditionEditorWorld: "World"
|
||||
conditionEditorFailQuest: "Fail the quest"
|
||||
conditionEditorConditionCleared: "Condition cleared."
|
||||
conditionEditorRideEntity: "Ride entity"
|
||||
conditionEditorEntitiesTitle: "- Entities -"
|
||||
conditionEditorEntitiesPrompt: "Enter entity names, <space>, <cancel>"
|
||||
conditionEditorStayWithinWorld: "Stay within world"
|
||||
conditionEditorInvalidWorld: "is not a valid world name!"
|
||||
conditionEditorItemsInMainHand: "Hold in main hand"
|
||||
conditionEditorWorldsTitle: "- Worlds -"
|
||||
conditionEditorWorldsPrompt: "Enter world names, <space>, <cancel>"
|
||||
|
Loading…
Reference in New Issue
Block a user