Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added executecontinue, some new condition types and support for "and" #19

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

AlonsoAliaga
Copy link

@AlonsoAliaga AlonsoAliaga commented Jul 24, 2023

Estos cambios:

  • Permiten usar executecontinue para permitir seguir revisando condiciones y ejecutar más acciones en un mismo evento.
  • Agrega 6 tipos de ConditionType: endsWith, !endsWith, matchesWith, !matchesWith, isMultipleOf, !isMultipleOf
  • Modifica Double.valueOf(firstArg) a Double.parseDouble(firstArg)
  • Soporte para "and" como condición, por ejemplo: - "%player_name% == AlonsoAliaga and %player_level% > 30"

@AlonsoAliaga AlonsoAliaga changed the title Added executecontinue and some new condition Types. Added executecontinue and some new condition types. Jul 24, 2023
@AlonsoAliaga AlonsoAliaga changed the title Added executecontinue and some new condition types. Added executecontinue, some new condition types and support for "and" Jul 30, 2023
try{
firstArgNum = Double.parseDouble(firstArg);
secondArgNum = Double.parseDouble(secondArg);
}catch(NumberFormatException ignored){}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One of the libraries Spigot provides in their API (Guava) has Doubles#tryParse(String). There’s also NumberUtils#toDouble(String) which is provided by Apache Commons but the library has been removed from the API in newer versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant