Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
8a5c094ce1 | |||
5e79df9f44 |
@ -397,6 +397,10 @@ portalInfoServer=Server: %server%
|
||||
|
||||
# Changes
|
||||
|
||||
#### \[Version 0.9.3.3] EpicKnarvik97 fork
|
||||
|
||||
- Prevents Zombified Piglins from randomly spawning at Stargates
|
||||
|
||||
#### \[Version 0.9.3.2] EpicKnarvik97 fork
|
||||
|
||||
- Adds a config option to set the exit velocity of any players exiting a stargate
|
||||
|
2
pom.xml
2
pom.xml
@ -4,7 +4,7 @@
|
||||
|
||||
<groupId>net.knarcraft</groupId>
|
||||
<artifactId>Stargate</artifactId>
|
||||
<version>0.9.3.2</version>
|
||||
<version>0.9.3.3</version>
|
||||
|
||||
<licenses>
|
||||
<license>
|
||||
|
@ -10,6 +10,7 @@ import net.knarcraft.stargate.container.BlockChangeRequest;
|
||||
import net.knarcraft.stargate.container.ChunkUnloadRequest;
|
||||
import net.knarcraft.stargate.listener.BlockEventListener;
|
||||
import net.knarcraft.stargate.listener.EntityEventListener;
|
||||
import net.knarcraft.stargate.listener.EntitySpawnListener;
|
||||
import net.knarcraft.stargate.listener.PlayerEventListener;
|
||||
import net.knarcraft.stargate.listener.PluginEventListener;
|
||||
import net.knarcraft.stargate.listener.PortalEventListener;
|
||||
@ -388,6 +389,7 @@ public class Stargate extends JavaPlugin {
|
||||
pluginManager.registerEvents(new WorldEventListener(), this);
|
||||
pluginManager.registerEvents(new PluginEventListener(this), this);
|
||||
pluginManager.registerEvents(new TeleportEventListener(), this);
|
||||
pluginManager.registerEvents(new EntitySpawnListener(), this);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -0,0 +1,25 @@
|
||||
package net.knarcraft.stargate.listener;
|
||||
|
||||
import net.knarcraft.stargate.Stargate;
|
||||
import net.knarcraft.stargate.portal.PortalHandler;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.entity.CreatureSpawnEvent;
|
||||
|
||||
/**
|
||||
* A listener that listens for any relevant events causing entities to spawn
|
||||
*/
|
||||
public class EntitySpawnListener implements Listener {
|
||||
|
||||
@EventHandler
|
||||
public void onCreatureSpawn(CreatureSpawnEvent event) {
|
||||
//Prevent Zombified Piglins and other creatures form spawning at stargates
|
||||
if (event.getSpawnReason() == CreatureSpawnEvent.SpawnReason.NETHER_PORTAL) {
|
||||
if (PortalHandler.getByEntrance(event.getLocation()) != null) {
|
||||
event.setCancelled(true);
|
||||
Stargate.debug("EntitySpawnListener", "Prevented creature from spawning at Stargate");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
name: Stargate
|
||||
main: net.knarcraft.stargate.Stargate
|
||||
version: 0.9.3.2
|
||||
version: 0.9.3.3
|
||||
description: Stargate mod for Bukkit Revived
|
||||
author: EpicKnarvik97
|
||||
authors: [ Drakia, PseudoKnight, EpicKnarvik97 ]
|
||||
|
Reference in New Issue
Block a user