mirror of
				https://github.com/GayPizzaSpecifications/foundation.git
				synced 2025-11-04 11:39:39 +00:00 
			
		
		
		
	Gradle.................
This commit is contained in:
		@ -1,12 +1,11 @@
 | 
				
			|||||||
plugins {
 | 
					plugins {
 | 
				
			||||||
  kotlin("jvm") version "1.6.10"
 | 
					  java
 | 
				
			||||||
  id("com.github.johnrengelman.shadow") version "7.1.1"
 | 
					  id("org.jetbrains.kotlin.jvm") version "1.6.10" apply false
 | 
				
			||||||
 | 
					  id("com.github.johnrengelman.shadow") version "7.1.1" apply false
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
group = "io.gorence"
 | 
					allprojects {
 | 
				
			||||||
version = "1.0-SNAPSHOT"
 | 
					  repositories {
 | 
				
			||||||
 | 
					 | 
				
			||||||
repositories {
 | 
					 | 
				
			||||||
    mavenCentral()
 | 
					    mavenCentral()
 | 
				
			||||||
    maven {
 | 
					    maven {
 | 
				
			||||||
      name = "papermc-repo"
 | 
					      name = "papermc-repo"
 | 
				
			||||||
@ -16,31 +15,37 @@ repositories {
 | 
				
			|||||||
      name = "sonatype"
 | 
					      name = "sonatype"
 | 
				
			||||||
      url = uri("https://oss.sonatype.org/content/groups/public/")
 | 
					      url = uri("https://oss.sonatype.org/content/groups/public/")
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
dependencies {
 | 
					subprojects {
 | 
				
			||||||
 | 
					  plugins.apply("org.jetbrains.kotlin.jvm")
 | 
				
			||||||
 | 
					  plugins.apply("com.github.johnrengelman.shadow")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  group = "io.gorence"
 | 
				
			||||||
 | 
					  version = "1.0-SNAPSHOT"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  dependencies {
 | 
				
			||||||
    // Kotlin dependencies
 | 
					    // Kotlin dependencies
 | 
				
			||||||
    implementation(platform("org.jetbrains.kotlin:kotlin-bom"))
 | 
					    implementation(platform("org.jetbrains.kotlin:kotlin-bom"))
 | 
				
			||||||
    implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
 | 
					    implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // Database layer
 | 
					 | 
				
			||||||
  implementation("org.jetbrains.xodus:xodus-openAPI:1.3.232")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    // Paper API
 | 
					    // Paper API
 | 
				
			||||||
    compileOnly("io.papermc.paper:paper-api:1.18.1-R0.1-SNAPSHOT")
 | 
					    compileOnly("io.papermc.paper:paper-api:1.18.1-R0.1-SNAPSHOT")
 | 
				
			||||||
}
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
java {
 | 
					  java {
 | 
				
			||||||
    val javaVersion = JavaVersion.toVersion(17)
 | 
					    val javaVersion = JavaVersion.toVersion(17)
 | 
				
			||||||
    sourceCompatibility = javaVersion
 | 
					    sourceCompatibility = javaVersion
 | 
				
			||||||
    targetCompatibility = javaVersion
 | 
					    targetCompatibility = javaVersion
 | 
				
			||||||
}
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
tasks.processResources {
 | 
					  tasks.processResources {
 | 
				
			||||||
    val props = mapOf("version" to version)
 | 
					    val props = mapOf("version" to version)
 | 
				
			||||||
    inputs.properties(props)
 | 
					    inputs.properties(props)
 | 
				
			||||||
    filteringCharset = "UTF-8"
 | 
					    filteringCharset = "UTF-8"
 | 
				
			||||||
    filesMatching("plugin.yml") {
 | 
					    filesMatching("plugin.yml") {
 | 
				
			||||||
      expand(props)
 | 
					      expand(props)
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										3
									
								
								foundation-bifrost/build.gradle.kts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								foundation-bifrost/build.gradle.kts
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,3 @@
 | 
				
			|||||||
 | 
					dependencies {
 | 
				
			||||||
 | 
					  implementation("net.dv8tion:JDA:5.0.0-alpha.2")
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,9 @@
 | 
				
			|||||||
 | 
					package cloud.kubelet.foundation.bifrost
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import org.bukkit.plugin.java.JavaPlugin
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class FoundationBifrostPlugin : JavaPlugin() {
 | 
				
			||||||
 | 
					  override fun onEnable() {
 | 
				
			||||||
 | 
					    slF4JLogger.info("Enabling!")
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										15
									
								
								foundation-bifrost/src/main/resources/plugin.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								foundation-bifrost/src/main/resources/plugin.yml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,15 @@
 | 
				
			|||||||
 | 
					name: Foundation-Bifrost
 | 
				
			||||||
 | 
					version: '${version}'
 | 
				
			||||||
 | 
					main: cloud.kubelet.foundation.bifrost.FoundationBifrostPlugin
 | 
				
			||||||
 | 
					api-version: 1.18
 | 
				
			||||||
 | 
					prefix: Foundation-Bifrost
 | 
				
			||||||
 | 
					load: STARTUP
 | 
				
			||||||
 | 
					depend:
 | 
				
			||||||
 | 
					  - Foundation
 | 
				
			||||||
 | 
					authors:
 | 
				
			||||||
 | 
					  - kubelet
 | 
				
			||||||
 | 
					commands:
 | 
				
			||||||
 | 
					  fbackup:
 | 
				
			||||||
 | 
					    description: Foundation Backup
 | 
				
			||||||
 | 
					    usage: /fbackup
 | 
				
			||||||
 | 
					    permission: foundation.backup
 | 
				
			||||||
							
								
								
									
										2
									
								
								foundation-core/build.gradle.kts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								foundation-core/build.gradle.kts
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,2 @@
 | 
				
			|||||||
 | 
					dependencies {
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -1,6 +1,6 @@
 | 
				
			|||||||
package cloud.kubelet.foundation
 | 
					package cloud.kubelet.foundation.core
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import cloud.kubelet.foundation.command.BackupCommand
 | 
					import cloud.kubelet.foundation.core.command.BackupCommand
 | 
				
			||||||
import io.papermc.paper.event.player.ChatEvent
 | 
					import io.papermc.paper.event.player.ChatEvent
 | 
				
			||||||
import net.kyori.adventure.text.Component
 | 
					import net.kyori.adventure.text.Component
 | 
				
			||||||
import org.bukkit.command.CommandExecutor
 | 
					import org.bukkit.command.CommandExecutor
 | 
				
			||||||
@ -8,7 +8,7 @@ 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
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class Foundation : JavaPlugin(), Listener {
 | 
					class FoundationCorePlugin : JavaPlugin(), Listener {
 | 
				
			||||||
  override fun onEnable() {
 | 
					  override fun onEnable() {
 | 
				
			||||||
    val dataPath = dataFolder.toPath()
 | 
					    val dataPath = dataFolder.toPath()
 | 
				
			||||||
    val backupPath = dataPath.resolve(BACKUPS_DIRECTORY)
 | 
					    val backupPath = dataPath.resolve(BACKUPS_DIRECTORY)
 | 
				
			||||||
@ -1,4 +1,4 @@
 | 
				
			|||||||
package cloud.kubelet.foundation
 | 
					package cloud.kubelet.foundation.core
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import net.kyori.adventure.text.format.TextColor
 | 
					import net.kyori.adventure.text.format.TextColor
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -1,4 +1,4 @@
 | 
				
			|||||||
package cloud.kubelet.foundation
 | 
					package cloud.kubelet.foundation.core
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import net.kyori.adventure.text.Component
 | 
					import net.kyori.adventure.text.Component
 | 
				
			||||||
import net.kyori.adventure.text.format.TextColor
 | 
					import net.kyori.adventure.text.format.TextColor
 | 
				
			||||||
@ -1,7 +1,7 @@
 | 
				
			|||||||
package cloud.kubelet.foundation.command
 | 
					package cloud.kubelet.foundation.core.command
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import cloud.kubelet.foundation.Foundation
 | 
					import cloud.kubelet.foundation.core.FoundationCorePlugin
 | 
				
			||||||
import cloud.kubelet.foundation.Util
 | 
					import cloud.kubelet.foundation.core.Util
 | 
				
			||||||
import net.kyori.adventure.text.Component
 | 
					import net.kyori.adventure.text.Component
 | 
				
			||||||
import net.kyori.adventure.text.format.TextColor
 | 
					import net.kyori.adventure.text.format.TextColor
 | 
				
			||||||
import org.bukkit.Server
 | 
					import org.bukkit.Server
 | 
				
			||||||
@ -20,14 +20,13 @@ import java.util.zip.ZipEntry
 | 
				
			|||||||
import java.util.zip.ZipOutputStream
 | 
					import java.util.zip.ZipOutputStream
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class BackupCommand(
 | 
					class BackupCommand(
 | 
				
			||||||
  private val plugin: Foundation,
 | 
					  private val plugin: FoundationCorePlugin,
 | 
				
			||||||
  private val backupPath: Path
 | 
					  private val backupPath: Path
 | 
				
			||||||
) : CommandExecutor {
 | 
					) : CommandExecutor {
 | 
				
			||||||
  override fun onCommand(
 | 
					  override fun onCommand(
 | 
				
			||||||
    sender: CommandSender, command: Command,
 | 
					    sender: CommandSender, command: Command, label: String, args: Array<String>
 | 
				
			||||||
    label: String, args: Array<String>
 | 
					 | 
				
			||||||
  ): Boolean {
 | 
					  ): Boolean {
 | 
				
			||||||
    if (!Foundation.BACKUP_ENABLED) {
 | 
					    if (!FoundationCorePlugin.BACKUP_ENABLED) {
 | 
				
			||||||
      sender.sendMessage(
 | 
					      sender.sendMessage(
 | 
				
			||||||
        Component
 | 
					        Component
 | 
				
			||||||
          .text("Backup is not enabled.")
 | 
					          .text("Backup is not enabled.")
 | 
				
			||||||
@ -1,6 +1,6 @@
 | 
				
			|||||||
name: Foundation
 | 
					name: Foundation
 | 
				
			||||||
version: '${version}'
 | 
					version: '${version}'
 | 
				
			||||||
main: cloud.kubelet.foundation.Foundation
 | 
					main: cloud.kubelet.foundation.core.FoundationCorePlugin
 | 
				
			||||||
api-version: 1.18
 | 
					api-version: 1.18
 | 
				
			||||||
prefix: Foundation
 | 
					prefix: Foundation
 | 
				
			||||||
load: STARTUP
 | 
					load: STARTUP
 | 
				
			||||||
@ -1 +1,6 @@
 | 
				
			|||||||
rootProject.name = "foundation"
 | 
					rootProject.name = "foundation"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					include(
 | 
				
			||||||
 | 
					  ":foundation-core",
 | 
				
			||||||
 | 
					  ":foundation-bifrost",
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user