Some minor tweaks to the code
Hope I didn't break anything
This commit is contained in:
parent
e47fb2bc24
commit
339210e887
@ -23,7 +23,7 @@ public class AnvilRitual extends Ritual {
|
||||
|
||||
@Override
|
||||
public void execute(Player caster, Player target, Location location) {
|
||||
FallingBlock block = target.getLocation().getWorld().spawnFallingBlock(target.getLocation().clone().add(0, 20, 0), Material.ANVIL, (byte) 0);
|
||||
FallingBlock block = target.getWorld().spawnFallingBlock(target.getLocation().clone().add(0, 20, 0), Material.ANVIL, (byte) 0);
|
||||
block.setHurtEntities(true);
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,6 @@ public class BatSpewRitual extends Ritual {
|
||||
addIngredient(Material.WHEAT, 64);
|
||||
addIngredient(Material.IRON_PICKAXE, 1);
|
||||
addSacrifice(EntityType.CHICKEN, 1);
|
||||
health = 4;
|
||||
name = "bat spew";
|
||||
backfire = 0.1;
|
||||
}
|
||||
@ -22,7 +21,7 @@ public class BatSpewRitual extends Ritual {
|
||||
@Override
|
||||
public void execute(Player caster, Player target, Location location) {
|
||||
for (int i = 0; i < 20; i++) {
|
||||
target.getLocation().getWorld().spawnEntity(target.getLocation(), EntityType.CHICKEN);
|
||||
target.getWorld().spawnEntity(target.getLocation(), EntityType.CHICKEN);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,7 @@ public class ChickenSpewRitual extends Ritual {
|
||||
@Override
|
||||
public void execute(Player caster, Player target, Location location) {
|
||||
for (int i = 0; i < 20; i++) {
|
||||
target.getLocation().getWorld().spawnEntity(target.getLocation(), EntityType.CHICKEN);
|
||||
target.getWorld().spawnEntity(target.getLocation(), EntityType.CHICKEN);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,6 @@ package top.penowl.quidproquo.rituals;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.World;
|
||||
@ -22,10 +21,10 @@ public class LightningRitual extends Ritual {
|
||||
@Override
|
||||
public void execute(Player caster, Player target, Location location) {
|
||||
// Does this actually get the overworld?
|
||||
World overworld = Bukkit.getWorld("world");
|
||||
List<Player> players = overworld.getPlayers();
|
||||
World world = location.getWorld();
|
||||
List<Player> players = world.getPlayers();
|
||||
for(Player player : players) {
|
||||
overworld.strikeLightningEffect(player.getLocation().clone().add(0, 1, 0));
|
||||
world.strikeLightningEffect(player.getLocation().clone().add(0, 1, 0));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,6 @@ public class WoolingRitual extends Ritual {
|
||||
|
||||
@Override
|
||||
public void execute(Player caster, Player target, Location location) {
|
||||
caster.setHealth(Math.min(caster.getMaxHealth(), caster.getHealth()+2.0));
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user