Skip to content

Commit

Permalink
FrozenActions implementation, kotlin has failed me :((
Browse files Browse the repository at this point in the history
  • Loading branch information
Frcsty committed Aug 21, 2020
1 parent 20f8a74 commit 0e5a232
Show file tree
Hide file tree
Showing 30 changed files with 40 additions and 736 deletions.
31 changes: 14 additions & 17 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
import org.apache.tools.ant.filters.ReplaceTokens

plugins {
id "org.jetbrains.kotlin.jvm" version "1.3.72"
id "com.github.johnrengelman.shadow" version "6.0.0"
id "org.jetbrains.kotlin.jvm" version "1.3.72"
}

group = "com.github.frcsty"
version = "2.1.2"

def path = "com.github.frcsty.frozenjoin"
def version = JavaVersion.VERSION_1_8

repositories {
mavenCentral()
mavenLocal()
maven { url = "https://repo.destroystokyo.com/repository/maven-public/" }
maven { url = "http://repo.extendedclip.com/content/repositories/placeholderapi/" }
maven { url = "https://repo.codemc.org/repository/maven-public" }
Expand All @@ -22,35 +24,30 @@ dependencies {
testImplementation "io.kotest:kotest-assertions-core-jvm:4.0.6"
implementation "me.mattstudios.utils:matt-framework:1.4"
implementation "org.bstats:bstats-bukkit:1.7"
implementation("com.github.cryptomorin:XSeries:5.3.1") {
exclude group: "com.google.code.findbugs", module: "jsr305"
}
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.72") {
exclude group: "org.jetbrains", module: "annotations"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.72"
implementation("com.github.frcsty:FrozenActions:1.0.0") {
exclude group: "com.github.frcsty.libs.kotlin"
}
compileOnly "org.jetbrains:annotations:19.0.0" // kotlin-stdlib-jdk8 dependency
compileOnly "net.luckperms:api:5.1"
compileOnly "com.destroystokyo.paper:paper-api:1.16.1-R0.1-SNAPSHOT"
compileOnly "me.clip:placeholderapi:2.10.9"
compileOnly "me.clip:placeholderapi:2.10.6"
}

processResources {
from(sourceSets.main.resources.srcDirs) {
filter ReplaceTokens, tokens: [version: project.version]
filter org.apache.tools.ant.filters.ReplaceTokens, tokens: [version: project.version]
}
}

def path = "com.github.frcsty.frozenjoin.libs"

shadowJar {
relocate "me.mattstudios.mf", "${path}.mf"
relocate "org.bstats", "${path}.bstats"
relocate "com.cryptomorin.xseries", "${path}.xseries"
relocate "me.mattstudios.utils", "${path}.utils"
relocate "kotlin", "${path}.kotlin"
}

sourceCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = version
targetCompatibility = version

compileKotlin {
kotlinOptions.jvmTarget = sourceCompatibility
kotlinOptions.jvmTarget = version
}
21 changes: 21 additions & 0 deletions src/main/java/com/github/frcsty/Handler.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.github.frcsty;

import com.github.frcsty.frozenactions.wrapper.ActionHandler;
import org.bukkit.entity.Player;

import java.util.Arrays;
import java.util.List;

public final class Handler {

private final ActionHandler handler = new ActionHandler();

public void execute(final Player player, final String... actions) {
handler.execute(player, Arrays.asList(actions));
}

public void execute(final Player player, final List<String> actions) {
handler.execute(player, actions);
}

}
106 changes: 0 additions & 106 deletions src/main/kotlin/com/github/frcsty/frozenjoin/action/ActionHandler.kt

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 0e5a232

Please sign in to comment.