From f50f633310eb1b82f621f467a588928c9705f6b6 Mon Sep 17 00:00:00 2001 From: Niklas Date: Fri, 26 Jun 2020 16:42:45 +0200 Subject: [PATCH] changed template stuff --- .drone.yml | 1 + .idea/.name | 1 + README.md | 21 +++++------------- build.gradle | 18 +++++---------- dev/docker-compose.yml | 4 ++-- dev/log.sh | 2 +- dev/restartServer.sh | 2 +- settings.gradle | 2 +- src/main/java/com/example/BukkitPlugin.java | 14 ------------ .../com/example/ExampleCommandExecutor.java | 22 ------------------- .../hardcore_revive/HardcoreRevive.java | 12 ++++++++++ 11 files changed, 30 insertions(+), 69 deletions(-) create mode 100644 .idea/.name delete mode 100644 src/main/java/com/example/BukkitPlugin.java delete mode 100644 src/main/java/com/example/ExampleCommandExecutor.java create mode 100644 src/main/java/org/kapelle/hardcore_revive/HardcoreRevive.java diff --git a/.drone.yml b/.drone.yml index b4d6130..105b403 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,4 +1,5 @@ kind: pipeline +type: docker name: default steps: diff --git a/.idea/.name b/.idea/.name new file mode 100644 index 0000000..dd1e566 --- /dev/null +++ b/.idea/.name @@ -0,0 +1 @@ +hardcore-revive \ No newline at end of file diff --git a/README.md b/README.md index e6eedf6..dd0abcd 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,10 @@ -# bukkit-template +# Bukkit hardcore revive -This is a template for bukkit plugins. It contains some example code with a `/ping` command, a gradle build -configuration and a docker-compose file for easy testing. +# Installation +Only put the jar file inside the plugins directory and your done. -# Befor you start -Make sure the minecraft version is set in `build.gradle` -``` -api { - version '1.16.1' -} -``` -and in `dev/docker-compose.yml` -``` -- SPIGOT_VER=1.16.1 -``` - -Also make sure to change description, author, name, etc in `build.gradle` and the project name in `settings.gradle`. +# Usage +TODO # Build The build is handled by gradle. So run `./gradlew clean build`. The doc for the plugin used can be found diff --git a/build.gradle b/build.gradle index b87aff5..4484ff9 100644 --- a/build.gradle +++ b/build.gradle @@ -3,30 +3,24 @@ plugins { id 'dev.ethp.bukkit' version '0.1.6' } -group 'com.example' -description "Bukkit plugin template" -version '1.0' +group 'org.kapelle' +description "Revive for hardcore mode" +version '0.1' sourceCompatibility = '1.8' targetCompatibility = '1.8' bukkit { - name 'bukkit-template' - main 'com.example.BukkitPlugin' + name 'hardcore-revive' + main 'org.kapelle.hardcore_revive.HardcoreRevive' - description 'Template for bukkit plugins' + description 'Revive for hardcore mode' author 'Djeeberjr' api { version '1.16.1' } - - command 'ping', { - description 'Replies with "Pong!"' - usage 'Usage: /ping' - } - } repositories { diff --git a/dev/docker-compose.yml b/dev/docker-compose.yml index 9e16209..0e2effd 100644 --- a/dev/docker-compose.yml +++ b/dev/docker-compose.yml @@ -3,7 +3,7 @@ version: "3" services: spigot-dev: image: "nimmis/spigot" - container_name: "spigot-dev" + container_name: "spigot-dev-hc-revive" environment: - EULA=true - MC_MAXMEM=4g @@ -13,4 +13,4 @@ services: - "./container:/minecraft" restart: "no" ports: - - "25565:25565" \ No newline at end of file + - "25565:25565" diff --git a/dev/log.sh b/dev/log.sh index 842941c..27a21e9 100755 --- a/dev/log.sh +++ b/dev/log.sh @@ -1,2 +1,2 @@ #!/usr/bin/env sh -sudo docker exec spigot-dev mc_log \ No newline at end of file +sudo docker exec spigot-dev-hc-revive mc_log \ No newline at end of file diff --git a/dev/restartServer.sh b/dev/restartServer.sh index 800c199..3d6f998 100755 --- a/dev/restartServer.sh +++ b/dev/restartServer.sh @@ -1,2 +1,2 @@ #!/usr/bin/env sh -sudo docker exec spigot-dev mc_restart \ No newline at end of file +sudo docker exec spigot-dev-hc-revive mc_restart \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index e638974..955f545 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,2 +1,2 @@ -rootProject.name = 'bukkit-template' +rootProject.name = 'hardcore-revive' diff --git a/src/main/java/com/example/BukkitPlugin.java b/src/main/java/com/example/BukkitPlugin.java deleted file mode 100644 index 85afdf3..0000000 --- a/src/main/java/com/example/BukkitPlugin.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.example; - -import org.bukkit.plugin.java.JavaPlugin; - -public class BukkitPlugin extends JavaPlugin { - - @Override - public void onEnable() { - this.getLogger().info("bukkit-template plugin enabled"); - - this.getCommand("ping").setExecutor(new ExampleCommandExecutor()); - } - -} \ No newline at end of file diff --git a/src/main/java/com/example/ExampleCommandExecutor.java b/src/main/java/com/example/ExampleCommandExecutor.java deleted file mode 100644 index 7a84a69..0000000 --- a/src/main/java/com/example/ExampleCommandExecutor.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.example; - -import org.bukkit.command.Command; -import org.bukkit.command.CommandExecutor; -import org.bukkit.command.CommandSender; -import org.bukkit.entity.Player; - -public class ExampleCommandExecutor implements CommandExecutor { - - public ExampleCommandExecutor() { - } - - @Override - public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) { - if (sender instanceof Player) { - Player player = (Player) sender; - player.sendMessage("pong"); - return true; - } - return false; - } -} diff --git a/src/main/java/org/kapelle/hardcore_revive/HardcoreRevive.java b/src/main/java/org/kapelle/hardcore_revive/HardcoreRevive.java new file mode 100644 index 0000000..5b82c93 --- /dev/null +++ b/src/main/java/org/kapelle/hardcore_revive/HardcoreRevive.java @@ -0,0 +1,12 @@ +package org.kapelle.hardcore_revive; + +import org.bukkit.plugin.java.JavaPlugin; + +public class HardcoreRevive extends JavaPlugin { + + @Override + public void onEnable() { + this.getLogger().info("hardcore-revive plugin enabled"); + } + +} \ No newline at end of file