-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added permission node tbteleport.player.shop - default True
Added permission node tbteleport.admin.setshop - default OP Added permission node tbteleport.admin.cooldowns - default OP Added /shop - sends player to shop for current world Added /setshop - Sets current world /shop location to current location Added /setTTeleCooldown - Enables, disables and sets the timer for /wild cooldowns. Modified /setworldspawn to also save to config.yml for use with send to spawn on join. Modified /tp <player> <player> - Should no longer error if run from console.`
- Loading branch information
1 parent
d0d2018
commit dcba808
Showing
17 changed files
with
258 additions
and
152 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
.idea/libraries/Maven__com_googlecode_json_simple_json_simple_1_1_1.xml
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
6 changes: 3 additions & 3 deletions
6
.idea/libraries/Maven__io_github_leonardosnt_bungeechannelapi_1_0_0_SNAPSHOT.xml
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
src/main/java/me/shakeforprotein/treeboteleport/Listeners/KillZombies.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package me.shakeforprotein.treeboteleport.Listeners; | ||
|
||
import me.shakeforprotein.treeboteleport.TreeboTeleport; | ||
import org.bukkit.entity.*; | ||
import org.bukkit.event.EventHandler; | ||
import org.bukkit.event.Listener; | ||
import org.bukkit.event.entity.EntitySpawnEvent; | ||
import org.bukkit.event.world.ChunkLoadEvent; | ||
|
||
public class KillZombies implements Listener { | ||
|
||
private TreeboTeleport pl; | ||
|
||
public KillZombies(TreeboTeleport main) { | ||
this.pl = main; | ||
} | ||
|
||
@EventHandler | ||
public void onMobSpawn(EntitySpawnEvent e) { | ||
if (pl.getConfig().getBoolean("KillZombies")) { | ||
if ((e.getEntity() instanceof Zombie || e.getEntity() instanceof Drowned || e.getEntity() instanceof ZombieVillager) && !(e.getEntity() instanceof PigZombie)) { | ||
if (e.getEntity() instanceof Drowned) { | ||
((Drowned) e.getEntity()).setAI(false); | ||
} else if (e.getEntity() instanceof ZombieVillager) { | ||
((ZombieVillager) e.getEntity()).setAI(false); | ||
} else if (e.getEntity() instanceof Zombie) { | ||
((Zombie) e.getEntity()).setAI(false); | ||
} | ||
} | ||
} | ||
if (pl.getConfig().getBoolean("ReplacePhantomsWithPissedOffWolves")) { | ||
if (e.getEntity() instanceof Phantom) { | ||
e.setCancelled(true); | ||
} | ||
} | ||
} | ||
|
||
@EventHandler | ||
public void onChunkLoad(ChunkLoadEvent e) { | ||
for (Entity ent : e.getChunk().getEntities()) { | ||
if ((ent instanceof Zombie) || (ent instanceof Spider) || (ent instanceof Bat) || (ent instanceof Skeleton) || (ent instanceof Enderman) || (ent instanceof Illager) || ((ent instanceof Fish) && !(ent instanceof PufferFish)) || (ent instanceof Silverfish) || (ent instanceof Slime) || (ent instanceof Blaze) || (ent instanceof Guardian) || (ent instanceof Ghast) || (ent instanceof Vex) || (ent instanceof Phantom) || (ent instanceof SkeletonHorse) || (ent instanceof Rabbit) || (ent instanceof Squid)){ | ||
ent.remove(); | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.