Skip to content

Commit 3f53e43

Browse files
authored
Merge pull request #23 from Streamline-Essentials/dev
Auto PR: Merge dev into master
2 parents c4ac0bf + 55eb9e4 commit 3f53e43

56 files changed

Lines changed: 582 additions & 2568 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,3 +122,4 @@ run/
122122
/api/target/
123123
/backend-api/target/
124124
/.fastRequest/
125+
/deploy/

build.gradle

Lines changed: 65 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,46 @@ buildscript {
55
}
66
}
77
dependencies {
8-
classpath("gradle.plugin.com.github.johnrengelman:shadow:7.1.2")
8+
classpath("com.gradleup.shadow:shadow-gradle-plugin:8.3.6") // for shadowing
99
classpath("io.freefair.gradle:lombok-plugin:8.6")
1010
}
1111
}
1212

1313
allprojects {
14+
apply plugin: "java"
15+
apply plugin: "com.gradleup.shadow"
16+
apply plugin: "io.freefair.lombok"
17+
apply plugin: "maven-publish"
18+
1419
version = rootProject.properties["version"]
1520
group = rootProject.properties["group"]
21+
22+
java {
23+
sourceCompatibility = JavaVersion.VERSION_11
24+
targetCompatibility = JavaVersion.VERSION_11
25+
}
26+
27+
artifacts {
28+
archives shadowJar
29+
}
30+
31+
repositories {
32+
// Maven Defaults
33+
mavenCentral()
34+
mavenLocal()
35+
maven { url "https://mvnrepository.com/artifact" }
36+
37+
// JitPack
38+
maven { url "https://jitpack.io" }
39+
40+
// Local libs folder as a flat directory repository
41+
flatDir {
42+
dirs "${rootDir}/libs"
43+
}
44+
}
1645
}
1746

1847
subprojects {
19-
apply plugin: "java"
20-
apply plugin: "com.github.johnrengelman.shadow"
21-
apply plugin: "io.freefair.lombok"
22-
apply plugin: "maven-publish"
23-
2448
apply from: rootDir.toString() + "/dependencies.gradle"
2549

2650
ext {
@@ -33,9 +57,6 @@ subprojects {
3357
targetCompatibility = JavaVersion.VERSION_11
3458

3559
repositories {
36-
mavenCentral()
37-
mavenLocal()
38-
3960
// Spigot / Bukkit
4061
maven {
4162
url "https://hub.spigotmc.org/nexus/content/repositories/snapshots"
@@ -55,9 +76,6 @@ subprojects {
5576
maven { url "https://maven.fabricmc.net" }
5677
maven { url "https://libraries.minecraft.net" }
5778

58-
// JitPack
59-
maven { url "https://jitpack.io" }
60-
maven { url "https://mvnrepository.com/artifact" }
6179
// OpenCollab
6280
maven {
6381
name "opencollabRepositoryMavenSnapshots"
@@ -72,11 +90,6 @@ subprojects {
7290
maven { url "https://repo.extendedclip.com/content/repositories/placeholderapi" }
7391
}
7492

75-
java {
76-
sourceCompatibility = JavaVersion.VERSION_11
77-
targetCompatibility = JavaVersion.VERSION_11
78-
}
79-
8093
processResources {
8194
// Debugging: Print values
8295
doFirst {
@@ -92,7 +105,12 @@ subprojects {
92105
expand (
93106
"name": rootProject.name.toString(),
94107
"version": rootProject.version.toString(),
95-
"main": project.ext.pluginMain.toString(),
108+
)
109+
}
110+
filesMatching("**/velocity-plugin.json") {
111+
expand (
112+
"name": rootProject.name.toString(),
113+
"version": rootProject.version.toString(),
96114
)
97115
}
98116
filesMatching("**/streamline.properties") {
@@ -124,10 +142,6 @@ subprojects {
124142
// minimize()
125143
}
126144

127-
artifacts {
128-
archives shadowJar
129-
}
130-
131145
tasks.register('deploy', Copy) {
132146
// Define the deployment directory
133147
def deployDir = file(System.getenv("DEPLOY_DIR") ?: "$rootDir/deploy")
@@ -168,6 +182,35 @@ subprojects {
168182
}
169183
}
170184

185+
//tasks.register("clearDeploys", Delete) {
186+
// // Define the deployment directory
187+
// def deployDir = file(System.getenv("DEPLOY_DIR") ?: "$rootDir/deploy")
188+
//
189+
// deployDir.mkdirs()
190+
// File[] files = deployDir.listFiles()
191+
// if (files != null) {
192+
// files.each { file ->
193+
// if (file.isFile()) {
194+
// file.delete()
195+
// }
196+
// }
197+
// }
198+
//}
199+
200+
//clean.finalizedBy(clearDeploys)
201+
//tasks.named('clearDeploys').configure {
202+
// dependsOn 'clean'
203+
//}
204+
205+
//clearDeploys.finalizedBy(build)
206+
//tasks.named("build") {
207+
// doFirst {
208+
// tasks.named('clean') {
209+
// it.
210+
// }
211+
// }
212+
//}
213+
171214
wrapper {
172215
gradleVersion = "8.9"
173216
distributionType = Wrapper.DistributionType.ALL

bungee/build.gradle

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
dependencies {
2-
// Platform.
3-
compileOnly 'net.md-5:bungeecord-api:1.20-R0.3-SNAPSHOT'
4-
compileOnly 'net.md-5:bungeecord-parent:1.20-R0.3-SNAPSHOT'
2+
// Platform
3+
annotationProcessor(compileOnly('net.md-5:bungeecord-api:1.21-R0.1-SNAPSHOT'))
54

65
// Defaults.
76
compileOnly(files(FILES))

bungee/src/main/java/net/streamline/platform/BasePlugin.java

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
import java.util.*;
4242
import java.util.concurrent.ConcurrentSkipListMap;
4343
import java.util.concurrent.ConcurrentSkipListSet;
44+
import java.util.logging.Logger;
4445

4546
public abstract class BasePlugin extends Plugin implements ISingularityExtension {
4647
@Getter
@@ -120,8 +121,6 @@ public void setupProperties() {
120121

121122
@Override
122123
public void onEnable() {
123-
getLogger().addHandler(new CosmicLogHandler());
124-
125124
userManager = new UserManager();
126125
messenger = new Messenger();
127126
consoleHolder = new ConsoleHolder();
@@ -156,6 +155,8 @@ public void onDisable() {
156155
UserUtils.syncAllUsers();
157156
UuidManager.getUuids().forEach(UuidInfo::save);
158157

158+
getProxy().unregisterChannel(SLAPI.getApiChannel());
159+
159160
this.disable();
160161
fireStopEvent();
161162

@@ -349,4 +350,14 @@ public static ConcurrentSkipListMap<String, ProxiedPlayer> getPlayersByUUID() {
349350
}
350351
return map;
351352
}
353+
354+
@Override
355+
public Logger getLoggerLogger() {
356+
return getLogger();
357+
}
358+
359+
@Override
360+
public org.slf4j.Logger getSLFLogger() {
361+
return null;
362+
}
352363
}

bungee/src/main/resources/plugin.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: '${name}'
22
version: '${version}'
33
main: 'net.streamline.base.StreamlineBungee'
44
authors:
5-
- MrDrakify
5+
- Drak
66
website: https://github.com/Streamline-Essentials
77
description: True potential is here. A Proxy and Spigot plugin that opens up endless cross-platform possibilities.
88
depend:

dependencies.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ ext {
44
"com.github.Server-Utilities:TheBase:master-SNAPSHOT",
55
"org.pf4j:pf4j:3.10.0",
66
"commons-codec:commons-codec:1.5",
7+
"ch.qos.logback:logback-classic:1.5.6",
78
]
89
SHADOW = [
910
"com.github.ben-manes.caffeine:caffeine:3.1.8",
1011
"com.github.Server-Utilities:TheBase:master-SNAPSHOT",
1112
"org.pf4j:pf4j:3.10.0",
1213
"commons-codec:commons-codec:1.5",
14+
"ch.qos.logback:logback-classic:1.5.6",
1315
]
1416
ANNO = [
1517
"com.github.ben-manes.caffeine:caffeine:3.1.8",

folia/build.gradle

Lines changed: 0 additions & 44 deletions
This file was deleted.

folia/src/main/java/net/streamline/base/Streamline.java

Lines changed: 0 additions & 45 deletions
This file was deleted.

folia/src/main/java/net/streamline/base/TenSecondTimer.java

Lines changed: 0 additions & 48 deletions
This file was deleted.

0 commit comments

Comments
 (0)