Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: 2
updates:
- package-ecosystem: "maven"
- package-ecosystem: "gradle"
directory: "/"
schedule:
interval: "weekly"
Expand Down
80 changes: 34 additions & 46 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,34 @@
name: CI

on:
push:
branches-ignore:
- dependabot/**
pull_request:

jobs:
build:
name: Build with Maven
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Cache local Maven repository
id: cache-maven
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-

- name: Setup JDK 21
uses: actions/setup-java@v4
with:
java-version: 21
distribution: temurin

- name: Set up Maven Wrapper
run: mvn --errors --batch-mode --show-version org.apache.maven.plugins:maven-wrapper-plugin:3.3.2:wrapper "-Dmaven=3.9.9"

- name: Build with Maven
run: |
./mvnw clean package --batch-mode --no-transfer-progress --show-version
echo "BUILD_NAME=$(./mvnw help:evaluate -Dexpression=project.build.finalName -pl dist -q -DforceStdout)" >> $GITHUB_ENV

- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ env.BUILD_NAME }}
path: |
target/InteractiveChat-PacketEvents-*.jar
name: CI

on:
push:
branches-ignore:
- dependabot/**
pull_request:

jobs:
build:
name: Build with Gradle
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup JDK 17
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
cache: 'gradle'

- name: Build with Gradle
run: |
./gradlew clean build

- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: InteractiveChat-PacketEvents-${{ github.run_number }}
path: |
libs/InteractiveChat-PacketEvents-*.jar
60 changes: 30 additions & 30 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*

# IDE
.idea/
*.iml
dependency-reduced-pom.xml
target/
# Compiled class file
*.class
# Log file
*.log
# BlueJ files
*.ctxt
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*
# IDE
.idea/
.gradle/
libs/
build/
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# InteractiveChat-PacketEvents (WIP)
An addon plugin for InteractiveChat to support PacketEvents instead of ProtocolLib.\
This is a very simple plugin that implements all the code seen [here](https://github.com/Skullians/InteractiveChatPacketEvents/tree/master/common/src/main/java/com/loohp/interactivechat/listeners/packet).\
This is a very simple plugin that implements all the code seen [here](https://github.com/LOOHP/InteractiveChat/tree/master/common/src/main/java/com/loohp/interactivechat/platform).\
Very little modifications to code have been made, apart from making it support PacketEvents.

> [!WARNING]
> This plugin **REQUIRES** v4.3.0.0 of InteractiveChat, or higher.\
> This plugin **REQUIRES** v4.3.5.0 of InteractiveChat, or higher.\
> This plugin will NOT boot otherwise.


Expand All @@ -27,5 +27,5 @@ You can see the corresponding PR here: https://github.com/LOOHP/InteractiveChat/
1. Install the latest version of PacketEvents, and this plugin.
2. Start your server

## Permissions and Commands
`/interactivechatpacketevents checkupdate` - Requires the `interactivechatpacketevents.checkupdate` command (or OP). `/icpe checkupdate` also works.
## Permissions
Requires the `interactivechatpacketevents.checkupdate` permission to check for updates on join.
83 changes: 83 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar

plugins {
java

alias(libs.plugins.shadow)
alias(libs.plugins.properties)
}

group = "net.skullian"
version = "1.1.0"

repositories {
mavenCentral()
mavenLocal()

maven {
name = "spigotmc-repo"
url = uri("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
}
maven {
name = "sonatype"
url = uri("https://oss.sonatype.org/content/groups/public/")
}
maven {
name = "codemc"
url = uri("https://repo.codemc.org/repository/maven-public/")
}
maven {
name = "loohp-repo"
url = uri("https://repo.loohpjames.com/repository")
}
}

dependencies {
compileOnly(libs.spigot)

compileOnly(libs.interactivechat)
compileOnly(libs.packetevents)
compileOnly(libs.bytebuddy)

compileOnly(libs.lombok)
annotationProcessor(libs.lombok)

compileOnly(libs.bundles.adventure)
}

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}

tasks {
withType<ShadowJar>().configureEach {
from(rootProject.projectDir.resolve("LICENSE")) {
rename("LICENSE", "META-INF/LICENSE_${rootProject.name}")
}

destinationDirectory.set(file("$rootDir/libs"))
archiveFileName.set("${rootProject.name}-$version.jar")
}

processResources {
filteringCharset = "UTF-8"
filesMatching(listOf("*.yml")) {
expand(project.properties)
}
}

withType<JavaCompile> {
options.compilerArgs.add("-parameters")
options.isFork = true
options.encoding = "UTF-8"
options.release = 17
}
}

gitProperties {
gitPropertiesName = "version.properties"
dotGitDirectory = project.rootProject.layout.projectDirectory.dir(".git")
keys = listOf("git.branch", "git.build.version", "git.commit.id.abbrev")
}
8 changes: 8 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
org.gradle.cache=true
org.gradle.caching=true
org.gradle.parallel=true
org.gradle.configuration-cache=false
org.gradle.configuration-cache-problems=warn
org.gradle.configureondemand=true
org.gradle.jvmargs=-Xmx4048m -Dfile.encoding=UTF-8
org.gradle.vfs.watch=false
34 changes: 34 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# This file was generated by the Gradle 'init' task.
# https://docs.gradle.org/current/userguide/platforms.html#sub::toml-dependencies-format

[versions]
spigot-api="1.20.6-R0.1-SNAPSHOT"

packetevents = "2.10.1"
interactivechat = "4.3.5.0"
bytebuddy = "1.17.6"

adventure = "4.25.0"
adventure-platform = "4.4.1"

lombok="1.18.38"
shadow="9.3.0"
properties = "2.5.4"

[libraries]
packetevents = { module = "com.github.retrooper:packetevents-spigot", version.ref = "packetevents" }
interactivechat = { module = "com.loohp:InteractiveChat", version.ref = "interactivechat" }
bytebuddy = { module = "net.bytebuddy:byte-buddy", version.ref = "bytebuddy" }
adventure-platform-bukkit = { module = "net.kyori:adventure-platform-bukkit", version.ref = "adventure-platform" }
adventure-text-minimessage = { module = "net.kyori:adventure-text-minimessage", version.ref = "adventure" }
adventure-text-serializer-legacy = { module = "net.kyori:adventure-text-serializer-legacy", version.ref = "adventure" }
adventure-text-serializer-plain = { module = "net.kyori:adventure-text-serializer-plain", version.ref = "adventure" }
lombok = { module = "org.projectlombok:lombok", version.ref = "lombok" }
spigot = { module = "org.spigotmc:spigot", version.ref = "spigot-api" }

[bundles]
adventure = [ "adventure-platform-bukkit", "adventure-text-minimessage", "adventure-text-serializer-legacy", "adventure-text-serializer-plain" ]

[plugins]
shadow = { id = "com.gradleup.shadow", version.ref = "shadow" }
properties = { id = "com.gorylenko.gradle-git-properties", version.ref = "properties" }
7 changes: 7 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading
Loading