mirror of
https://github.com/colbster937/originblacklist.git
synced 2025-06-07 16:24:48 +00:00
Compare commits
30 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
1a22788630 | ||
|
cf0481fb58 | ||
|
f8ea6d5bfd | ||
|
8d5e5d688b | ||
|
2648377276 | ||
|
16953bc708 | ||
|
0f80dded63 | ||
|
af478adb3b | ||
|
8dbd01f016 | ||
|
71ad3059cc | ||
|
c5a2b1002f | ||
|
4d0f0542ca | ||
|
5453ed0280 | ||
|
47ab6554c4 | ||
|
c076d48e06 | ||
|
a0ab221ff7 | ||
|
ec6f618971 | ||
|
a417fa7281 | ||
|
c62cdb8a7e | ||
|
c33107030a | ||
|
7af25a04e4 | ||
|
69950dc4c5 | ||
|
662c9b0041 | ||
|
80f5ab62b3 | ||
|
44a0bce586 | ||
|
80ac845cb5 | ||
|
fafd02b7a1 | ||
|
1c008bdd57 | ||
|
e2ec629d8c | ||
|
1e55bc0ecd |
76
.github/workflows/build.yml
vendored
Normal file
76
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
name: Build Plugin
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Java
|
||||||
|
uses: actions/setup-java@v4
|
||||||
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: '17'
|
||||||
|
|
||||||
|
- name: Build Jar
|
||||||
|
run: |
|
||||||
|
gradle wrapper
|
||||||
|
./gradlew shadowJar
|
||||||
|
|
||||||
|
- name: Publish Jar
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: OriginBlacklist
|
||||||
|
path: build/libs/OriginBlacklist.jar
|
||||||
|
|
||||||
|
- name: Extract Version
|
||||||
|
id: version
|
||||||
|
run: |
|
||||||
|
VERSION=$(grep "^version" build.gradle | head -n 1 | cut -d\' -f2)
|
||||||
|
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
- name: Remove Existing Release
|
||||||
|
run: |
|
||||||
|
gh release delete v${{ steps.version.outputs.version }} -y || true
|
||||||
|
git push origin :refs/tags/v${{ steps.version.outputs.version }} || true
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Create Release
|
||||||
|
id: create_release
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
with:
|
||||||
|
tag_name: v${{ steps.version.outputs.version }}
|
||||||
|
name: ${{ steps.version.outputs.version }}
|
||||||
|
draft: false
|
||||||
|
prerelease: false
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- uses: actions/upload-release-asset@v1.0.1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
|
asset_path: ./build/libs/OriginBlacklist.jar
|
||||||
|
asset_name: OriginBlacklist_${{ steps.version.outputs.version }}.jar
|
||||||
|
asset_content_type: application/java-archive
|
||||||
|
|
||||||
|
- uses: eregon/publish-release@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
release_id: ${{ steps.create_release.outputs.id }}
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,7 +1,9 @@
|
|||||||
**/.DS_Store
|
**/.DS_Store
|
||||||
.idea
|
.idea
|
||||||
.gradle
|
.gradle
|
||||||
|
gradle
|
||||||
build
|
build
|
||||||
run
|
run
|
||||||
|
bin
|
||||||
gradlew
|
gradlew
|
||||||
gradlew.bat
|
gradlew.bat
|
@ -8,6 +8,7 @@ basically just a reimplementation of originblacklist but for eaglerxserver
|
|||||||
### Features
|
### Features
|
||||||
- [x] Origin Blacklisting
|
- [x] Origin Blacklisting
|
||||||
- [x] Brand Blacklisting
|
- [x] Brand Blacklisting
|
||||||
|
- [x] Username blacklisting
|
||||||
- [x] Custom kick message
|
- [x] Custom kick message
|
||||||
- [x] Custom blacklist MOTD
|
- [x] Custom blacklist MOTD
|
||||||
- [x] MiniMessage formatting for messages
|
- [x] MiniMessage formatting for messages
|
||||||
@ -15,16 +16,18 @@ basically just a reimplementation of originblacklist but for eaglerxserver
|
|||||||
<br>_<sub><span style="color:gray">Bungee and Bukkit are should work, but have bugs.</span></sub>_
|
<br>_<sub><span style="color:gray">Bungee and Bukkit are should work, but have bugs.</span></sub>_
|
||||||
- [x] Send blacklists to a discord webhook
|
- [x] Send blacklists to a discord webhook
|
||||||
- [ ] Blacklist subscription URLs
|
- [ ] Blacklist subscription URLs
|
||||||
|
- [ ] Simple blacklist command
|
||||||
- [ ] Blacklist -> Whitelist
|
- [ ] Blacklist -> Whitelist
|
||||||
- [ ] IP blacklisting
|
- [ ] IP blacklisting
|
||||||
|
- [ ] Update system
|
||||||
|
|
||||||
### Download
|
### Download
|
||||||
**[https://github.com/colbster937/originblacklist/releases](https://github.com/colbster937/originblacklist/releases)**
|
**[https://github.com/colbster937/originblacklist/releases/latest/](https://github.com/colbster937/originblacklist/releases/latest/)**
|
||||||
|
|
||||||
### Building
|
### Building
|
||||||
```
|
```
|
||||||
$ git clone https://github.com/colbster937/originblacklist.git
|
$ git clone https://github.com/colbster937/originblacklist.git
|
||||||
$ cd originblacklist
|
$ cd originblacklist
|
||||||
$ gradle wrapper
|
$ gradle wrapper
|
||||||
$ ./gradle.<bat|sh> shadowJar
|
$ ./gradlew shadowJar
|
||||||
```
|
```
|
||||||
|
39
build.gradle
39
build.gradle
@ -8,7 +8,9 @@ plugins {
|
|||||||
|
|
||||||
|
|
||||||
group = 'dev.colbster937'
|
group = 'dev.colbster937'
|
||||||
version = '1.0.1'
|
version = '1.0.6'
|
||||||
|
description = 'A reimplementation of OriginBlacklist for EaglerXServer'
|
||||||
|
def targetJavaVersion = 17
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
@ -47,47 +49,36 @@ dependencies {
|
|||||||
compileOnly("net.lax1dude.eaglercraft.backend:api-bungee:1.0.0")
|
compileOnly("net.lax1dude.eaglercraft.backend:api-bungee:1.0.0")
|
||||||
compileOnly("net.lax1dude.eaglercraft.backend:api-bukkit:1.0.0")
|
compileOnly("net.lax1dude.eaglercraft.backend:api-bukkit:1.0.0")
|
||||||
implementation("org.yaml:snakeyaml:2.2")
|
implementation("org.yaml:snakeyaml:2.2")
|
||||||
implementation("net.kyori:adventure-api:4.20.0")
|
|
||||||
implementation("net.kyori:adventure-text-serializer-legacy:4.20.0")
|
implementation("net.kyori:adventure-text-serializer-legacy:4.20.0")
|
||||||
implementation("net.kyori:adventure-text-minimessage:4.20.0")
|
implementation("net.kyori:adventure-text-minimessage:4.20.0")
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
runVelocity {
|
runVelocity {
|
||||||
// Configure the Velocity version for our task.
|
|
||||||
// This is the only required configuration besides applying the plugin.
|
|
||||||
// Your plugin's jar (or shadowJar if present) will be used automatically.
|
|
||||||
velocityVersion("3.3.0-SNAPSHOT")
|
velocityVersion("3.3.0-SNAPSHOT")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def targetJavaVersion = 17
|
|
||||||
java {
|
java {
|
||||||
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
|
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
processResources {
|
||||||
|
filesMatching(['plugin.yml', 'bungee.yml', 'velocity-plugin.json', 'Base.java']) {
|
||||||
|
expand(
|
||||||
|
version: project.version,
|
||||||
|
description: project.description
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
shadowJar {
|
shadowJar {
|
||||||
relocate 'org.yaml.snakeyaml', 'dev.colbster937.shaded.snakeyaml'
|
relocate 'org.yaml.snakeyaml', 'dev.colbster937.shaded.snakeyaml'
|
||||||
archiveClassifier.set('all')
|
archiveVersion.set('')
|
||||||
|
archiveClassifier.set('')
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType(JavaCompile).configureEach {
|
tasks.withType(JavaCompile).configureEach {
|
||||||
options.encoding = 'UTF-8'
|
options.encoding = 'UTF-8'
|
||||||
options.release.set(targetJavaVersion)
|
options.release.set(targetJavaVersion)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*def templateSource = file('src/main/templates')
|
|
||||||
def templateDest = layout.buildDirectory.dir('generated/sources/templates')
|
|
||||||
def generateTemplates = tasks.register('generateTemplates', Copy) { task ->
|
|
||||||
def props = ['version': project.version]
|
|
||||||
task.inputs.properties props
|
|
||||||
|
|
||||||
task.from templateSource
|
|
||||||
task.into templateDest
|
|
||||||
task.expand props
|
|
||||||
}
|
|
||||||
|
|
||||||
sourceSets.main.java.srcDir(generateTemplates.map { it.outputs })
|
|
||||||
|
|
||||||
project.idea.project.settings.taskTriggers.afterSync generateTemplates
|
|
||||||
project.eclipse.synchronizationTasks(generateTemplates)*/
|
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
7
gradle/wrapper/gradle-wrapper.properties
vendored
7
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,7 +0,0 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
|
||||||
distributionPath=wrapper/dists
|
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
|
|
||||||
networkTimeout=10000
|
|
||||||
validateDistributionUrl=true
|
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
|
||||||
zipStorePath=wrapper/dists
|
|
@ -1,25 +1,22 @@
|
|||||||
package dev.colbster937.originblacklist.base;
|
package dev.colbster937.originblacklist.base;
|
||||||
|
|
||||||
|
import net.kyori.adventure.text.Component;
|
||||||
import net.kyori.adventure.text.minimessage.MiniMessage;
|
import net.kyori.adventure.text.minimessage.MiniMessage;
|
||||||
import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
|
import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
|
||||||
import net.lax1dude.eaglercraft.backend.server.api.IEaglerXServerAPI;
|
import net.lax1dude.eaglercraft.backend.server.api.*;
|
||||||
import net.lax1dude.eaglercraft.backend.server.api.IEaglerPlayer;
|
import net.lax1dude.eaglercraft.backend.server.api.event.IEaglercraftLoginEvent;
|
||||||
import net.lax1dude.eaglercraft.backend.server.api.EnumWebSocketHeader;
|
|
||||||
import net.lax1dude.eaglercraft.backend.server.api.event.IEaglercraftInitializePlayerEvent;
|
|
||||||
import net.lax1dude.eaglercraft.backend.server.api.event.IEaglercraftMOTDEvent;
|
import net.lax1dude.eaglercraft.backend.server.api.event.IEaglercraftMOTDEvent;
|
||||||
import net.lax1dude.eaglercraft.backend.server.api.query.IMOTDConnection;
|
import net.lax1dude.eaglercraft.backend.server.api.query.IMOTDConnection;
|
||||||
|
|
||||||
import java.io.InputStream;
|
|
||||||
import java.io.OutputStream;
|
|
||||||
import java.net.HttpURLConnection;
|
|
||||||
import javax.imageio.ImageIO;
|
import javax.imageio.ImageIO;
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import java.io.File;
|
import java.io.*;
|
||||||
import java.io.IOException;
|
import java.net.HttpURLConnection;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.StandardCopyOption;
|
import java.nio.file.StandardCopyOption;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.concurrent.CompletableFuture;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
public class Base {
|
public class Base {
|
||||||
@ -35,42 +32,81 @@ public class Base {
|
|||||||
api = api1;
|
api = api1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String apiVer = "1.0.2";
|
||||||
|
|
||||||
|
public static boolean checkVer(String v1, String v2) {
|
||||||
|
String[] c = v1.split("\\.");
|
||||||
|
String[] r = v2.split("\\.");
|
||||||
|
for (int i = 0; i < Math.max(c.length, r.length); i++) {
|
||||||
|
int c1 = i < c.length ? Integer.parseInt(c[i]) : 0;
|
||||||
|
int r1 = i < r.length ? Integer.parseInt(r[i]) : 0;
|
||||||
|
if (c1 < r1)
|
||||||
|
return false;
|
||||||
|
if (c1 > r1)
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
public static LoggerAdapter getLogger() {
|
public static LoggerAdapter getLogger() {
|
||||||
if (adapter == null) throw new IllegalStateException("Logger not initialized!");
|
if (adapter == null)
|
||||||
|
throw new IllegalStateException("Logger not initialized!");
|
||||||
return adapter;
|
return adapter;
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface LoggerAdapter {
|
public interface LoggerAdapter {
|
||||||
void info(String msg);
|
void info(String msg);
|
||||||
|
|
||||||
void warn(String msg);
|
void warn(String msg);
|
||||||
|
|
||||||
void error(String msg);
|
void error(String msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void handleConnection(IEaglercraftInitializePlayerEvent e) {
|
public static void handleConnection(IEaglercraftLoginEvent e) {
|
||||||
IEaglerPlayer plr = e.getPlayer();
|
IEaglerLoginConnection conn = e.getLoginConnection();
|
||||||
String origin = plr.getWebSocketHeader(EnumWebSocketHeader.HEADER_ORIGIN);
|
String origin = conn.getWebSocketHeader(EnumWebSocketHeader.HEADER_ORIGIN);
|
||||||
String brand = plr.getEaglerBrandString();
|
String brand = conn.getEaglerBrandString();
|
||||||
if ((origin != "null" || origin != null) && !config.blacklist.missing_origin) {
|
String name = conn.getUsername();
|
||||||
|
|
||||||
|
if (origin != null && !origin.equals("null")) {
|
||||||
for (String origin1 : config.blacklist.origins) {
|
for (String origin1 : config.blacklist.origins) {
|
||||||
if (matches(origin, origin1)) {
|
if (matches(origin, origin1)) {
|
||||||
plr.disconnect(kick("origin", "website", origin));
|
setKick(e, formatKickMessage("origin", "website", origin, conn.getWebSocketHost()));
|
||||||
webhook(plr, origin, brand, "origin");
|
webhook(conn, origin, brand, "origin");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
plr.disconnect(kick("origin", "website", origin));
|
|
||||||
webhook(plr, "null", brand, "origin");
|
|
||||||
}
|
}
|
||||||
if (brand != "null" && brand != null) {
|
|
||||||
|
if (brand != null && !brand.equals("null")) {
|
||||||
for (String brand1 : config.blacklist.brands) {
|
for (String brand1 : config.blacklist.brands) {
|
||||||
if (matches(brand, brand1)) {
|
if (matches(brand, brand1)) {
|
||||||
plr.disconnect(kick("brand", "client", brand));
|
setKick(e, formatKickMessage("brand", "client", brand, conn.getWebSocketHost()));
|
||||||
webhook(plr, origin, brand, "brand");
|
webhook(conn, origin, brand, "brand");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (name != null && !name.equals("null")) {
|
||||||
|
for (String name1 : config.blacklist.players) {
|
||||||
|
if (matches(name, name1) || (name.length() > 16 || name.length() < 3)) {
|
||||||
|
setKick(e, formatKickMessage("player", "username", name, conn.getWebSocketHost()));
|
||||||
|
webhook(conn, origin, name, "player");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setKick(IEaglercraftLoginEvent e, Component msg) {
|
||||||
|
try {
|
||||||
|
getLogger().info("Kicked " + e.getProfileUsername());
|
||||||
|
e.setKickMessage(msg);
|
||||||
|
} catch (Throwable ignored) {
|
||||||
|
String msg1 = LegacyComponentSerializer.legacySection().serialize(msg);
|
||||||
|
e.setKickMessage(msg1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void handleMOTD(IEaglercraftMOTDEvent e) {
|
public static void handleMOTD(IEaglercraftMOTDEvent e) {
|
||||||
@ -79,20 +115,22 @@ public class Base {
|
|||||||
String origin = conn.getWebSocketHeader(EnumWebSocketHeader.HEADER_ORIGIN);
|
String origin = conn.getWebSocketHeader(EnumWebSocketHeader.HEADER_ORIGIN);
|
||||||
List<String> m = List.of(config.messages.motd.text.split("\n")).stream()
|
List<String> m = List.of(config.messages.motd.text.split("\n")).stream()
|
||||||
.map(line -> line
|
.map(line -> line
|
||||||
.replace("%blocktype%", "origin")
|
.replaceAll("%blocktype%", "origin")
|
||||||
.replace("%easyblocktype%", "website")
|
.replaceAll("%easyblocktype%", "website")
|
||||||
.replace("%blocked%", origin))
|
.replaceAll("%blocked%", origin)
|
||||||
.map(line -> LegacyComponentSerializer.legacySection()
|
.replaceAll("%host%", conn.getWebSocketHost()))
|
||||||
.serialize(MiniMessage.miniMessage().deserialize(line)))
|
.map(line -> LegacyComponentSerializer.legacySection().serialize(
|
||||||
|
MiniMessage.miniMessage().deserialize(line)))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
if ((origin != "null" || origin != null) && !config.blacklist.missing_origin) {
|
|
||||||
|
if (origin != null && !origin.equals("null")) {
|
||||||
for (String origin1 : config.blacklist.origins) {
|
for (String origin1 : config.blacklist.origins) {
|
||||||
if (matches(origin, origin1)) {
|
if (matches(origin, origin1)) {
|
||||||
setMOTD(conn, m);
|
setMOTD(conn, m);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else if (origin != null && !origin.equals("null")) {
|
||||||
setMOTD(conn, m);
|
setMOTD(conn, m);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -103,13 +141,15 @@ public class Base {
|
|||||||
conn.setPlayerTotal(0);
|
conn.setPlayerTotal(0);
|
||||||
conn.setPlayerMax(0);
|
conn.setPlayerMax(0);
|
||||||
conn.setPlayerList(List.of());
|
conn.setPlayerList(List.of());
|
||||||
if (config.messages.motd.icon != null && !config.messages.motd.icon.isEmpty())
|
|
||||||
|
if (config.messages.motd.icon != null && !config.messages.motd.icon.isEmpty()) {
|
||||||
try {
|
try {
|
||||||
BufferedImage img = ImageIO.read(new File(config.messages.motd.icon));
|
BufferedImage img = ImageIO.read(new File(config.messages.motd.icon));
|
||||||
if (img.getWidth() != 64 || img.getHeight() != 64) {
|
if (img.getWidth() != 64 || img.getHeight() != 64) {
|
||||||
getLogger().warn("Icon must be 64x64");
|
getLogger().warn("Icon must be 64x64");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
byte[] bytes = new byte[64 * 64 * 4];
|
byte[] bytes = new byte[64 * 64 * 4];
|
||||||
for (int y = 0; y < 64; y++) {
|
for (int y = 0; y < 64; y++) {
|
||||||
for (int x = 0; x < 64; x++) {
|
for (int x = 0; x < 64; x++) {
|
||||||
@ -125,64 +165,74 @@ public class Base {
|
|||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
getLogger().error(ex.toString());
|
getLogger().error(ex.toString());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean matches(String text1, String text2) {
|
public static boolean matches(String text1, String text2) {
|
||||||
return text1.toLowerCase().matches(text2.replace(".", "\\.").replaceAll("\\*", ".*").toLowerCase());
|
return text1.toLowerCase().matches(text2.replace(".", "\\.").replaceAll("\\*", ".*").toLowerCase());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String kick(String type, String easytype, String value) {
|
public static Component formatKickMessage(String type, String easytype, String value, String host) {
|
||||||
return LegacyComponentSerializer.legacySection().serialize(
|
String help = "";
|
||||||
MiniMessage.miniMessage().deserialize(
|
if (type != "player") {
|
||||||
config.messages.kick
|
help = config.messages.help.generic;
|
||||||
.replace("%blocktype%", type)
|
} else {
|
||||||
.replace("%easyblocktype%", easytype)
|
help = config.messages.help.player;
|
||||||
.replace("%blocked%", value)
|
}
|
||||||
)
|
return MiniMessage.miniMessage().deserialize(
|
||||||
);
|
config.messages.kick
|
||||||
|
.replaceAll("%help%", help)
|
||||||
|
.replaceAll("%blocktype%", type)
|
||||||
|
.replaceAll("%easyblocktype%", easytype)
|
||||||
|
.replaceAll("%blocked%", value)
|
||||||
|
.replaceAll("%host%", host));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void webhook(IEaglerLoginConnection plr, String origin, String brand, String type) {
|
||||||
public static void webhook(IEaglerPlayer plr, String origin, String brand, String type) {
|
|
||||||
String webhook = config.discord.webhook;
|
String webhook = config.discord.webhook;
|
||||||
if (webhook == null || webhook.isBlank()) return;
|
if (webhook == null || webhook.isBlank())
|
||||||
|
return;
|
||||||
|
|
||||||
String addr = plr.getPlayerAddress() != null ? plr.getPlayerAddress().toString().substring(1) : "undefined";
|
CompletableFuture.runAsync(() -> {
|
||||||
String protocol = plr.isEaglerXRewindPlayer()
|
String addr = (plr.getPlayerAddress() != null ? plr.getPlayerAddress().toString().substring(1) : "undefined:undefined").split(":")[0];
|
||||||
? (String.valueOf(plr.getRewindProtocolVersion()) != null ? String.valueOf(plr.getRewindProtocolVersion()) : "undefined")
|
int protocol = !plr.isEaglerXRewindPlayer() ? plr.getMinecraftProtocol() : plr.getRewindProtocolVersion();
|
||||||
: (String.valueOf(plr.getMinecraftProtocol()) != null ? String.valueOf(plr.getMinecraftProtocol()) : "undefined");
|
String host = plr.getWebSocketHost();
|
||||||
String rewind = plr.isEaglerXRewindPlayer() ? "Yes" : "No";
|
String userAgent = plr.getWebSocketHeader(EnumWebSocketHeader.HEADER_USER_AGENT);
|
||||||
String userAgent = plr.getWebSocketHeader(EnumWebSocketHeader.HEADER_USER_AGENT);
|
Boolean rewind = plr.isEaglerXRewindPlayer();
|
||||||
if (userAgent == null || userAgent.isEmpty()) userAgent = "undefined";
|
if (userAgent == null || userAgent.isEmpty())
|
||||||
|
userAgent = "undefined";
|
||||||
|
|
||||||
String payload = String.format("""
|
String payload = String.format(
|
||||||
{
|
"""
|
||||||
"content": "Blocked a blacklisted %s from joining",
|
{
|
||||||
"embeds": [
|
"content": "Blocked a blacklisted %s from joining",
|
||||||
{
|
"embeds": [
|
||||||
"title": "Player Information",
|
{
|
||||||
"description": "🎮 **Name:** %s\\n🏠 **Address:** %s\\n🌄 **PVN:** %s\\n🌐 **Origin:** %s\\n🔋 **Brand:** %s\\n🧊 **User Agent:** %s\\n⏪ **Rewind:** %s"
|
"title": "Player Information",
|
||||||
|
"description": "🎮 **Name:** %s\\n🏠 **IP:** %s\\n🌄 **PVN:** %s\\n🌐 **Origin:** %s\\n🔋 **Brand:** %s\\n🪑 **Host:** %s\\n🧊 **User Agent:** %s\\n⏪ **Rewind:** %s"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
""",
|
||||||
|
type, plr.getUsername(), addr, protocol, origin, brand, plr.isWebSocketSecure() ? "wss://" : "ws://" + host, userAgent, rewind ? "Yes" : "No");
|
||||||
|
|
||||||
|
try {
|
||||||
|
HttpURLConnection conn = (HttpURLConnection) new URL(webhook).openConnection();
|
||||||
|
conn.setRequestMethod("POST");
|
||||||
|
conn.setRequestProperty("Content-Type", "application/json");
|
||||||
|
conn.setDoOutput(true);
|
||||||
|
conn.setConnectTimeout(5000);
|
||||||
|
conn.setReadTimeout(5000);
|
||||||
|
|
||||||
|
try (OutputStream os = conn.getOutputStream()) {
|
||||||
|
os.write(payload.getBytes());
|
||||||
|
}
|
||||||
|
|
||||||
|
conn.getInputStream().close();
|
||||||
|
} catch (Exception e) {
|
||||||
|
getLogger().warn("Failed to send webhook: " + e);
|
||||||
}
|
}
|
||||||
]
|
});
|
||||||
}
|
|
||||||
""", type, plr.getUsername(), addr, protocol, origin, brand, userAgent, rewind);
|
|
||||||
|
|
||||||
try {
|
|
||||||
HttpURLConnection conn = (HttpURLConnection) new URL(webhook).openConnection();
|
|
||||||
conn.setRequestMethod("POST");
|
|
||||||
conn.setRequestProperty("Content-Type", "application/json");
|
|
||||||
conn.setDoOutput(true);
|
|
||||||
conn.setConnectTimeout(5000);
|
|
||||||
conn.setReadTimeout(5000);
|
|
||||||
|
|
||||||
try (OutputStream os = conn.getOutputStream()) {
|
|
||||||
os.write(payload.getBytes());
|
|
||||||
}
|
|
||||||
|
|
||||||
conn.getInputStream().close();
|
|
||||||
} catch (Exception e) {
|
|
||||||
getLogger().warn("Failed to send webhook: " + e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void init() {
|
public static void init() {
|
||||||
|
@ -3,47 +3,73 @@ package dev.colbster937.originblacklist.base;
|
|||||||
import org.yaml.snakeyaml.Yaml;
|
import org.yaml.snakeyaml.Yaml;
|
||||||
import org.yaml.snakeyaml.LoaderOptions;
|
import org.yaml.snakeyaml.LoaderOptions;
|
||||||
import org.yaml.snakeyaml.constructor.Constructor;
|
import org.yaml.snakeyaml.constructor.Constructor;
|
||||||
import java.io.File;
|
import org.yaml.snakeyaml.DumperOptions;
|
||||||
import java.io.InputStream;
|
import java.io.*;
|
||||||
import java.io.FileInputStream;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.StandardCopyOption;
|
import java.nio.file.StandardCopyOption;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
public class ConfigManager {
|
public class ConfigManager {
|
||||||
public Messages messages = new Messages();
|
public Messages messages = new Messages();
|
||||||
public List<String> subscriptions;
|
public List<String> subscriptions = List.of();
|
||||||
public Blacklist blacklist = new Blacklist();
|
public Blacklist blacklist = new Blacklist();
|
||||||
public Discord discord = new Discord();
|
public Discord discord = new Discord();
|
||||||
|
|
||||||
public static ConfigManager loadConfig(Base.LoggerAdapter logger) {
|
public static ConfigManager loadConfig(Base.LoggerAdapter logger) {
|
||||||
File conf = new File("plugins/originblacklist/config.yml");
|
File f = new File("plugins/originblacklist/config.yml");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (!conf.exists()) {
|
if (!f.exists()) {
|
||||||
conf.getParentFile().mkdirs();
|
f.getParentFile().mkdirs();
|
||||||
try (InputStream in = ConfigManager.class.getResourceAsStream("/config.yml")) {
|
try (InputStream in = ConfigManager.class.getResourceAsStream("/config.yml")) {
|
||||||
if (in != null) {
|
if (in != null) Files.copy(in, f.toPath(), StandardCopyOption.REPLACE_EXISTING);
|
||||||
Files.copy(in, conf.toPath(), StandardCopyOption.REPLACE_EXISTING);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LoaderOptions options = new LoaderOptions();
|
Yaml y = new Yaml(new Constructor(ConfigManager.class, new LoaderOptions()));
|
||||||
Constructor constructor = new Constructor(ConfigManager.class, options);
|
ConfigManager l;
|
||||||
Yaml yaml = new Yaml(constructor);
|
try (InputStream in = new FileInputStream(f)) { l = y.load(in); }
|
||||||
return yaml.load(new FileInputStream(conf));
|
|
||||||
|
if (l == null) l = new ConfigManager();
|
||||||
|
|
||||||
|
Yaml raw = new Yaml();
|
||||||
|
Map<String, Object> u = raw.load(new FileInputStream(f));
|
||||||
|
Map<String, Object> d = raw.load(ConfigManager.class.getResourceAsStream("/config.yml"));
|
||||||
|
if (mergeConfig(u, d)) saveConfig(u, f);
|
||||||
|
|
||||||
|
return l;
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
return new ConfigManager();
|
return new ConfigManager();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
private static boolean mergeConfig(Map<String, Object> u, Map<String, Object> d) {
|
||||||
|
boolean c = false;
|
||||||
|
for (String k : d.keySet()) {
|
||||||
|
if (!u.containsKey(k)) {
|
||||||
|
u.put(k, d.get(k));
|
||||||
|
c = true;
|
||||||
|
} else if (u.get(k) instanceof Map && d.get(k) instanceof Map)
|
||||||
|
c |= mergeConfig((Map<String, Object>) u.get(k), (Map<String, Object>) d.get(k));
|
||||||
|
}
|
||||||
|
return c;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void saveConfig(Map<String, Object> m, File f) throws IOException {
|
||||||
|
DumperOptions o = new DumperOptions();
|
||||||
|
o.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);
|
||||||
|
o.setPrettyFlow(true);
|
||||||
|
new Yaml(o).dump(m, new FileWriter(f));
|
||||||
|
}
|
||||||
|
|
||||||
public static class Blacklist {
|
public static class Blacklist {
|
||||||
public List<String> origins;
|
public List<String> origins;
|
||||||
public List<String> brands;
|
public List<String> brands;
|
||||||
public List<String> players;
|
public List<String> players;
|
||||||
public boolean missing_origin;
|
public boolean missing_origin;
|
||||||
|
public String blacklist_redirect;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Discord {
|
public static class Discord {
|
||||||
@ -53,6 +79,7 @@ public class ConfigManager {
|
|||||||
public static class Messages {
|
public static class Messages {
|
||||||
public String kick;
|
public String kick;
|
||||||
public MOTD motd;
|
public MOTD motd;
|
||||||
|
public Help help;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class MOTD {
|
public static class MOTD {
|
||||||
@ -60,4 +87,9 @@ public class ConfigManager {
|
|||||||
public String text;
|
public String text;
|
||||||
public String icon;
|
public String icon;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static class Help {
|
||||||
|
public String generic;
|
||||||
|
public String player;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,16 +2,29 @@ package dev.colbster937.originblacklist.bukkit;
|
|||||||
|
|
||||||
import dev.colbster937.originblacklist.base.Base;
|
import dev.colbster937.originblacklist.base.Base;
|
||||||
import net.lax1dude.eaglercraft.backend.server.api.bukkit.EaglerXServerAPI;
|
import net.lax1dude.eaglercraft.backend.server.api.bukkit.EaglerXServerAPI;
|
||||||
import net.lax1dude.eaglercraft.backend.server.api.bukkit.event.EaglercraftInitializePlayerEvent;
|
import net.lax1dude.eaglercraft.backend.server.api.bukkit.event.EaglercraftLoginEvent;
|
||||||
import net.lax1dude.eaglercraft.backend.server.api.bukkit.event.EaglercraftMOTDEvent;
|
import net.lax1dude.eaglercraft.backend.server.api.bukkit.event.EaglercraftMOTDEvent;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
import org.bukkit.plugin.Plugin;
|
||||||
|
|
||||||
public class OriginBlacklistBukkit extends JavaPlugin implements Listener {
|
public class OriginBlacklistBukkit extends JavaPlugin implements Listener {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
|
Plugin plugin = getServer().getPluginManager().getPlugin("EaglercraftXServer");
|
||||||
|
if (plugin != null) {
|
||||||
|
String version = plugin.getDescription().getVersion();
|
||||||
|
if (!Base.checkVer(version, Base.apiVer)) {
|
||||||
|
getLogger().severe("EaglerXServer " + Base.apiVer + " is required!");
|
||||||
|
throw new RuntimeException("Incompatible API version");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
throw new RuntimeException("Missing EaglerXServer");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Base.setLogger(new Base.LoggerAdapter() {
|
Base.setLogger(new Base.LoggerAdapter() {
|
||||||
@Override public void info(String msg) { getLogger().info(msg); }
|
@Override public void info(String msg) { getLogger().info(msg); }
|
||||||
@Override public void warn(String msg) { getLogger().warning(msg); }
|
@Override public void warn(String msg) { getLogger().warning(msg); }
|
||||||
@ -29,7 +42,7 @@ public class OriginBlacklistBukkit extends JavaPlugin implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onLogin(EaglercraftInitializePlayerEvent event) {
|
public void onLogin(EaglercraftLoginEvent event) {
|
||||||
Base.handleConnection(event);
|
Base.handleConnection(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ package dev.colbster937.originblacklist.bungee;
|
|||||||
|
|
||||||
import dev.colbster937.originblacklist.base.Base;
|
import dev.colbster937.originblacklist.base.Base;
|
||||||
import net.lax1dude.eaglercraft.backend.server.api.bungee.EaglerXServerAPI;
|
import net.lax1dude.eaglercraft.backend.server.api.bungee.EaglerXServerAPI;
|
||||||
import net.lax1dude.eaglercraft.backend.server.api.bungee.event.EaglercraftInitializePlayerEvent;
|
import net.lax1dude.eaglercraft.backend.server.api.bungee.event.EaglercraftLoginEvent;
|
||||||
import net.lax1dude.eaglercraft.backend.server.api.bungee.event.EaglercraftMOTDEvent;
|
import net.lax1dude.eaglercraft.backend.server.api.bungee.event.EaglercraftMOTDEvent;
|
||||||
import net.md_5.bungee.api.plugin.Plugin;
|
import net.md_5.bungee.api.plugin.Plugin;
|
||||||
import net.md_5.bungee.api.plugin.Listener;
|
import net.md_5.bungee.api.plugin.Listener;
|
||||||
@ -12,6 +12,18 @@ public class OriginBlacklistBungee extends Plugin implements Listener {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
|
Plugin plugin = getProxy().getPluginManager().getPlugin("EaglercraftXServer");
|
||||||
|
if (plugin != null) {
|
||||||
|
String version = plugin.getDescription().getVersion();
|
||||||
|
if (!Base.checkVer(version, Base.apiVer)) {
|
||||||
|
getLogger().severe("EaglerXServer " + Base.apiVer + " is required!");
|
||||||
|
throw new RuntimeException("Incompatible API version");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
throw new RuntimeException("Missing EaglerXServer");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Base.setLogger(new Base.LoggerAdapter() {
|
Base.setLogger(new Base.LoggerAdapter() {
|
||||||
@Override public void info(String msg) { getLogger().info(msg); }
|
@Override public void info(String msg) { getLogger().info(msg); }
|
||||||
@Override public void warn(String msg) { getLogger().warning(msg); }
|
@Override public void warn(String msg) { getLogger().warning(msg); }
|
||||||
@ -29,7 +41,7 @@ public class OriginBlacklistBungee extends Plugin implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onLogin(EaglercraftInitializePlayerEvent event) {
|
public void onLogin(EaglercraftLoginEvent event) {
|
||||||
Base.handleConnection(event);
|
Base.handleConnection(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,24 +3,13 @@ package dev.colbster937.originblacklist.velocity;
|
|||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
import com.velocitypowered.api.event.proxy.ProxyInitializeEvent;
|
import com.velocitypowered.api.event.proxy.ProxyInitializeEvent;
|
||||||
import com.velocitypowered.api.event.Subscribe;
|
import com.velocitypowered.api.event.Subscribe;
|
||||||
import com.velocitypowered.api.plugin.Plugin;
|
|
||||||
import com.velocitypowered.api.plugin.Dependency;
|
|
||||||
import com.velocitypowered.api.proxy.ProxyServer;
|
import com.velocitypowered.api.proxy.ProxyServer;
|
||||||
import dev.colbster937.originblacklist.base.Base;
|
import dev.colbster937.originblacklist.base.Base;
|
||||||
import net.lax1dude.eaglercraft.backend.server.api.velocity.EaglerXServerAPI;
|
import net.lax1dude.eaglercraft.backend.server.api.velocity.EaglerXServerAPI;
|
||||||
import net.lax1dude.eaglercraft.backend.server.api.velocity.event.EaglercraftInitializePlayerEvent;
|
import net.lax1dude.eaglercraft.backend.server.api.velocity.event.EaglercraftLoginEvent;
|
||||||
import net.lax1dude.eaglercraft.backend.server.api.event.IEaglercraftMOTDEvent;
|
|
||||||
import net.lax1dude.eaglercraft.backend.server.api.velocity.event.EaglercraftMOTDEvent;
|
import net.lax1dude.eaglercraft.backend.server.api.velocity.event.EaglercraftMOTDEvent;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
@Plugin(
|
|
||||||
id = "originblacklist",
|
|
||||||
name = "OriginBlacklist",
|
|
||||||
version = "1.0.1",
|
|
||||||
authors = {"Colbster937"},
|
|
||||||
description = "A reimplementation of OriginBlacklist for EaglerXServer",
|
|
||||||
dependencies = {@Dependency(id = "eaglerxserver")}
|
|
||||||
)
|
|
||||||
public class OriginBlacklistVelocity {
|
public class OriginBlacklistVelocity {
|
||||||
|
|
||||||
private final ProxyServer proxy;
|
private final ProxyServer proxy;
|
||||||
@ -39,6 +28,14 @@ public class OriginBlacklistVelocity {
|
|||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
public void onProxyInitialization(ProxyInitializeEvent event) {
|
public void onProxyInitialization(ProxyInitializeEvent event) {
|
||||||
|
proxy.getPluginManager().getPlugin("eaglerxserver").ifPresentOrElse(plugin -> {
|
||||||
|
if (!Base.checkVer(plugin.getDescription().getVersion().orElse("1.0.0"), Base.apiVer)) {
|
||||||
|
logger.error("EaglerXServer " + Base.apiVer + " is required!");
|
||||||
|
throw new RuntimeException("Incompatible api version");
|
||||||
|
}
|
||||||
|
}, () -> {
|
||||||
|
throw new RuntimeException("Missing EaglerXServer");
|
||||||
|
});
|
||||||
Base.setApi(EaglerXServerAPI.instance());
|
Base.setApi(EaglerXServerAPI.instance());
|
||||||
Base.reloadConfig();
|
Base.reloadConfig();
|
||||||
Base.init();
|
Base.init();
|
||||||
@ -47,12 +44,12 @@ public class OriginBlacklistVelocity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
public void onLogin(EaglercraftInitializePlayerEvent event) {
|
public void onLogin(EaglercraftLoginEvent event) {
|
||||||
Base.handleConnection(event);
|
Base.handleConnection(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
public void onMOTD(IEaglercraftMOTDEvent event) {
|
public void onMOTD(EaglercraftMOTDEvent event) {
|
||||||
Base.handleMOTD(event);
|
Base.handleMOTD(event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
name: OriginBlacklist
|
name: OriginBlacklist
|
||||||
version: 1.0.1
|
version: ${version}
|
||||||
main: dev.colbster937.originblacklist.bungee.OriginBlacklistBungee
|
main: dev.colbster937.originblacklist.bungee.OriginBlacklistBungee
|
||||||
description: A reimplementation of OriginBlacklist for EaglerXServer
|
description: ${description}
|
||||||
author: Colbster937
|
author: Colbster937
|
||||||
depends:
|
depends:
|
||||||
- EaglercraftXServer
|
- EaglercraftXServer
|
@ -3,13 +3,22 @@ messages:
|
|||||||
# - %blocked% - The player's origin/brand that was blocked
|
# - %blocked% - The player's origin/brand that was blocked
|
||||||
# - %blocktype% - Shows what the player was blocked for
|
# - %blocktype% - Shows what the player was blocked for
|
||||||
# - %easyblocktype% - Shows what the player was blocked for in an eagler-kid readable form
|
# - %easyblocktype% - Shows what the player was blocked for in an eagler-kid readable form
|
||||||
|
# - %host% - The IP the player pinged
|
||||||
|
# - %help% - The configured help message for the block type
|
||||||
|
|
||||||
kick: |
|
kick: |
|
||||||
<red>This %easyblocktype% is not allowed on the server!</red>
|
<red>This %easyblocktype% is not allowed on the server!</red>
|
||||||
<dark_gray>»</dark_gray> <gray>%blocked%</gray> <dark_gray>«</dark_gray>
|
<dark_gray>»</dark_gray> <gray>%blocked%</gray> <dark_gray>«</dark_gray>
|
||||||
|
|
||||||
|
%help%
|
||||||
|
|
||||||
<gray>Think this is a mistake? Join our discord:</gray>
|
<gray>Think this is a mistake? Join our discord:</gray>
|
||||||
<blue>discord.gg/changethisintheconfig</blue>
|
<blue>discord.gg/changethisintheconfig</blue>
|
||||||
|
|
||||||
|
# Please note that help is only supported in the kick message, not the MOTD
|
||||||
|
help:
|
||||||
|
generic: "<gray>Please switch to a different %easyblocktype%.</gray>"
|
||||||
|
player: "<gray>Please change your %easyblocktype%.</gray>"
|
||||||
|
|
||||||
motd:
|
motd:
|
||||||
enabled: true
|
enabled: true
|
||||||
@ -22,11 +31,14 @@ messages:
|
|||||||
# Everything should be lowercase
|
# Everything should be lowercase
|
||||||
blacklist:
|
blacklist:
|
||||||
origins:
|
origins:
|
||||||
- "hack.example.com"
|
- "*eagler-clients.vercel.app*"
|
||||||
|
- "*eaglerhackedclients.vercel.app*"
|
||||||
|
- "*eaglerhacks.github.io*"
|
||||||
brands:
|
brands:
|
||||||
- "*dragonx*"
|
- "*dragonx*"
|
||||||
- "*piclient*"
|
- "*piclient*"
|
||||||
missing_origin: false
|
players:
|
||||||
|
- "Admin"
|
||||||
|
|
||||||
discord:
|
discord:
|
||||||
webhook: ""
|
webhook: ""
|
||||||
@ -54,16 +66,4 @@ discord:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# :>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# :>
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
name: OriginBlacklist
|
name: OriginBlacklist
|
||||||
version: 1.0.1
|
version: ${version}
|
||||||
main: dev.colbster937.originblacklist.bukkit.OriginBlacklistBukkit
|
main: dev.colbster937.originblacklist.bukkit.OriginBlacklistBukkit
|
||||||
description: A reimplementation of OriginBlacklist for EaglerXServer
|
description: ${description}
|
||||||
author: Colbster937
|
author: Colbster937
|
||||||
depend:
|
depend:
|
||||||
- EaglercraftXServer
|
- EaglercraftXServer
|
||||||
|
14
src/main/resources/velocity-plugin.json
Normal file
14
src/main/resources/velocity-plugin.json
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"id": "originblacklist",
|
||||||
|
"name": "OriginBlacklist",
|
||||||
|
"version": "${version}",
|
||||||
|
"description": "${description}",
|
||||||
|
"main": "dev.colbster937.originblacklist.velocity.OriginBlacklistVelocity",
|
||||||
|
"authors": ["Colbster937"],
|
||||||
|
"dependencies": [
|
||||||
|
{
|
||||||
|
"id": "eaglerxserver",
|
||||||
|
"optional": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user