Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Redned235 committed Jul 10, 2024
0 parents commit 0eb5137
Show file tree
Hide file tree
Showing 29 changed files with 2,265 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# These are supported funding model platforms

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: battleplugins
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
polar: # Replace with a single Polar username
buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
26 changes: 26 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Build

on:
push:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'
cache: gradle
- name: Build with Gradle
run: ./gradlew build
- name: Publish to Modrinth
if: ${{ success() && github.repository == 'BattlePlugins/ArenaCTF' && github.ref_name == 'master' }}
env:
CHANGELOG: ${{ github.event.head_commit.message }}
BUILD_NUMBER: ${{ github.run_number }}
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
run: ./gradlew modrinth
42 changes: 42 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/

### IntelliJ IDEA ###
.idea/modules.xml
.idea/jarRepositories.xml
.idea/compiler.xml
.idea/libraries/
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/

### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/

### VS Code ###
.vscode/

### Mac OS ###
.DS_Store
674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# ArenaCTF

A capture the flag plugin using [BattleArena](https://github.com/BattlePlugins/BattleArena)

ArenaCTF is a capture the flag plugin for BattleArena. It comes with multiple configuration options, such as the capture time, flag drop time, and many other options offered by BattleArena.

## Documentation
Full documentation for ArenaCTF can be found on the [BattleDocs](https://docs.bplug.in/books/additional-gamemodes/chapter/capture-the-flag) website.

## Commands
| Command | Description |
|---------------------------------------|----------------------------------------|
| /ctf flag set <map> <team> | Sets flag for the specified team. |

## Permissions
| Permission | Command |
|----------------------------------|---------------|
| battlearena.command.ctf.flag.set | /ctf flag set |

## Links
- Website: [https://www.battleplugins.org](https://www.battleplugins.org)
- Download: [https://modrinth.com/plugin/arenactf](https://modrinth.com/plugin/arenactf)
- Discord: [BattlePlugins Discord](https://discord.com/invite/J3Hjjb8)
64 changes: 64 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
plugins {
id("java")
id("java-library")
id("xyz.jpenilla.run-paper") version "2.3.0"
id("com.modrinth.minotaur") version "2.+"
}

group = "org.battleplugins.arena"
version = "2.0.0-SNAPSHOT"

val supportedVersions = listOf("1.19.4", "1.20", "1.20.1", "1.20.2", "1.20.3", "1.20.4", "1.20.5", "1.20.6", "1.21")

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

repositories {
mavenCentral()

maven("https://repo.papermc.io/repository/maven-public/")
maven("https://repo.battleplugins.org/releases/")
maven("https://repo.battleplugins.org/snapshots/")
}

dependencies {
api("io.papermc.paper:paper-api:1.19.4-R0.1-SNAPSHOT")
api("org.battleplugins:arena:4.0.0-SNAPSHOT")
}

tasks {
runServer {
minecraftVersion("1.20.6")

// Set Java 21 (1.20.6 requires Java 21)
javaLauncher = project.javaToolchains.launcherFor {
languageVersion = JavaLanguageVersion.of(21)
}
}

jar {
from("src/main/java/resources") {
include("*")
}

archiveFileName.set("ArenaCTF.jar")
archiveClassifier.set("")
}

processResources {
filesMatching("plugin.yml") {
expand("version" to rootProject.version)
}
}
}

modrinth {
val snapshot = "SNAPSHOT" in rootProject.version.toString()

token.set(System.getenv("MODRINTH_TOKEN") ?: "")
projectId.set("arenactf")
versionNumber.set(rootProject.version as String + if (snapshot) "-" + System.getenv("BUILD_NUMBER") else "")
versionType.set(if (snapshot) "beta" else "release")
changelog.set(System.getenv("CHANGELOG") ?: "")
uploadFile.set(tasks.jar)
gameVersions.set(supportedVersions)
}
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 6 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#Sun Jul 07 15:40:57 CDT 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 0eb5137

Please sign in to comment.