tweaked launch stick mechanics and added more useful info to other utility mechanics

This commit is contained in:
kai ohara 2025-02-10 21:45:01 -05:00
parent 86b28773a5
commit 9fcb081c5c
35 changed files with 16 additions and 8 deletions

View File

@ -20,4 +20,8 @@ commands:
getwand:
description: "Gives player a levitation wand"
usage: "/getwand"
permission: CoswayUtil.wand
permission: CoswayUtil.wand
launchstick:
description: give player a stick to use for launching themselves
usage: /launchstick
permission: CoswayUtil.launchStick

View File

@ -9,6 +9,8 @@ import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import java.util.Collections;
public class GravityGauntletCommand implements CommandExecutor {
@Override
@ -20,6 +22,7 @@ public class GravityGauntletCommand implements CommandExecutor {
if (meta != null) {
meta.setDisplayName(ChatColor.LIGHT_PURPLE + "Gravity Gauntlet");
meta.setLore(Collections.singletonList(ChatColor.GOLD + "Right Click to pull, Shift+Right Click to throw"));
meta.setUnbreakable(true);
gauntlet.setItemMeta(meta);
}

View File

@ -1,8 +1,6 @@
package CoswayUtil;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.*;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
@ -45,8 +43,9 @@ public class LaunchStick implements Listener {
// Add player to no-fall damage list
noFallPlayers.add(player);
player.sendMessage(ChatColor.GREEN + "You launched yourself forward!");
player.getWorld().playSound(player.getLocation(), Sound.ENTITY_BREEZE_JUMP,10,0);
player.getWorld().playEffect(player.getLocation(), Effect.TRIAL_SPAWNER_DETECT_PLAYER_OMINOUS,1);
//player.sendMessage(ChatColor.GREEN + "You launched yourself forward!");
}
// Prevent fall damage for launched players

View File

@ -13,6 +13,7 @@ import org.bukkit.persistence.PersistentDataType;
import org.bukkit.scheduler.BukkitRunnable;
import org.bukkit.util.Vector;
import java.util.Collections;
import java.util.HashMap;
import java.util.UUID;
@ -57,7 +58,7 @@ public class MobLevitationWand implements Listener {
private boolean isLevitationWand(ItemStack item) {
if (item == null || item.getType() != Material.STICK || !item.hasItemMeta()) return false;
if (item == null || item.getType() != Material.CARROT_ON_A_STICK || !item.hasItemMeta()) return false;
ItemMeta meta = item.getItemMeta();
return meta.getPersistentDataContainer().has(wandKey, PersistentDataType.STRING);
}
@ -117,9 +118,10 @@ public class MobLevitationWand implements Listener {
}
public static ItemStack createWand() {
ItemStack wand = new ItemStack(Material.STICK);
ItemStack wand = new ItemStack(Material.CARROT_ON_A_STICK);
ItemMeta meta = wand.getItemMeta();
meta.setDisplayName(ChatColor.LIGHT_PURPLE + "Levitation Wand");
meta.setLore(Collections.singletonList(ChatColor.GOLD + "Right Click near a mob to pick it up"));
meta.getPersistentDataContainer().set(new NamespacedKey("coswayutil", "levitation_wand"), PersistentDataType.STRING, "true");
wand.setItemMeta(meta);
return wand;