Compare commits

..
17 Commits
Author SHA1 Message Date
Andre_601 6dedd9368f Use release-title 2022-09-05 13:33:55 +02:00
Andre601 f2df3727a7 Add getFaviconHandler to PluginCore
Also, make bStats rely on global config
2022-09-05 13:29:10 +02:00
Andre_601 2b7c24daa4 Create FUNDING.yml 2022-09-04 15:15:54 +02:00
Andre_601 1e042461ac Update README.md 2022-09-04 14:17:42 +02:00
Andre_601 599c2db2bc Re-add modrinth 2022-09-03 16:56:38 +02:00
Andre_601 87505f820c try upload/download artifact 2022-09-03 16:27:44 +02:00
Andre_601 28109c8b5b Add needs to second job 2022-09-03 16:02:45 +02:00
Andre_601 243854592d Merge pull request #15 from Andre601/feature/action-improvements
Make Jar build only happen once
2022-09-03 16:01:05 +02:00
Andre_601 4648bc30e9 test out with github only for now... 2022-09-03 16:00:57 +02:00
Andre_601 f9a96e5525 typo 2022-09-03 00:28:50 +02:00
Andre_601 d158fb852f Update release.yml 2022-09-03 00:14:11 +02:00
Andre_601 77f95900e2 Use cache 2022-09-03 00:10:00 +02:00
Andre_601 912fec1875 Make Jar build only happen once 2022-09-02 23:44:51 +02:00
Andre_601 dba9ca20a4 Merge pull request #14 from Andre601/dependabot/github_actions/Kir-Antipov/mc-publish-3.2
Bump Kir-Antipov/mc-publish from 3.1 to 3.2
2022-09-02 18:35:37 +02:00
dependabot[bot] 7b94ae52db Bump Kir-Antipov/mc-publish from 3.1 to 3.2
Bumps [Kir-Antipov/mc-publish](https://github.com/Kir-Antipov/mc-publish) from 3.1 to 3.2.
- [Release notes](https://github.com/Kir-Antipov/mc-publish/releases)
- [Commits](https://github.com/Kir-Antipov/mc-publish/compare/v3.1...v3.2)

---
updated-dependencies:
- dependency-name: Kir-Antipov/mc-publish
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-02 15:40:17 +00:00
Andre601 6d3bf50278 Actually bump version -_- 2022-09-02 04:27:50 +02:00
Andre_601 8039088fb9 typo -_- 2022-09-02 03:43:39 +02:00
15 changed files with 130 additions and 90 deletions

No files matched your search

+2
View File
@@ -0,0 +1,2 @@
patreon: andre_601
ko_fi: andre_601
+63 -30
View File
@@ -10,24 +10,7 @@ on:
types: [published]
jobs:
build:
strategy:
matrix:
include:
- platforms: |
bungeecord
waterfall
directory: bungeecord
name: BungeeCord, Waterfall
- platforms: paper
directory: paper
name: Paper
- platforms: spigot
directory: spigot
name: Spigot
- platforms: velocity
directory: velocity
name: Velocity
buildJars:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
@@ -36,27 +19,77 @@ jobs:
with:
distribution: 'temurin'
java-version: '16'
- name: Build jar
cache: 'maven'
- name: Build Jar files
run: mvn clean install
- name: Obtain GitHub Release version
- name: Save BungeeCord Jar file
uses: actions/upload-artifact@v3
with:
name: asl-bungeecord
path: bungeecord/target/AdvancedServerList-*.jar
if-no-files-found: error
retention-days: 1
- name: Save Paper Jar file
uses: actions/upload-artifact@v3
with:
name: asl-paper
path: paper/target/AdvancedServerList-*.jar
if-no-files-found: error
retention-days: 1
- name: Save Spigot Jar file
uses: actions/upload-artifact@v3
with:
name: asl-spigot
path: spigot/target/AdvancedServerList-*.jar
if-no-files-found: error
retention-days: 1
- name: Save Velocity Jar file
uses: actions/upload-artifact@v3
with:
name: asl-velocity
path: velocity/target/AdvancedServerList-*.jar
if-no-files-found: error
retention-days: 1
publish:
needs: [buildJars]
strategy:
matrix:
include:
- directory: bungeecord
loaders: |
bungeecord
waterfall
- directory: paper
loaders: paper
- directory: spigot
loaders: spigot
- directory: velocity
loaders: velocity
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Get Jar files
uses: actions/download-artifact@v3
with:
name: asl-${{ matrix.directory }}
path: ${{ matrix.directory }}/target
- name: Get Version
id: github-release
run: |
version=$(echo ${{ github.event.release.tag_name }} | cut -d'v' -f2)
echo "::set-output name=version::$version"
- name: Upload ${{ matrix.name }} to GitHub and Modrinth
uses: Kir-Antipov/mc-publish@v3.1
- name: Upload AdvancedServerList (${{ matrix.loaders }}) to GitHub and Modrinth
uses: Kir-Antipov/mc-publish@v3.2
with:
name: v${{ steps.github-release.outputs.version }} - ${{ matrix.name }}
name: ${{ github.event.release.name }}
version: ${{ steps.github-release.outputs.version }}
version-type: release
files: ${{ matrix.directory }}/target/AdvancedServerList-*.jar
files: ${{ matrix.directory}}/target/AdvancedServerList-*.jar
files-secondary: ""
loaders: ${{ matrix.platforms }}
game-versions: |
1.19
1.19.1
1.19.2
loaders: ${{ matrix.loaders }}
version-resolver: releases
game-versions: '1.19'
java: 16
modrinth-id: xss83sOY
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
github-toke: ${{ secrets.GITHUB_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
+13 -10
View File
@@ -35,6 +35,13 @@ AdvancedServerList can be downloaded from the following places:
[![dl-modrinth]][modrinth] [![dl-spigot]][spigot] [![dl-hangar]][hangar]
## Dependencies
| Dependency | Platforms | Required? |
| ---------------- | ------------- | --------- |
| [ProtocolLib] | Spigot | Yes |
| [PlaceholderAPI] | Spigot, Paper | No |
## Statistics
This plugin sends statistics to [bStats] to display.
@@ -45,13 +52,9 @@ You can disable this in the `config.yml` by setting `send_statistics` to `false`
- [Velocity][bstats-velocity]
## Screenshots
Here are screenshots showing the plugin in action. Do you have your own screenshots that you would like to share? Let me know and I may add them here with proper credit.
![basic_example]
![full_example]
![favicons_example]
Please see the [Gallery Tab][gallery] for some previews.
If you have any own screenshots, feel free to share them with me. I may add them to the Gallery if they are good.
<!-- Links -->
[profiles]: https://github.com/Andre601/AdvancedServerList/wiki/Profiles
@@ -65,15 +68,15 @@ Here are screenshots showing the plugin in action. Do you have your own screensh
[spigot]: https://www.spigotmc.org/resources/102910/
[hangar]: https://hangar.benndorf.dev/Andre_601/AdvancedServerList
[protocollib]: https://www.spigotmc.org/resources/1997/
[placeholderapi]: https://www.spigotmc.org/resources/6245/
[bstats]: https://bstats.org
[bstats-bungee]: https://bstats.org/plugin/bungeecord/AdvancedServerList/15585
[bstats-spigot]: https://bstats.org/plugin/bukkit/AdvancedServerList/15584
[bstats-velocity]: https://bstats.org/plugin/velocity/AdvancedServerList/15587
<!-- images -->
[basic_example]: https://raw.githubusercontent.com/Andre601/AdvancedServerList/master/.github/assets/basic_example.jpg
[full_example]: https://raw.githubusercontent.com/Andre601/AdvancedServerList/master/.github/assets/full_example.jpg
[favicons_example]: https://raw.githubusercontent.com/Andre601/AdvancedServerList/master/.github/assets/version_1.5.0.jpg
[gallery]: https://modrinth.com/mod/advancedserverlist/gallery
<!-- Badges -->
[platform]: https://img.shields.io/badge/Platforms-Spigot%20%7C%20Paper%20%7C%20BungeeCord%20%7C%20Velocity-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiBmaWxsPSJ3aGl0ZSI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTEuMDYzIDEuNDU2YTEuNzUgMS43NSAwIDAxMS44NzQgMGw4LjM4MyA1LjMxNmExLjc1IDEuNzUgMCAwMTAgMi45NTZsLTguMzgzIDUuMzE2YTEuNzUgMS43NSAwIDAxLTEuODc0IDBMMi42OCA5LjcyOGExLjc1IDEuNzUgMCAwMTAtMi45NTZsOC4zODMtNS4zMTZ6bTEuMDcxIDEuMjY3YS4yNS4yNSAwIDAwLS4yNjggMEwzLjQ4MyA4LjAzOWEuMjUuMjUgMCAwMDAgLjQyMmw4LjM4MyA1LjMxNmEuMjUuMjUgMCAwMC4yNjggMGw4LjM4My01LjMxNmEuMjUuMjUgMCAwMDAtLjQyMmwtOC4zODMtNS4zMTZ6Ij48L3BhdGg+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMS44NjcgMTIuMzI0YS43NS43NSAwIDAxMS4wMzUtLjIzMmw4Ljk2NCA1LjY4NWEuMjUuMjUgMCAwMC4yNjggMGw4Ljk2NC01LjY4NWEuNzUuNzUgMCAwMS44MDQgMS4yNjdsLTguOTY1IDUuNjg1YTEuNzUgMS43NSAwIDAxLTEuODc0IDBsLTguOTY1LTUuNjg1YS43NS43NSAwIDAxLS4yMzEtMS4wMzV6Ij48L3BhdGg+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMS44NjcgMTYuMzI0YS43NS43NSAwIDAxMS4wMzUtLjIzMmw4Ljk2NCA1LjY4NWEuMjUuMjUgMCAwMC4yNjggMGw4Ljk2NC01LjY4NWEuNzUuNzUgMCAwMS44MDQgMS4yNjdsLTguOTY1IDUuNjg1YTEuNzUgMS43NSAwIDAxLTEuODc0IDBsLTguOTY1LTUuNjg1YS43NS43NSAwIDAxLS4yMzEtMS4wMzV6Ij48L3BhdGg+PC9zdmc+
@@ -40,16 +40,15 @@ import org.bstats.charts.SimplePie;
import java.nio.file.Path;
public class BungeeCordCore extends Plugin implements PluginCore{
public class BungeeCordCore extends Plugin implements PluginCore<Favicon>{
private AdvancedServerList core;
private FaviconHandler<Favicon> faviconHandler;
private FaviconHandler<Favicon> faviconHandler = null;
private final PluginLogger logger = new BungeeLogger(getLogger());
@Override
public void onEnable(){
this.core = new AdvancedServerList(this);
this.faviconHandler = new FaviconHandler<>(core);
}
@Override
@@ -96,6 +95,14 @@ public class BungeeCordCore extends Plugin implements PluginCore{
return logger;
}
@Override
public FaviconHandler<Favicon> getFaviconHandler(){
if(faviconHandler == null)
faviconHandler = new FaviconHandler<>(core);
return faviconHandler;
}
@Override
public String getPlatformName(){
return getProxy().getName();
@@ -105,8 +112,4 @@ public class BungeeCordCore extends Plugin implements PluginCore{
public String getPlatformVersion(){
return getProxy().getVersion();
}
public FaviconHandler<Favicon> getFaviconHandler(){
return faviconHandler;
}
}
@@ -145,13 +145,9 @@ public class AdvancedServerList{
getPluginLogger().info("Loading cache.data...");
getPlayerHandler().load();
getPluginLogger().info("Loading Metrics for bStats...");
if(getFileHandler().getBoolean("send_statistics")){
plugin.loadMetrics();
getPluginLogger().info("Metrics loaded!");
}else{
getPluginLogger().info("'send_statistics' disabled in config.yml. Not loading Metrics for bStats...");
}
getPluginLogger().info("Loading bStats metrics. Disable it in the global config under /plugins/bstats/");
plugin.loadMetrics();
getPluginLogger().info("Metrics loaded!");
getPluginLogger().info("AdvancedServerList is ready!");
}
@@ -32,7 +32,6 @@ import org.spongepowered.configurate.ConfigurationNode;
import org.spongepowered.configurate.yaml.YamlConfigurationLoader;
import java.io.File;
import java.io.FilenameFilter;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Files;
@@ -157,8 +156,4 @@ public class FileHandler{
public String getString(String def, Object... path){
return node.node(path).getString(def);
}
public boolean getBoolean(Object... path){
return node.node(path).getBoolean(true);
}
}
@@ -26,10 +26,11 @@
package ch.andre601.advancedserverlist.core.interfaces;
import ch.andre601.advancedserverlist.core.AdvancedServerList;
import ch.andre601.advancedserverlist.core.profiles.favicon.FaviconHandler;
import java.nio.file.Path;
public interface PluginCore{
public interface PluginCore<T>{
void loadCommands();
@@ -45,6 +46,8 @@ public interface PluginCore{
PluginLogger getPluginLogger();
FaviconHandler<T> getFaviconHandler();
String getPlatformName();
String getPlatformVersion();
@@ -98,7 +98,7 @@ public class Expression{
}
public enum Operator{
LESS_THAN('<', '\0'){
LESS('<', '\0'){
@Override
public boolean evaluate(String left, String right){
int leftInt = Operator.getInt(left);
@@ -128,7 +128,7 @@ public class Expression{
return !left.equals(right);
}
},
GREATER_THAN('>', '\0'){
GREATER('>', '\0'){
@Override
public boolean evaluate(String left, String right){
int leftInt = Operator.getInt(left);
+1 -5
View File
@@ -1,8 +1,4 @@
#
# Used for when AdvancedServerList doesn't have a cached player to use for ${player name}
#
unknown_player: "Anonymous"
#
# Whether statistics should be sent to bStats or not.
#
send_statistics: true
unknown_player: "Anonymous"
@@ -41,7 +41,7 @@ import org.bukkit.util.CachedServerIcon;
import java.nio.file.Path;
public class PaperCore extends JavaPlugin implements PluginCore{
public class PaperCore extends JavaPlugin implements PluginCore<CachedServerIcon>{
private final PluginLogger logger = new PaperLogger(getLogger());
@@ -126,6 +126,14 @@ public class PaperCore extends JavaPlugin implements PluginCore{
return logger;
}
@Override
public FaviconHandler<CachedServerIcon> getFaviconHandler(){
if(faviconHandler == null)
faviconHandler = new FaviconHandler<>(core);
return faviconHandler;
}
@Override
public String getPlatformName(){
return getServer().getName();
@@ -136,12 +144,7 @@ public class PaperCore extends JavaPlugin implements PluginCore{
return getServer().getVersion();
}
public FaviconHandler<CachedServerIcon> getFaviconHandler(){
return faviconHandler;
}
private void enable(){
this.core = new AdvancedServerList(this);
this.faviconHandler = new FaviconHandler<>(core);
}
}
+1 -1
View File
@@ -13,7 +13,7 @@ softdepend:
commands:
advancedserverlist:
description: 'Main command of AdvancedServerList'
usage: '/<command> [reload]'
usage: '/<command> [help|reload]'
aliases:
- 'asl'
permission: 'advancedserverlist.admin'
+1 -1
View File
@@ -12,7 +12,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<plugin.version>1.5.1</plugin.version>
<plugin.version>1.5.3</plugin.version>
<plugin.description>Create multiple Server lists based on conditions.</plugin.description>
<maven.compiler.source>16</maven.compiler.source>
@@ -40,12 +40,12 @@ import org.bukkit.plugin.java.JavaPlugin;
import java.nio.file.Path;
public class SpigotCore extends JavaPlugin implements PluginCore{
public class SpigotCore extends JavaPlugin implements PluginCore<WrappedServerPing.CompressedImage>{
private final PluginLogger logger = new SpigotLogger(getLogger());
private AdvancedServerList core;
FaviconHandler<WrappedServerPing.CompressedImage> faviconHandler;
FaviconHandler<WrappedServerPing.CompressedImage> faviconHandler = null;
@Override
public void onEnable(){
@@ -63,7 +63,6 @@ public class SpigotCore extends JavaPlugin implements PluginCore{
}
this.core = new AdvancedServerList(this);
this.faviconHandler = new FaviconHandler<>(core);
}
@Override
@@ -113,6 +112,14 @@ public class SpigotCore extends JavaPlugin implements PluginCore{
return logger;
}
@Override
public FaviconHandler<WrappedServerPing.CompressedImage> getFaviconHandler(){
if(faviconHandler == null)
faviconHandler = new FaviconHandler<>(core);
return faviconHandler;
}
@Override
public String getPlatformName(){
return getServer().getName();
@@ -123,10 +130,6 @@ public class SpigotCore extends JavaPlugin implements PluginCore{
return getServer().getVersion();
}
public FaviconHandler<WrappedServerPing.CompressedImage> getFaviconHandler(){
return faviconHandler;
}
private void printPaperInfo(){
getPluginLogger().warn("======================================================================================");
getPluginLogger().warn("You are using the Spigot version of AdvancedServerList on a PaperMC server.");
+1 -1
View File
@@ -21,7 +21,7 @@ softdepend:
commands:
advancedserverlist:
description: 'Main command of AdvancedServerList'
usage: '/<command> [reload]'
usage: '/<command> [help|reload]'
aliases:
- 'asl'
permission: 'advancedserverlist.admin'
@@ -47,7 +47,7 @@ import org.slf4j.LoggerFactory;
import java.nio.file.Path;
public class VelocityCore implements PluginCore{
public class VelocityCore implements PluginCore<Favicon>{
private final PluginLogger logger;
private final ProxyServer proxy;
@@ -55,7 +55,7 @@ public class VelocityCore implements PluginCore{
private final Metrics.Factory metrics;
private AdvancedServerList core;
private FaviconHandler<Favicon> faviconHandler;
private FaviconHandler<Favicon> faviconHandler = null;
@Inject
public VelocityCore(ProxyServer proxy, @DataDirectory Path path, Metrics.Factory metrics){
@@ -69,7 +69,6 @@ public class VelocityCore implements PluginCore{
@Subscribe
public void init(ProxyInitializeEvent event){
this.core = new AdvancedServerList(this);
this.faviconHandler = new FaviconHandler<>(core);
}
@Subscribe
@@ -120,6 +119,14 @@ public class VelocityCore implements PluginCore{
return logger;
}
@Override
public FaviconHandler<Favicon> getFaviconHandler(){
if(faviconHandler == null)
faviconHandler = new FaviconHandler<>(core);
return faviconHandler;
}
@Override
public String getPlatformName(){
return getProxy().getVersion().getName();
@@ -133,8 +140,4 @@ public class VelocityCore implements PluginCore{
public ProxyServer getProxy(){
return proxy;
}
public FaviconHandler<Favicon> getFaviconHandler(){
return faviconHandler;
}
}