Snowman ritual
This commit is contained in:
parent
2091effbea
commit
00a850827f
@ -52,9 +52,9 @@ public final class Events implements Listener {
|
|||||||
List<Player> players = new ArrayList<Player>(Bukkit.getOnlinePlayers());
|
List<Player> players = new ArrayList<Player>(Bukkit.getOnlinePlayers());
|
||||||
List<UUID> uuids = new ArrayList<UUID>();
|
List<UUID> uuids = new ArrayList<UUID>();
|
||||||
for (Player target : players) {
|
for (Player target : players) {
|
||||||
if (target.getUniqueId() != playerUuid) {
|
//if (target.getUniqueId() != playerUuid) {
|
||||||
uuids.add(target.getUniqueId());
|
uuids.add(target.getUniqueId());
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
Collections.sort(uuids);
|
Collections.sort(uuids);
|
||||||
|
|
||||||
@ -70,7 +70,7 @@ public final class Events implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// friendly message
|
// friendly message
|
||||||
player.sendMessage(ChatColor.YELLOW + "Switched target to " + Bukkit.getPlayer(QuidProQuo.instance.targets.get(playerUuid)));
|
player.sendMessage(ChatColor.YELLOW + "Switched target to " + Bukkit.getPlayer(QuidProQuo.instance.targets.get(playerUuid)).getName());
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@ import org.bukkit.plugin.java.JavaPlugin;
|
|||||||
|
|
||||||
import top.penowl.quidproquo.rituals.FeedingRitual;
|
import top.penowl.quidproquo.rituals.FeedingRitual;
|
||||||
import top.penowl.quidproquo.rituals.HealRitual;
|
import top.penowl.quidproquo.rituals.HealRitual;
|
||||||
|
import top.penowl.quidproquo.rituals.SnowmanRitual;
|
||||||
import top.penowl.quidproquo.rituals.WoolingRitual;
|
import top.penowl.quidproquo.rituals.WoolingRitual;
|
||||||
|
|
||||||
public class QuidProQuo extends JavaPlugin {
|
public class QuidProQuo extends JavaPlugin {
|
||||||
@ -36,6 +37,7 @@ public class QuidProQuo extends JavaPlugin {
|
|||||||
rituals.add(new HealRitual());
|
rituals.add(new HealRitual());
|
||||||
rituals.add(new WoolingRitual());
|
rituals.add(new WoolingRitual());
|
||||||
rituals.add(new FeedingRitual());
|
rituals.add(new FeedingRitual());
|
||||||
|
rituals.add(new SnowmanRitual());
|
||||||
|
|
||||||
// run ritual setup scripts
|
// run ritual setup scripts
|
||||||
for (Ritual ritual : rituals) {
|
for (Ritual ritual : rituals) {
|
||||||
|
@ -0,0 +1,28 @@
|
|||||||
|
package top.penowl.quidproquo.rituals;
|
||||||
|
|
||||||
|
import org.bukkit.Location;
|
||||||
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.entity.EntityType;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import top.penowl.quidproquo.Ritual;
|
||||||
|
|
||||||
|
public class SnowmanRitual extends Ritual {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setup() {
|
||||||
|
addIngredient(Material.STICK, 64);
|
||||||
|
addIngredient(Material.DIAMOND, 2);
|
||||||
|
addSacrifice(EntityType.SHEEP, 3);
|
||||||
|
health = 10;
|
||||||
|
name = "snowing";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute(Player caster, Player target, Location location) {
|
||||||
|
for (int i = 0; i < 10; i++) {
|
||||||
|
target.getLocation().getWorld().spawnEntity(target.getLocation(), EntityType.SNOWMAN);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user