- Increment again for last round of argument and language replacements
- Limit and ReplacementLimitReachedException in separate files
- Add some replacement limit unit tests (more can be added later)
- Test public static methods for creating a Message object
- Test isEmpty, prefix, append, prepend
- Get methods and variable replacement still needs to be tested
- Allow ReplacementProvider returning a Message object
- Escape non-Message results from ReplacementProvider (might be user input or contain variables)
- null replacements do increase the index now (null replacements should never be used though)
- Replacement.name() to give a name to a replacement object (instead of the usual number)
- Replacement.prefix() to wrap a ReplacementProvider and add a prefix to the variables
- At one spot the replacement Limit object was not passed correctly, which could cause infinite replacements crashing the server
- Improve handling of reaching the limit, throw exception instead of checking in all places.
- Move logging class to library itself, so that InteractiveMessenger can also handle logging
- Prevent access to the internal variables of InteractiveMessagePart and TextMessagePart to ensure null safety for certain fields
- More compact TellrawGenerator output (and adjusted test cases for that)
- Ingame testing suite:
- Use -DtestIngame="/path/to/test/server" in the maven command line to build a test plugin and copy it to the server
- Start ingame testing using the 'testinteractivemessenger' command (alias: 'tim')
- 'tim start [regex]': start testing all testcases of which the name matches the regex
- 'tim stop': stop the running test
- 'tim correct': mark the currently shown test case as correct
- 'tim wrong': mark the currently shown test case as wrong
- 'tim continue': continue to the next test case without giving a verdict (either because the test suite already failed the test or because you want to skip it)
- The input and output of the test case is shown to the test player, and detailed information is displayed in the console
- Added UTF8 encoding test to ensure all languages work
- Use EnumSet where possible
- Move all test cases to the resources folder, where they should be
- Actually add newlines in ConsoleGenerator output
- Parse \n just as [break] is parsed (otherwise it will end up as plain text in the result instead of an actual newline)
- Tests for the current newline properties
- It the future it would be nice to support text after a newline and also adding multiple newlines at once
- Formatting tests (tags, legacy with & and legacy with section sign)
- Test tags with different capitalisation (they should be case insensitive)
- Fix format and color resets for ConsoleGenerator
- This fixes messages that use two language variables after each other, which were getting matched as 1 thing and therefore the second variable would get lost
- Thanks to Chinimala for reporting the bug! (https://github.com/NLthijs48/AreaShop/issues/285)
- In the text files you now specify the input, expected ConsoleGenerator output and expected TellrawGenerator output
- Added InteractiveMessage#copy() and constructor to initialize with a collection of values
- Fix TellrawGenerator destroying given InteractiveMessage object
- Added equals() and hashCode() to InteractiveMessagePart and TextMessagePart
- Add tests to ensure generators don't destroy the given InteractiveMessage object
- Add version to maven-surefire-plugin
- Closes#5
- RunTests class to setup test suites (directories) and cases (files), it creates a case for each file it finds
- The .txt files define the input (in the format defined by the YamlParser) and the JSON output
- Some simple tests for color have been added
- Can be extended with a lot of tests and also another test type for the output generated by ConsoleGenerator
- "-Dsources" to generate jar with source files
- "-Djavadoc=directory/for/javadocs" to generate javadocs into the specified directory
- Fix deprecation warning by replacing ${name} with ${project.name}