current upd
This commit is contained in:
parent
f3e1c149fb
commit
1b5350eb11
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,6 +3,7 @@
|
||||
.settings
|
||||
lib/.settings
|
||||
lib/build
|
||||
lib/bin
|
||||
|
||||
# Ignore Gradle build output directory
|
||||
build
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -10,11 +10,22 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("org.spongepowered:spongeapi:7.2.0")
|
||||
// testImplementation("org.junit.jupiter:junit-jupiter")
|
||||
// testRuntimeOnly("org.junit.platform:junit-platform-launcher")
|
||||
implementation("org.spongepowered:spongeapi:7.4.0")
|
||||
}
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
tasks.jar {
|
||||
from("src/main/resources/plugin.json") {
|
||||
include("plugin.json")
|
||||
}
|
||||
manifest {
|
||||
attributes(
|
||||
"Main-Class" to "org.punkcraft.zombienoburnsun.ZombieNoburnSun"
|
||||
)
|
||||
}
|
||||
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",
|
||||
"plugins": [
|
||||
{
|
||||
"id": "worldswapper2",
|
||||
"name": "WorldSwapper2",
|
||||
"id": "zombienoburnsun",
|
||||
"name": "ZombieNoburnSun",
|
||||
"version": "${version}",
|
||||
"entrypoint": "org.punkcraft.worldswapper2.WorldSwapper2",
|
||||
"entrypoint": "org.punkcraft.zombienoburnsun.ZombieNoburnSun",
|
||||
"description": "My plugin description",
|
||||
"branding": {},
|
||||
"links": {
|
||||
@ -19,7 +19,7 @@
|
||||
"dependencies": [
|
||||
{
|
||||
"id": "spongeapi",
|
||||
"version": "7.2.0",
|
||||
"version": "7.4.0",
|
||||
"load-order": "after",
|
||||
"optional": false
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user