changed template stuff
This commit is contained in:
parent
8cd3bf3f61
commit
f50f633310
@ -1,4 +1,5 @@
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: default
|
||||
|
||||
steps:
|
||||
|
1
.idea/.name
Normal file
1
.idea/.name
Normal file
@ -0,0 +1 @@
|
||||
hardcore-revive
|
21
README.md
21
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
|
||||
|
18
build.gradle
18
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 {
|
||||
|
@ -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"
|
||||
- "25565:25565"
|
||||
|
@ -1,2 +1,2 @@
|
||||
#!/usr/bin/env sh
|
||||
sudo docker exec spigot-dev mc_log
|
||||
sudo docker exec spigot-dev-hc-revive mc_log
|
@ -1,2 +1,2 @@
|
||||
#!/usr/bin/env sh
|
||||
sudo docker exec spigot-dev mc_restart
|
||||
sudo docker exec spigot-dev-hc-revive mc_restart
|
@ -1,2 +1,2 @@
|
||||
rootProject.name = 'bukkit-template'
|
||||
rootProject.name = 'hardcore-revive'
|
||||
|
||||
|
@ -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());
|
||||
}
|
||||
|
||||
}
|
@ -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;
|
||||
}
|
||||
}
|
@ -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");
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user