Compare commits

...
2 Commits
Author SHA1 Message Date
Andre601 2b92257523 Return empty List instead of null in getList 2022-06-26 19:08:04 +02:00
Andre_601 d64ab46643 Update README.md 2022-06-26 18:59:52 +02:00
3 changed files with 8 additions and 5 deletions

No files matched your search

+4 -2
View File
@@ -1,6 +1,8 @@
[placeholders]: https://github.com/Andre601/AdvancedServerList/wiki/Profiles#placeholders
[wiki]: https://github.com/Andre601/AdvancedServerList/wiki
[spigot]: https://www.spigotmc.org/resources/102910/
[stats-spigot]: https://bstats.org/plugin/bukkit/AdvancedServerList/15584
[stats-bungeecord]: https://bstats.org/plugin/bungeecord/AdvancedServerList/15585
[stats-velocity]: https://bstats.org/plugin/velocity/AdvancedServerList/15587
@@ -34,10 +36,10 @@ Other platform may be supported, but compatability has not been tested with any
## Links
- SpigotMC (TODO)
- [SpigotMC][spigot]
- [Wiki][wiki]
- Statistics
- [Spigot/PaperMC][stats-spigot]
- [BungeeCord][stats-bungeecord]
- [Velocity][stats-velocity]
- [License][license]
- [License][license]
@@ -28,6 +28,7 @@ package ch.andre601.advancedserverlist.core.profiles;
import org.spongepowered.configurate.ConfigurationNode;
import org.spongepowered.configurate.serialize.SerializationException;
import java.util.Collections;
import java.util.List;
public class ServerListProfile{
@@ -73,11 +74,11 @@ public class ServerListProfile{
try{
list = node.node(key).getList(String.class);
}catch(SerializationException ex){
return null;
return Collections.emptyList();
}
if(list == null)
return null;
return Collections.emptyList();
if(trim && list.size() > 2)
return list.subList(0, 2);
+1 -1
View File
@@ -12,7 +12,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<plugin.version>1.0.0</plugin.version>
<plugin.version>1.0.1</plugin.version>
<plugin.description>Create multiple Server lists based on conditions.</plugin.description>
<plugin.depend.mc>1.19-R0.1-SNAPSHOT</plugin.depend.mc>