create plugin structure
This commit is contained in:
		
							
								
								
									
										118
									
								
								.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										118
									
								
								.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,118 @@
 | 
				
			|||||||
 | 
					# User-specific stuff
 | 
				
			||||||
 | 
					.idea/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					*.iml
 | 
				
			||||||
 | 
					*.ipr
 | 
				
			||||||
 | 
					*.iws
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# IntelliJ
 | 
				
			||||||
 | 
					out/
 | 
				
			||||||
 | 
					# mpeltonen/sbt-idea plugin
 | 
				
			||||||
 | 
					.idea_modules/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# JIRA plugin
 | 
				
			||||||
 | 
					atlassian-ide-plugin.xml
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Compiled class file
 | 
				
			||||||
 | 
					*.class
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Log file
 | 
				
			||||||
 | 
					*.log
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# BlueJ files
 | 
				
			||||||
 | 
					*.ctxt
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# 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*
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					*~
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# temporary files which can be created if a process still has a handle open of a deleted file
 | 
				
			||||||
 | 
					.fuse_hidden*
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# KDE directory preferences
 | 
				
			||||||
 | 
					.directory
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Linux trash folder which might appear on any partition or disk
 | 
				
			||||||
 | 
					.Trash-*
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# .nfs files are created when an open file is removed but is still being accessed
 | 
				
			||||||
 | 
					.nfs*
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# General
 | 
				
			||||||
 | 
					.DS_Store
 | 
				
			||||||
 | 
					.AppleDouble
 | 
				
			||||||
 | 
					.LSOverride
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Icon must end with two \r
 | 
				
			||||||
 | 
					Icon
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Thumbnails
 | 
				
			||||||
 | 
					._*
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Files that might appear in the root of a volume
 | 
				
			||||||
 | 
					.DocumentRevisions-V100
 | 
				
			||||||
 | 
					.fseventsd
 | 
				
			||||||
 | 
					.Spotlight-V100
 | 
				
			||||||
 | 
					.TemporaryItems
 | 
				
			||||||
 | 
					.Trashes
 | 
				
			||||||
 | 
					.VolumeIcon.icns
 | 
				
			||||||
 | 
					.com.apple.timemachine.donotpresent
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Directories potentially created on remote AFP share
 | 
				
			||||||
 | 
					.AppleDB
 | 
				
			||||||
 | 
					.AppleDesktop
 | 
				
			||||||
 | 
					Network Trash Folder
 | 
				
			||||||
 | 
					Temporary Items
 | 
				
			||||||
 | 
					.apdisk
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Windows thumbnail cache files
 | 
				
			||||||
 | 
					Thumbs.db
 | 
				
			||||||
 | 
					Thumbs.db:encryptable
 | 
				
			||||||
 | 
					ehthumbs.db
 | 
				
			||||||
 | 
					ehthumbs_vista.db
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Dump file
 | 
				
			||||||
 | 
					*.stackdump
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Folder config file
 | 
				
			||||||
 | 
					[Dd]esktop.ini
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Recycle Bin used on file shares
 | 
				
			||||||
 | 
					$RECYCLE.BIN/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Windows Installer files
 | 
				
			||||||
 | 
					*.cab
 | 
				
			||||||
 | 
					*.msi
 | 
				
			||||||
 | 
					*.msix
 | 
				
			||||||
 | 
					*.msm
 | 
				
			||||||
 | 
					*.msp
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Windows shortcuts
 | 
				
			||||||
 | 
					*.lnk
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.gradle
 | 
				
			||||||
 | 
					build/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Ignore Gradle GUI config
 | 
				
			||||||
 | 
					gradle-app.setting
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Cache of project
 | 
				
			||||||
 | 
					.gradletasknamecache
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					**/build/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Common working directory
 | 
				
			||||||
 | 
					run/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
 | 
				
			||||||
 | 
					!gradle-wrapper.jar
 | 
				
			||||||
							
								
								
									
										47
									
								
								build.gradle
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										47
									
								
								build.gradle
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,47 @@
 | 
				
			|||||||
 | 
					plugins {
 | 
				
			||||||
 | 
					    id 'java'
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					group = 'eu.mhsl.craftattack'
 | 
				
			||||||
 | 
					version = '1.0'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					repositories {
 | 
				
			||||||
 | 
					    mavenCentral()
 | 
				
			||||||
 | 
					    maven {
 | 
				
			||||||
 | 
					        name = "papermc-repo"
 | 
				
			||||||
 | 
					        url = "https://repo.papermc.io/repository/maven-public/"
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    maven {
 | 
				
			||||||
 | 
					        name = "sonatype"
 | 
				
			||||||
 | 
					        url = "https://oss.sonatype.org/content/groups/public/"
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					dependencies {
 | 
				
			||||||
 | 
					    compileOnly "io.papermc.paper:paper-api:1.19.4-R0.1-SNAPSHOT"
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def targetJavaVersion = 17
 | 
				
			||||||
 | 
					java {
 | 
				
			||||||
 | 
					    def javaVersion = JavaVersion.toVersion(targetJavaVersion)
 | 
				
			||||||
 | 
					    sourceCompatibility = javaVersion
 | 
				
			||||||
 | 
					    targetCompatibility = javaVersion
 | 
				
			||||||
 | 
					    if (JavaVersion.current() < javaVersion) {
 | 
				
			||||||
 | 
					        toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					tasks.withType(JavaCompile).configureEach {
 | 
				
			||||||
 | 
					    if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
 | 
				
			||||||
 | 
					        options.release = targetJavaVersion
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					processResources {
 | 
				
			||||||
 | 
					    def props = [version: version]
 | 
				
			||||||
 | 
					    inputs.properties props
 | 
				
			||||||
 | 
					    filteringCharset 'UTF-8'
 | 
				
			||||||
 | 
					    filesMatching('paper-plugin.yml') {
 | 
				
			||||||
 | 
					        expand props
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										0
									
								
								gradle.properties
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								gradle.properties
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										1
									
								
								gradle/wrapper/gradle-wrapper.properties
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								gradle/wrapper/gradle-wrapper.properties
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
				
			|||||||
 | 
					distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
 | 
				
			||||||
							
								
								
									
										1
									
								
								settings.gradle
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								settings.gradle
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
				
			|||||||
 | 
					rootProject.name = 'spawn'
 | 
				
			||||||
							
								
								
									
										17
									
								
								src/main/java/eu/mhsl/craftattack/spawn/Main.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								src/main/java/eu/mhsl/craftattack/spawn/Main.java
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,17 @@
 | 
				
			|||||||
 | 
					package eu.mhsl.craftattack.spawn;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import org.bukkit.plugin.java.JavaPlugin;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public final class Main extends JavaPlugin {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public void onEnable() {
 | 
				
			||||||
 | 
					        // Plugin startup logic
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public void onDisable() {
 | 
				
			||||||
 | 
					        // Plugin shutdown logic
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										5
									
								
								src/main/resources/paper-plugin.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								src/main/resources/paper-plugin.yml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,5 @@
 | 
				
			|||||||
 | 
					name: spawn
 | 
				
			||||||
 | 
					version: '${version}'
 | 
				
			||||||
 | 
					main: eu.mhsl.craftattack.spawn.Main
 | 
				
			||||||
 | 
					api-version: 1.19
 | 
				
			||||||
 | 
					load: STARTUP
 | 
				
			||||||
		Reference in New Issue
	
	Block a user