From 34a06f4275c6b6a839453f460c607035c752a16c Mon Sep 17 00:00:00 2001 From: James Mortemore Date: Thu, 6 Jun 2024 17:47:00 +0100 Subject: [PATCH] feat: added velocity --- .github/workflows/build.yaml | 4 +- .../banmanager/config-builder/final-stage.js | 3 +- .../config-builder/machine/index.js | 4 +- .../banmanager/developers/get-static-props.js | 16 ++++-- components/pages/download/download-card.js | 18 +++--- pages/docs/banmanager/api.mdx | 11 ++++ .../banmanager/configuration/config-yml.mdx | 1 + .../banmanager/configuration/console-yml.mdx | 1 + .../banmanager/configuration/discord-yml.mdx | 1 + .../configuration/exemptions-yml.mdx | 1 + .../banmanager/configuration/geoip-yml.mdx | 1 + pages/docs/banmanager/configuration/index.mdx | 1 + .../banmanager/configuration/messages-yml.mdx | 1 + .../banmanager/configuration/reasons-yml.mdx | 1 + .../configuration/schedules-yml.mdx | 1 + pages/docs/banmanager/install-network.mdx | 12 ++-- pages/download.js | 15 +++-- public/images/velocity-logo.svg | 41 ++++++++++++++ public/sitemap.xml | 56 +++++++++---------- 19 files changed, 132 insertions(+), 57 deletions(-) create mode 100644 public/images/velocity-logo.svg diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 4377eae0..5da3bd50 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -11,10 +11,10 @@ on: jobs: build: runs-on: ubuntu-latest - name: Node.js ${{ matrix.java }} - ${{ matrix.storageType }} + name: Node.js ${{ matrix.node-version }} - ${{ matrix.storageType }} strategy: matrix: - node-version: [16.x] + node-version: [20.x] steps: - uses: actions/checkout@v4 diff --git a/components/pages/docs/banmanager/config-builder/final-stage.js b/components/pages/docs/banmanager/config-builder/final-stage.js index 05901a35..36d8ac5f 100644 --- a/components/pages/docs/banmanager/config-builder/final-stage.js +++ b/components/pages/docs/banmanager/config-builder/final-stage.js @@ -6,7 +6,8 @@ import { Code } from 'components/code' const downloadUrls = { BungeeCord: 'https://ci.frostcast.net/job/BanManager/lastSuccessfulBuild/artifact/bungee/build/libs/BanManagerBungeeCord.jar', Sponge: 'https://ore.spongepowered.org/confuser/BanManager/versions', - 'CraftBukkit/Spigot/Paper': 'https://dev.bukkit.org/projects/ban-management/files/latest' + 'CraftBukkit/Spigot/Paper': 'https://dev.bukkit.org/projects/ban-management/files/latest', + Velocity: 'https://ci.frostcast.net/job/BanManager/lastSuccessfulBuild/artifact/velocity/build/libs/BanManagerVelocity.jar' } export const FinalStage = ({ currentState, configYaml }) => { diff --git a/components/pages/docs/banmanager/config-builder/machine/index.js b/components/pages/docs/banmanager/config-builder/machine/index.js index 00d081f1..5359e76c 100644 --- a/components/pages/docs/banmanager/config-builder/machine/index.js +++ b/components/pages/docs/banmanager/config-builder/machine/index.js @@ -77,7 +77,7 @@ export const machine = createMachine({ actions: setContext('networkType') }, Velocity: { - target: 'serverType', + target: 'storageType', actions: setContext('networkType') } } @@ -119,7 +119,7 @@ export const machine = createMachine({ H2: { target: 'success', actions: setContext('storageType'), - cond: (context) => context.syncType !== 'INDIVIDUAL' && (!context.networkType || context.networkType === 'BUNGEECORD') + cond: (context) => context.syncType !== 'INDIVIDUAL' && (!context.networkType || context.networkType === 'BUNGEECORD' || context.networkType === 'VELOCITY') } } }, diff --git a/components/pages/docs/banmanager/developers/get-static-props.js b/components/pages/docs/banmanager/developers/get-static-props.js index 31b12841..8b47de76 100644 --- a/components/pages/docs/banmanager/developers/get-static-props.js +++ b/components/pages/docs/banmanager/developers/get-static-props.js @@ -22,14 +22,18 @@ async function getEvents () { } export async function getStaticProps () { + const versions = { + bukkit: await getLatestRelease('BanManagerBukkit'), + bungeecord: await getLatestRelease('BanManagerBungeeCord'), + common: await getLatestRelease('BanManagerCommon'), + sponge: await getLatestRelease('BanManagerSponge') + } + + versions.velocity = versions.bungeecord + return { props: { - versions: { - bukkit: await getLatestRelease('BanManagerBukkit'), - bungeecord: await getLatestRelease('BanManagerBungeeCord'), - common: await getLatestRelease('BanManagerCommon'), - sponge: await getLatestRelease('BanManagerSponge') - }, + versions, events: await getEvents() }, revalidate: 3600 // Cache for an hour diff --git a/components/pages/download/download-card.js b/components/pages/download/download-card.js index beebb1cb..7151d558 100644 --- a/components/pages/download/download-card.js +++ b/components/pages/download/download-card.js @@ -1,17 +1,18 @@ import PropTypes from 'prop-types' import Image from 'next/image' import { FaDownload } from 'react-icons/fa' +import clsx from 'clsx' const styles = { - image: 'h-32 w-full relative', + image: 'h-32 w-full', card: 'pt-8 pb-8 rounded overflow-hidden shadow-lg bg-white mx-auto' } -export const DownloadCard = ({ title, imgSrc, description, stableUrl, experimentalUrl, coverImage, size = 'sm', children }) => ( +export const DownloadCard = ({ title, imgSrc, description, stableUrl, experimentalUrl, coverImage, size = 'sm', children, showDisabledDownload }) => (
-
+
{`${title}
@@ -19,15 +20,17 @@ export const DownloadCard = ({ title, imgSrc, description, stableUrl, experiment

{description}

- {stableUrl && Download } - {stableUrl && experimentalUrl &&
} + {(showDisabledDownload || (stableUrl && experimentalUrl)) &&
} {experimentalUrl && `} +#### Velocity +{` + + me.confuser.banmanager + BanManagerVelocity + ${props.versions.velocity} + provided + +`} + + ## BmAPI This is a static API class for BanManager to create and manipulate punishments. diff --git a/pages/docs/banmanager/configuration/config-yml.mdx b/pages/docs/banmanager/configuration/config-yml.mdx index 46d6b4ba..3fd01fe3 100644 --- a/pages/docs/banmanager/configuration/config-yml.mdx +++ b/pages/docs/banmanager/configuration/config-yml.mdx @@ -12,6 +12,7 @@ The main configuration file for BanManager. | CraftBukkit/Spigot/Paper | `/plugins/BanManager/config.yml` | | BungeeCord | `/plugins/BanManager/config.yml` | | Sponge | `/config/banmanager/config.yml` | +| Velocity | `/plugins/BanManager/config.yml` |
diff --git a/pages/docs/banmanager/configuration/console-yml.mdx b/pages/docs/banmanager/configuration/console-yml.mdx index 31a7c780..4e0b39b1 100644 --- a/pages/docs/banmanager/configuration/console-yml.mdx +++ b/pages/docs/banmanager/configuration/console-yml.mdx @@ -12,6 +12,7 @@ Defines properties to identify punishments issued via the console. | CraftBukkit/Spigot/Paper | `/plugins/BanManager/console.yml` | | BungeeCord | `/plugins/BanManager/console.yml` | | Sponge | `/config/banmanager/console.yml` | +| Velocity | `/plugins/BanManager/console.yml` | ###### `name` - The actor name of punishments issued by the console, e.g. X banned by diff --git a/pages/docs/banmanager/configuration/discord-yml.mdx b/pages/docs/banmanager/configuration/discord-yml.mdx index 45c947ef..7d0c5a32 100644 --- a/pages/docs/banmanager/configuration/discord-yml.mdx +++ b/pages/docs/banmanager/configuration/discord-yml.mdx @@ -12,6 +12,7 @@ Allows sending messages to Discord server channels when a punishment occurs. Buk | CraftBukkit/Spigot/Paper | `/plugins/BanManager/discord.yml` | | BungeeCord | Unsupported | | Sponge | `/config/banmanager/discord.yml` | +| Velocity | Unsupported |
diff --git a/pages/docs/banmanager/configuration/exemptions-yml.mdx b/pages/docs/banmanager/configuration/exemptions-yml.mdx index 2710776f..43a3bc09 100644 --- a/pages/docs/banmanager/configuration/exemptions-yml.mdx +++ b/pages/docs/banmanager/configuration/exemptions-yml.mdx @@ -12,6 +12,7 @@ Players listed here are exempt from certain punishments even when offline. This | CraftBukkit/Spigot/Paper | `/plugins/BanManager/exemptions.yml` | | BungeeCord | `/plugins/BanManager/exemptions.yml` | | Sponge | `/config/banmanager/exemptions.yml` | +| Velocity | `/plugins/BanManager/exemptions.yml` |
diff --git a/pages/docs/banmanager/configuration/geoip-yml.mdx b/pages/docs/banmanager/configuration/geoip-yml.mdx index 4605dcbb..d01e2358 100644 --- a/pages/docs/banmanager/configuration/geoip-yml.mdx +++ b/pages/docs/banmanager/configuration/geoip-yml.mdx @@ -14,6 +14,7 @@ Please note this now requires a license key from MaxMind. Please follow [these i | CraftBukkit/Spigot/Paper | `/plugins/BanManager/geoip.yml` | | BungeeCord | `/plugins/BanManager/geoip.yml` | | Sponge | `/config/banmanager/geoip.yml` | +| Velocity | `/plugins/BanManager/geoip.yml` |
diff --git a/pages/docs/banmanager/configuration/index.mdx b/pages/docs/banmanager/configuration/index.mdx index 750e3870..d7fdf4b2 100644 --- a/pages/docs/banmanager/configuration/index.mdx +++ b/pages/docs/banmanager/configuration/index.mdx @@ -14,6 +14,7 @@ The configuration files for BanManager can be found at the following locations: | CraftBukkit/Spigot/Paper | `/plugins/BanManager/` | | BungeeCord | `/plugins/BanManager/` | | Sponge | `/config/banmanager/` | +| Velocity | `/plugins/BanManager/` | ## Files - [config.yml](/docs/banmanager/configuration/config-yml) diff --git a/pages/docs/banmanager/configuration/messages-yml.mdx b/pages/docs/banmanager/configuration/messages-yml.mdx index 933a104c..d2e52274 100644 --- a/pages/docs/banmanager/configuration/messages-yml.mdx +++ b/pages/docs/banmanager/configuration/messages-yml.mdx @@ -16,6 +16,7 @@ Messages support [JSON](https://minecraft.fandom.com/wiki/Raw_JSON_text_format) | CraftBukkit/Spigot/Paper | `/plugins/BanManager/messages.yml` | | BungeeCord | `/plugins/BanManager/messages.yml` | | Sponge | `/config/banmanager/messages.yml` | +| Velocity | `/plugins/BanManager/messages.yml` |
diff --git a/pages/docs/banmanager/configuration/reasons-yml.mdx b/pages/docs/banmanager/configuration/reasons-yml.mdx index 70af4a0e..1fd1ebd8 100644 --- a/pages/docs/banmanager/configuration/reasons-yml.mdx +++ b/pages/docs/banmanager/configuration/reasons-yml.mdx @@ -14,6 +14,7 @@ You can combine multiple shortcuts or append/prepend them to reasons, e.g. `/ban | CraftBukkit/Spigot/Paper | `/plugins/BanManager/reasons.yml` | | BungeeCord | `/plugins/BanManager/reasons.yml` | | Sponge | `/config/banmanager/reasons.yml` | +| Velocity | `/plugins/BanManager/reasons.yml` |
diff --git a/pages/docs/banmanager/configuration/schedules-yml.mdx b/pages/docs/banmanager/configuration/schedules-yml.mdx index 53b1357b..b5a97d39 100644 --- a/pages/docs/banmanager/configuration/schedules-yml.mdx +++ b/pages/docs/banmanager/configuration/schedules-yml.mdx @@ -12,6 +12,7 @@ Controls how often data is synced between the database and Minecraft server to p | CraftBukkit/Spigot/Paper | `/plugins/BanManager/schedules.yml` | | BungeeCord | `/plugins/BanManager/schedules.yml` | | Sponge | `/config/banmanager/schedules.yml` | +| Velocity | `/plugins/BanManager/schedules.yml` |
diff --git a/pages/docs/banmanager/install-network.mdx b/pages/docs/banmanager/install-network.mdx index 0249bd12..b7036757 100644 --- a/pages/docs/banmanager/install-network.mdx +++ b/pages/docs/banmanager/install-network.mdx @@ -12,20 +12,20 @@ A full guide for installing, configuring and running BanManager for use on a Min --- -## Option 1 - BungeeCord -**Requirement:** you're using BungeeCord and would like punishments to be **shared across every Minecraft server** +## Option 1 - BungeeCord or Velocity +**Requirement:** you're using BungeeCord or Velocity and would like punishments to be **shared across every Minecraft server** ### Initial Setup -1. Download the BanManager BungeeCord jar from our [downloads page](/download) and save it in an easily accessible location -1. Copy the BanManager jar file to your BungeeCord proxy's `plugins` folder -1. Fully restart your BungeeCord proxy +1. Download the BanManager BungeeCord or Velocity jar from our [downloads page](/download) and save it in an easily accessible location +1. Copy the BanManager jar file to your proxy's `plugins` folder +1. Fully restart your proxy * This is required to generate the default configuration files and enable BanManager 1. Check your server logs to confirm BanManager enables correctly ## Option 2 - Alternative networks **Requirement:** you're using a proxy such as LilyPad and would like punishments to be **shared across every Minecraft server** -Currently only BungeeCord has first class support, however alternative networks such as LilyPad *are supported* by installing BanManager on each Minecraft instance (CraftBukkit/Spigot/Paper/Sponge) using the same shared database to sync data. +Currently only BungeeCord & Velocity have first class support, however alternative networks such as LilyPad *are supported* by installing BanManager on each Minecraft instance (CraftBukkit/Spigot/Paper/Sponge) using the same shared database to sync data. ### Prerequisites - MySQL or MariaDB diff --git a/pages/download.js b/pages/download.js index 051f8841..66e68ee3 100644 --- a/pages/download.js +++ b/pages/download.js @@ -61,7 +61,7 @@ function DownloadPage ({ release }) { Download -
+

{release.version}

{formatDistanceToNowStrict(new Date(release.publishedAt))} ago

@@ -69,9 +69,14 @@ function DownloadPage ({ release }) { {release.changelog.map((change, i) =>
  • {change}
  • )}
    - - - +
    +
    + + + + +
    +

    @@ -86,7 +91,7 @@ function DownloadPage ({ release }) { Demo
    diff --git a/public/images/velocity-logo.svg b/public/images/velocity-logo.svg new file mode 100644 index 00000000..07ee6287 --- /dev/null +++ b/public/images/velocity-logo.svg @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/sitemap.xml b/public/sitemap.xml index d505cbcb..c076cd3a 100644 --- a/public/sitemap.xml +++ b/public/sitemap.xml @@ -1,31 +1,31 @@ -https://banmanagement.comdaily0.72022-08-02T13:59:43.888Z -https://banmanagement.com/docsdaily0.72022-08-02T13:59:43.888Z -https://banmanagement.com/docs/banmanager/apidaily0.72022-08-02T13:59:43.888Z -https://banmanagement.com/docs/banmanager/commandsdaily0.72022-08-02T13:59:43.888Z -https://banmanagement.com/docs/banmanager/config-builderdaily0.72022-08-02T13:59:43.888Z -https://banmanagement.com/docs/banmanager/configurationdaily0.72022-08-02T13:59:43.888Z -https://banmanagement.com/docs/banmanager/configuration/config-ymldaily0.72022-08-02T13:59:43.888Z -https://banmanagement.com/docs/banmanager/configuration/console-ymldaily0.72022-08-02T13:59:43.888Z -https://banmanagement.com/docs/banmanager/configuration/discord-ymldaily0.72022-08-02T13:59:43.888Z -https://banmanagement.com/docs/banmanager/configuration/exemptions-ymldaily0.72022-08-02T13:59:43.888Z -https://banmanagement.com/docs/banmanager/configuration/geoip-ymldaily0.72022-08-02T13:59:43.888Z -https://banmanagement.com/docs/banmanager/configuration/messages-ymldaily0.72022-08-02T13:59:43.888Z -https://banmanagement.com/docs/banmanager/configuration/reasons-ymldaily0.72022-08-02T13:59:43.888Z -https://banmanagement.com/docs/banmanager/configuration/schedules-ymldaily0.72022-08-02T13:59:43.888Z -https://banmanagement.com/docs/banmanager/faqdaily0.72022-08-02T13:59:43.888Z -https://banmanagement.com/docs/banmanager/installdaily0.72022-08-02T13:59:43.888Z -https://banmanagement.com/docs/banmanager/install-networkdaily0.72022-08-02T13:59:43.888Z -https://banmanagement.com/docs/banmanager/migrationsdaily0.72022-08-02T13:59:43.888Z -https://banmanagement.com/docs/banmanager/migrations/advancedbandaily0.72022-08-02T13:59:43.888Z -https://banmanagement.com/docs/banmanager/migrations/h2daily0.72022-08-02T13:59:43.888Z -https://banmanagement.com/docs/banmanager/migrations/minecraft-java-editiondaily0.72022-08-02T13:59:43.888Z -https://banmanagement.com/docs/banmanager/permissionsdaily0.72022-08-02T13:59:43.888Z -https://banmanagement.com/docs/banmanager/placeholdersdaily0.72022-08-02T13:59:43.888Z -https://banmanagement.com/docs/banmanager/storage-typesdaily0.72022-08-02T13:59:43.888Z -https://banmanagement.com/docs/webui/installdaily0.72022-08-02T13:59:43.888Z -https://banmanagement.com/docs/webui/updatedaily0.72022-08-02T13:59:43.888Z -https://banmanagement.com/downloaddaily0.72022-08-02T13:59:43.888Z -https://banmanagement.com/supportdaily0.72022-08-02T13:59:43.888Z +https://banmanagement.comdaily0.72024-06-06T16:44:25.810Z +https://banmanagement.com/docsdaily0.72024-06-06T16:44:25.810Z +https://banmanagement.com/docs/banmanager/apidaily0.72024-06-06T16:44:25.810Z +https://banmanagement.com/docs/banmanager/commandsdaily0.72024-06-06T16:44:25.810Z +https://banmanagement.com/docs/banmanager/config-builderdaily0.72024-06-06T16:44:25.810Z +https://banmanagement.com/docs/banmanager/configurationdaily0.72024-06-06T16:44:25.810Z +https://banmanagement.com/docs/banmanager/configuration/config-ymldaily0.72024-06-06T16:44:25.810Z +https://banmanagement.com/docs/banmanager/configuration/console-ymldaily0.72024-06-06T16:44:25.810Z +https://banmanagement.com/docs/banmanager/configuration/discord-ymldaily0.72024-06-06T16:44:25.810Z +https://banmanagement.com/docs/banmanager/configuration/exemptions-ymldaily0.72024-06-06T16:44:25.811Z +https://banmanagement.com/docs/banmanager/configuration/geoip-ymldaily0.72024-06-06T16:44:25.811Z +https://banmanagement.com/docs/banmanager/configuration/messages-ymldaily0.72024-06-06T16:44:25.811Z +https://banmanagement.com/docs/banmanager/configuration/reasons-ymldaily0.72024-06-06T16:44:25.811Z +https://banmanagement.com/docs/banmanager/configuration/schedules-ymldaily0.72024-06-06T16:44:25.811Z +https://banmanagement.com/docs/banmanager/faqdaily0.72024-06-06T16:44:25.811Z +https://banmanagement.com/docs/banmanager/installdaily0.72024-06-06T16:44:25.811Z +https://banmanagement.com/docs/banmanager/install-networkdaily0.72024-06-06T16:44:25.811Z +https://banmanagement.com/docs/banmanager/migrationsdaily0.72024-06-06T16:44:25.811Z +https://banmanagement.com/docs/banmanager/migrations/advancedbandaily0.72024-06-06T16:44:25.811Z +https://banmanagement.com/docs/banmanager/migrations/h2daily0.72024-06-06T16:44:25.811Z +https://banmanagement.com/docs/banmanager/migrations/minecraft-java-editiondaily0.72024-06-06T16:44:25.811Z +https://banmanagement.com/docs/banmanager/permissionsdaily0.72024-06-06T16:44:25.811Z +https://banmanagement.com/docs/banmanager/placeholdersdaily0.72024-06-06T16:44:25.811Z +https://banmanagement.com/docs/banmanager/storage-typesdaily0.72024-06-06T16:44:25.811Z +https://banmanagement.com/docs/webui/installdaily0.72024-06-06T16:44:25.811Z +https://banmanagement.com/docs/webui/updatedaily0.72024-06-06T16:44:25.811Z +https://banmanagement.com/downloaddaily0.72024-06-06T16:44:25.811Z +https://banmanagement.com/supportdaily0.72024-06-06T16:44:25.811Z \ No newline at end of file