Update tests

This commit is contained in:
Nassim Jahnke 2023-01-17 09:41:19 +01:00
parent dedb923847
commit a141841601
No known key found for this signature in database
GPG Key ID: 6BE3B555EBC5982B
3 changed files with 12 additions and 12 deletions

View File

@ -28,7 +28,7 @@ public class BBCodeConverter {
REPLACERS.put("font", (tag, tagArg, content) -> content);
REPLACERS.put("user", (tag, tagArg, content) -> content);
REPLACERS.put("list", (tag, tagArg, content) -> content);
REPLACERS.put("attach", (tag, tagArg, content) -> content);
REPLACERS.put("attach", (tag, tagArg, content) -> "");
REPLACERS.put("spoiler", (tag, tagArg, content) -> "<details>\n<summary>%s</summary>\n\n%s\n</details>\n".formatted(removeQuotes(tagArg), content));
REPLACERS.put("b", (tag, tagArg, content) -> "**" + content + "**");

View File

@ -56,7 +56,7 @@ class BBCodeConverterTest {
@Test
void testAttachment() {
final String result = this.converter.convertToMarkdown("[attach]100[/attach]");
Assertions.assertEquals("![https://www.spigotmc.org/attachments/100](https://www.spigotmc.org/attachments/100)", result);
Assertions.assertEquals("", result);
}
@Test

View File

@ -1,9 +1,9 @@
**![https://www.spigotmc.org/attachments/398874](https://www.spigotmc.org/attachments/398874)
**
This plugin lets you activate a maintenance mode on your BungeeCord as well as Spigot server, which will prevent players without a permission to join the server.**
**Whatever version you want to use, just place the plugin inside your plugin folder of your server running Spigot or BungeeCord!**
![https://www.spigotmc.org/attachments/246817](https://www.spigotmc.org/attachments/246817)
Its features include:
@ -25,15 +25,15 @@ Its features include:
IMPORTANT: If using the plugin on a Spigot server, the plugin **[ProtocolLib](https://www.spigotmc.org/resources/protocollib.1997/)** is required to use Maintenance to its full extend.
![https://www.spigotmc.org/attachments/401279](https://www.spigotmc.org/attachments/401279)
### Did you find a bug? Use the [**issue tracker**](https://github.com/kennytv/maintenance/issues)
Other questions or problems? Click the wonderful icon below ✨
[![https://www.spigotmc.org/attachments/401277](https://www.spigotmc.org/attachments/401277)](https://discord.gg/vgcuzhq)
[](https://discord.gg/vgcuzhq)
![https://www.spigotmc.org/attachments/398878](https://www.spigotmc.org/attachments/398878)
*Arguments in < > are necessary, those in [ ] aren't (can be omitted).*
* **/maintenance <on/off> [server]** will set the status of the maintenance mode
@ -41,7 +41,7 @@ Other questions or problems? Click the wonderful icon below ✨
* **/maintenace <add/remove> <player/uuid>** allows specific players to join on the server when maintenance is enabled
![https://www.spigotmc.org/attachments/398879](https://www.spigotmc.org/attachments/398879)
* **maintenance.admin** - super permission, that grants access to all perms below
* **maintenance.joinnotification** - if enabled: sends a notification to you if a player tries to join the server while maintenance is enabled
@ -52,12 +52,12 @@ Extra permissions for the Bungee part:
IMPORTANT - If you are using the plugin on your proxyserver: You have to have these permissions on the proxy, not on the Spigot servers! This can be done by putting them into the Bungee config.yml as seen here:
![https://www.spigotmc.org/attachments/355970](https://www.spigotmc.org/attachments/355970)
This or you have a permissions plugin, which also works across the Proxy/Bungee (for example LuckPerms).
If you use it on a Spigot server, normal permission plugins should work (as well as being an operator).
![https://www.spigotmc.org/attachments/398875](https://www.spigotmc.org/attachments/398875)
If you are using *the Spigot version of the plugin*, you have to have [**ProtocolLib**](https://www.spigotmc.org/resources/protocollib.1997/) installed to use the custom server-icon and the playercount-messages (that, or you have Paper running on 1.12.2 or higher)! The rest however is also accessible without it.
For the Bungee version you don't need to have any other plugins installed.
@ -85,11 +85,11 @@ kickmessage: "&cThe server is currently under maintenance!%NEWLINE%&cTry again l
</details>
![https://www.spigotmc.org/attachments/401278](https://www.spigotmc.org/attachments/401278)
If you have the ServerListPlus plugin on your BungeeCord/Spigot server, Maintenance will toggle its status. If you enable maintenance, the ServerListPlus motd will be disabled and then reenabled, when you disable maintenance to prevent any issues with them overriding each other.
![https://www.spigotmc.org/attachments/398886](https://www.spigotmc.org/attachments/398886)
*Only available for the BungeeCord version!*
By enabling MySQL in the config, you can even connect multiple proxy-servers to a set value in your database, so you won't have to enable/disable maintenance on each proxy by hand!