current upd
This commit is contained in:
parent
f3e1c149fb
commit
1b5350eb11
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,6 +3,7 @@
|
|||||||
.settings
|
.settings
|
||||||
lib/.settings
|
lib/.settings
|
||||||
lib/build
|
lib/build
|
||||||
|
lib/bin
|
||||||
|
|
||||||
# Ignore Gradle build output directory
|
# Ignore Gradle build output directory
|
||||||
build
|
build
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -10,11 +10,22 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation("org.spongepowered:spongeapi:7.2.0")
|
implementation("org.spongepowered:spongeapi:7.4.0")
|
||||||
// testImplementation("org.junit.jupiter:junit-jupiter")
|
}
|
||||||
// testRuntimeOnly("org.junit.platform:junit-platform-launcher")
|
|
||||||
|
java {
|
||||||
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
targetCompatibility = JavaVersion.VERSION_1_8
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.jar {
|
tasks.jar {
|
||||||
|
from("src/main/resources/plugin.json") {
|
||||||
|
include("plugin.json")
|
||||||
|
}
|
||||||
|
manifest {
|
||||||
|
attributes(
|
||||||
|
"Main-Class" to "org.punkcraft.zombienoburnsun.ZombieNoburnSun"
|
||||||
|
)
|
||||||
|
}
|
||||||
archiveBaseName.set("OneWorld")
|
archiveBaseName.set("OneWorld")
|
||||||
}
|
}
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
package org.punkcraft.oneworld;
|
|
||||||
|
|
||||||
import org.spongepowered.api.plugin.Plugin;
|
|
||||||
|
|
||||||
|
|
||||||
@Plugin(id = "oneworldsponge", name = "OneWorldSponge", version = "1.0", description = "OneWorldSponge")
|
|
||||||
public class OneWorldSponge {
|
|
||||||
|
|
||||||
}
|
|
@ -0,0 +1,27 @@
|
|||||||
|
package org.punkcraft.zombienoburnsun;
|
||||||
|
|
||||||
|
import org.spongepowered.api.entity.EntityTypes;
|
||||||
|
import org.spongepowered.api.event.Listener;
|
||||||
|
import com.google.inject.Inject;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.spongepowered.api.event.Order;
|
||||||
|
import org.spongepowered.api.event.entity.IgniteEntityEvent;
|
||||||
|
import org.spongepowered.api.plugin.Plugin;
|
||||||
|
|
||||||
|
@Plugin(id = "zombienoburnsun", name = "ZombieNoburnSun", version = "1.0", description = "Prevents zombies from burning in sunlight.")
|
||||||
|
public class ZombieNoburnSun {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private Logger logger;
|
||||||
|
|
||||||
|
@Listener(order = Order.FIRST)
|
||||||
|
public void onEntityIgnite(IgniteEntityEvent event) {
|
||||||
|
if (event.getTargetEntity().getType() == EntityTypes.ZOMBIE) {
|
||||||
|
event.setCancelled(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Logger getLogger() {
|
||||||
|
return logger;
|
||||||
|
}
|
||||||
|
}
|
@ -6,10 +6,10 @@
|
|||||||
"license": "All-Rights-Reserved",
|
"license": "All-Rights-Reserved",
|
||||||
"plugins": [
|
"plugins": [
|
||||||
{
|
{
|
||||||
"id": "worldswapper2",
|
"id": "zombienoburnsun",
|
||||||
"name": "WorldSwapper2",
|
"name": "ZombieNoburnSun",
|
||||||
"version": "${version}",
|
"version": "${version}",
|
||||||
"entrypoint": "org.punkcraft.worldswapper2.WorldSwapper2",
|
"entrypoint": "org.punkcraft.zombienoburnsun.ZombieNoburnSun",
|
||||||
"description": "My plugin description",
|
"description": "My plugin description",
|
||||||
"branding": {},
|
"branding": {},
|
||||||
"links": {
|
"links": {
|
||||||
@ -19,7 +19,7 @@
|
|||||||
"dependencies": [
|
"dependencies": [
|
||||||
{
|
{
|
||||||
"id": "spongeapi",
|
"id": "spongeapi",
|
||||||
"version": "7.2.0",
|
"version": "7.4.0",
|
||||||
"load-order": "after",
|
"load-order": "after",
|
||||||
"optional": false
|
"optional": false
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user