Skip to content

Commit

Permalink
feat: added Fabric
Browse files Browse the repository at this point in the history
  • Loading branch information
confuser committed Jan 5, 2025
1 parent 0279508 commit 2534cfb
Show file tree
Hide file tree
Showing 20 changed files with 69 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ 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',
Fabric: 'https://modrinth.com/mod/banmanager',
Velocity: 'https://ci.frostcast.net/job/BanManager/lastSuccessfulBuild/artifact/velocity/build/libs/BanManagerVelocity.jar'
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ export const machine = createMachine({
target: 'storageType',
actions: setContext('serverType')
},
Fabric: {
target: 'storageType',
actions: setContext('serverType')
},
Sponge: {
target: 'storageType',
actions: setContext('serverType')
Expand Down
11 changes: 5 additions & 6 deletions components/pages/docs/banmanager/developers/get-static-props.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import semverRsort from 'semver/functions/rsort'

async function getLatestRelease (type) {
const res = await fetch('https://ci.frostcast.net/plugin/repository/everything/me/confuser/banmanager/' + type + '/')
const res = await fetch('https://raw.githubusercontent.com/BanManagement/BanManager/refs/heads/master/gradle.properties')
const text = await res.text()
const versions = [...text.matchAll(/<A href='.*?'>(.*?)<\/A>/g)].map(a => a[1])
const latest = semverRsort(versions)[0]
const versionMatch = text.match(/version=(.*)/)
const latest = versionMatch ? versionMatch[1] : null

return latest
}
Expand All @@ -26,6 +24,7 @@ export async function getStaticProps () {
bukkit: await getLatestRelease('BanManagerBukkit'),
bungeecord: await getLatestRelease('BanManagerBungeeCord'),
common: await getLatestRelease('BanManagerCommon'),
fabric: await getLatestRelease('BanManagerCommon'),
sponge: await getLatestRelease('BanManagerSponge')
}

Expand All @@ -36,6 +35,6 @@ export async function getStaticProps () {
versions,
events: await getEvents()
},
revalidate: 3600 // Cache for an hour
revalidate: 86400 // Cache for a day
}
}
1 change: 0 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
"react-table": "7.8.0",
"rehype-autolink-headings": "5.1.0",
"rehype-highlight": "4.1.0",
"semver": "7.6.3",
"tailwind-heropatterns": "0.0.8",
"tailwindcss": "2.2.19",
"unist-util-visit": "2.0.3",
Expand Down
11 changes: 11 additions & 0 deletions pages/docs/banmanager/api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,17 @@ To make use of BanManager's API, simply add the relevant build as a Maven depend
</dependencies>`}
</Code>

#### Fabric
<Code>{`<dependencies>
<dependency>
<groupId>me.confuser.banmanager</groupId>
<artifactId>BanManagerFabric</artifactId>
<version>${props.versions.fabric}</version>
<scope>provided</scope>
</dependency>
</dependencies>`}
</Code>

#### Sponge
<Code>{`<dependencies>
<dependency>
Expand Down
1 change: 1 addition & 0 deletions pages/docs/banmanager/configuration/config-yml.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ The main configuration file for BanManager.
| -------- | -------- |
| CraftBukkit/Spigot/Paper | `/plugins/BanManager/config.yml` |
| BungeeCord | `/plugins/BanManager/config.yml` |
| Fabric | `/config/banmanager/config.yml` |
| Sponge | `/config/banmanager/config.yml` |
| Velocity | `/plugins/BanManager/config.yml` |

Expand Down
1 change: 1 addition & 0 deletions pages/docs/banmanager/configuration/console-yml.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Defines properties to identify punishments issued via the console.
| -------- | -------- |
| CraftBukkit/Spigot/Paper | `/plugins/BanManager/console.yml` |
| BungeeCord | `/plugins/BanManager/console.yml` |
| Fabric | `/config/banmanager/console.yml` |
| Sponge | `/config/banmanager/console.yml` |
| Velocity | `/plugins/BanManager/console.yml` |

Expand Down
1 change: 1 addition & 0 deletions pages/docs/banmanager/configuration/discord-yml.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Allows sending messages to Discord server channels when a punishment occurs via
| -------- | -------- |
| CraftBukkit/Spigot/Paper | `/plugins/BanManager/discord.yml` |
| BungeeCord | `/plugins/BanManager/discord.yml` |
| Fabric | `/config/banmanager/discord.yml` |
| Sponge | `/config/banmanager/discord.yml` |
| Velocity | `/plugins/BanManager/discord.yml` |

Expand Down
1 change: 1 addition & 0 deletions pages/docs/banmanager/configuration/exemptions-yml.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,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` |
| Fabric | `/config/banmanager/exemptions.yml` |
| Sponge | `/config/banmanager/exemptions.yml` |
| Velocity | `/plugins/BanManager/exemptions.yml` |

Expand Down
1 change: 1 addition & 0 deletions pages/docs/banmanager/configuration/geoip-yml.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,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` |
| Fabric | `/config/banmanager/geoip.yml` |
| Sponge | `/config/banmanager/geoip.yml` |
| Velocity | `/plugins/BanManager/geoip.yml` |

Expand Down
1 change: 1 addition & 0 deletions pages/docs/banmanager/configuration/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ The configuration files for BanManager can be found at the following locations:
| -------- | -------- |
| CraftBukkit/Spigot/Paper | `/plugins/BanManager/` |
| BungeeCord | `/plugins/BanManager/` |
| Fabric | `/config/banmanager/` |
| Sponge | `/config/banmanager/` |
| Velocity | `/plugins/BanManager/` |

Expand Down
1 change: 1 addition & 0 deletions pages/docs/banmanager/configuration/messages-yml.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,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` |
| Fabric | `/config/banmanager/messages.yml` |
| Sponge | `/config/banmanager/messages.yml` |
| Velocity | `/plugins/BanManager/messages.yml` |

Expand Down
1 change: 1 addition & 0 deletions pages/docs/banmanager/configuration/reasons-yml.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,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` |
| Fabric | `/config/banmanager/reasons.yml` |
| Sponge | `/config/banmanager/reasons.yml` |
| Velocity | `/plugins/BanManager/reasons.yml` |

Expand Down
1 change: 1 addition & 0 deletions pages/docs/banmanager/configuration/schedules-yml.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,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` |
| Fabric | `/config/banmanager/schedules.yml` |
| Sponge | `/config/banmanager/schedules.yml` |
| Velocity | `/plugins/BanManager/schedules.yml` |

Expand Down
6 changes: 4 additions & 2 deletions pages/docs/banmanager/install-network.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ A full guide for installing, configuring and running BanManager for use on a Min
## Option 1 - BungeeCord or Velocity
**Requirement:** you're using BungeeCord or Velocity and would like punishments to be **shared across every Minecraft server**

Note: Report functionality is not available on the proxy plugin versions

### Initial Setup
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
Expand All @@ -25,14 +27,14 @@ A full guide for installing, configuring and running BanManager for use on a Min
## 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 & 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.
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/Fabric/Sponge) using the same shared database to sync data.

### Prerequisites
- MySQL or MariaDB

### Setup
1. Download the BanManager jar from our [downloads page](/download) and save it in an easily accessible location
1. Copy the BanManager jar file to your server `plugins` folder (CraftBukkit/Spigot/Paper) or `mods` folder (Sponge)
1. Copy the BanManager jar file to your server `plugins` folder (CraftBukkit/Spigot/Paper) or `mods` folder (Fabric/Sponge)
1. Fully restart your minecraft server
* This is required to generate the default configuration files
1. Open `config.yml`, find `databases` and under the `local` section, set `storageType` to `mysql` or `mariadb`. Then populate `host`, `name`, `user` & `password` with your connection details.
Expand Down
6 changes: 4 additions & 2 deletions pages/docs/banmanager/install.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@ A full guide for installing, configuring and running BanManager for use in produ

## Prerequisites
- Java 8+
- [CraftBukkit/Spigot/Paper](https://www.spigotmc.org/wiki/buildtools/) or [Sponge](https://www.spongepowered.org/downloads/) for Minecraft 1.7.2+
- [CraftBukkit/Spigot/Paper](https://www.spigotmc.org/wiki/buildtools/) or [Sponge](https://www.spongepowered.org/downloads/) for Minecraft 1.7.2+
- Java 21+
- [Fabric](https://fabricmc.net/use/installer/) for Minecraft 1.21+

---

## Initial Setup
1. Download the BanManager jar from our [downloads page](/download) and save it in an easily accessible location
* If you're not sure which version you need, try our [configuration builder](/docs/banmanager/config-builder)
1. Copy the BanManager jar file to your server `plugins` folder (CraftBukkit/Spigot/Paper) or `mods` folder (Sponge)
1. Copy the BanManager jar file to your server `plugins` folder (CraftBukkit/Spigot/Paper) or `mods` folder (Fabric/Sponge)
1. Fully restart your minecraft server
* This is required to generate the default configuration files
1. Check your server logs to confirm BanManager enables correctly
Expand Down
3 changes: 2 additions & 1 deletion pages/download.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,10 @@ function DownloadPage ({ release }) {
</ul>
</div>
<div className="lg:col-span-4">
<div className="grid lg:grid-cols-2">
<div className="grid lg:grid-cols-3">
<DownloadCard title="Bukkit" description="CraftBukkit/Spigot/Paper etc, 1.7.2+" imgSrc="/images/bukkit-logo.png" stableUrl={release.downloadUrls.bukkit} experimentalUrl="https://ci.frostcast.net/job/BanManager/lastSuccessfulBuild/artifact/bukkit/build/libs/BanManagerBukkit.jar" />
<DownloadCard title="BungeeCord" description="Latest build" imgSrc="/images/bungeecord-logo.png" stableUrl={release.downloadUrls.bungeecord} experimentalUrl="https://ci.frostcast.net/job/BanManager/lastSuccessfulBuild/artifact/bungee/build/libs/BanManagerBungeeCord.jar" />
<DownloadCard title="Fabric" description="Latest build" imgSrc="/images/fabric-logo.svg" stableUrl={release.downloadUrls.fabric} experimentalUrl="https://ci.frostcast.net/job/BanManager/lastSuccessfulBuild/artifact/fabric/build/libs/BanManagerFabric.jar" showDisabledDownload />
<DownloadCard title="Sponge" description="Sponge Forge/Sponge Vanilla API 7+" imgSrc="/images/sponge-logo.svg" stableUrl={release.downloadUrls.sponge} experimentalUrl="https://ci.frostcast.net/job/BanManager/lastSuccessfulBuild/artifact/sponge/build/libs/BanManagerSponge.jar" />
<DownloadCard title="Velocity" description="Latest build" imgSrc="/images/velocity-logo.svg" stableUrl={release.downloadUrls.velocity} experimentalUrl="https://ci.frostcast.net/job/BanManager/lastSuccessfulBuild/artifact/velocity/build/libs/BanManagerVelocity.jar" showDisabledDownload />
</div>
Expand Down
1 change: 1 addition & 0 deletions public/images/fabric-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 2534cfb

Please sign in to comment.