changed template stuff

This commit is contained in:
Niklas 2020-06-26 16:42:45 +02:00
parent 8cd3bf3f61
commit f50f633310
11 changed files with 30 additions and 69 deletions

View File

@ -1,4 +1,5 @@
kind: pipeline
type: docker
name: default
steps:

1
.idea/.name Normal file
View File

@ -0,0 +1 @@
hardcore-revive

View File

@ -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

View File

@ -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 {

View File

@ -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

View File

@ -1,2 +1,2 @@
#!/usr/bin/env sh
sudo docker exec spigot-dev mc_log
sudo docker exec spigot-dev-hc-revive mc_log

View File

@ -1,2 +1,2 @@
#!/usr/bin/env sh
sudo docker exec spigot-dev mc_restart
sudo docker exec spigot-dev-hc-revive mc_restart

View File

@ -1,2 +1,2 @@
rootProject.name = 'bukkit-template'
rootProject.name = 'hardcore-revive'

View File

@ -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());
}
}

View File

@ -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;
}
}

View File

@ -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");
}
}