changed template stuff
This commit is contained in:
parent
8cd3bf3f61
commit
f50f633310
@ -1,4 +1,5 @@
|
|||||||
kind: pipeline
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
name: default
|
name: default
|
||||||
|
|
||||||
steps:
|
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
|
# Installation
|
||||||
configuration and a docker-compose file for easy testing.
|
Only put the jar file inside the plugins directory and your done.
|
||||||
|
|
||||||
# Befor you start
|
# Usage
|
||||||
Make sure the minecraft version is set in `build.gradle`
|
TODO
|
||||||
```
|
|
||||||
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`.
|
|
||||||
|
|
||||||
# Build
|
# Build
|
||||||
The build is handled by gradle. So run `./gradlew clean build`. The doc for the plugin used can be found
|
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'
|
id 'dev.ethp.bukkit' version '0.1.6'
|
||||||
}
|
}
|
||||||
|
|
||||||
group 'com.example'
|
group 'org.kapelle'
|
||||||
description "Bukkit plugin template"
|
description "Revive for hardcore mode"
|
||||||
version '1.0'
|
version '0.1'
|
||||||
|
|
||||||
sourceCompatibility = '1.8'
|
sourceCompatibility = '1.8'
|
||||||
targetCompatibility = '1.8'
|
targetCompatibility = '1.8'
|
||||||
|
|
||||||
bukkit {
|
bukkit {
|
||||||
name 'bukkit-template'
|
name 'hardcore-revive'
|
||||||
main 'com.example.BukkitPlugin'
|
main 'org.kapelle.hardcore_revive.HardcoreRevive'
|
||||||
|
|
||||||
description 'Template for bukkit plugins'
|
description 'Revive for hardcore mode'
|
||||||
|
|
||||||
author 'Djeeberjr'
|
author 'Djeeberjr'
|
||||||
|
|
||||||
api {
|
api {
|
||||||
version '1.16.1'
|
version '1.16.1'
|
||||||
}
|
}
|
||||||
|
|
||||||
command 'ping', {
|
|
||||||
description 'Replies with "Pong!"'
|
|
||||||
usage 'Usage: /ping'
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
|
@ -3,7 +3,7 @@ version: "3"
|
|||||||
services:
|
services:
|
||||||
spigot-dev:
|
spigot-dev:
|
||||||
image: "nimmis/spigot"
|
image: "nimmis/spigot"
|
||||||
container_name: "spigot-dev"
|
container_name: "spigot-dev-hc-revive"
|
||||||
environment:
|
environment:
|
||||||
- EULA=true
|
- EULA=true
|
||||||
- MC_MAXMEM=4g
|
- MC_MAXMEM=4g
|
||||||
@ -13,4 +13,4 @@ services:
|
|||||||
- "./container:/minecraft"
|
- "./container:/minecraft"
|
||||||
restart: "no"
|
restart: "no"
|
||||||
ports:
|
ports:
|
||||||
- "25565:25565"
|
- "25565:25565"
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
#!/usr/bin/env sh
|
#!/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
|
#!/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