Save actual effect name to actions config, fixes #1389

This commit is contained in:
PikaMug 2020-08-23 21:13:40 -04:00
parent ea0a2087e6
commit bcb8e75de0
2 changed files with 2 additions and 2 deletions

View File

@ -3070,7 +3070,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener
try { try {
effect = Effect.valueOf(s.toUpperCase()); effect = Effect.valueOf(s.toUpperCase());
} catch (final IllegalArgumentException e) { } catch (final IllegalArgumentException e) {
throw new ActionFormatException("effect-locations is not a valid effect name", throw new ActionFormatException(s + " is not a valid effect name",
actionKey); actionKey);
} }
final Location l = ConfigUtil.getLocation(effectLocs.get(effectList.indexOf(s))); final Location l = ConfigUtil.getLocation(effectLocs.get(effectList.indexOf(s)));

View File

@ -341,7 +341,7 @@ public class EffectPrompt extends ActionsEditorNumericPrompt {
} else { } else {
effects = new LinkedList<String>(); effects = new LinkedList<String>();
} }
effects.add(input.toUpperCase()); effects.add(MiscUtil.getProperEffect(input).name());
context.setSessionData(CK.E_EFFECTS, effects); context.setSessionData(CK.E_EFFECTS, effects);
final Map<UUID, Block> selectedEffectLocations = plugin.getActionFactory().getSelectedEffectLocations(); final Map<UUID, Block> selectedEffectLocations = plugin.getActionFactory().getSelectedEffectLocations();
selectedEffectLocations.remove(player.getUniqueId()); selectedEffectLocations.remove(player.getUniqueId());