made changes to scale set selector and added sounds to throw mechanic

This commit is contained in:
kai ohara 2025-02-05 21:23:01 -05:00
parent 848e21cad2
commit b6b690afd8
23 changed files with 12 additions and 3 deletions

Binary file not shown.

Binary file not shown.

View File

@ -3,7 +3,7 @@ plugins {
} }
group = 'com.newt-tech' group = 'com.newt-tech'
version = '1.7-BETA' version = '1.8-BETA'
repositories { repositories {
mavenCentral() mavenCentral()

View File

@ -1,5 +1,5 @@
name: CoswayUtil name: CoswayUtil
version: '1.7-BETA' version: '1.8-BETA'
main: CoswayUtil.CoswayUtil main: CoswayUtil.CoswayUtil
description: "utility plugin for Cosway servers, a yescraft network server" description: "utility plugin for Cosway servers, a yescraft network server"
api-version: '1.21' api-version: '1.21'

View File

@ -111,7 +111,14 @@ public final class CoswayUtil extends JavaPlugin {
player.sendMessage("§aSet scale of " + entity.getName() + " to " + value); player.sendMessage("§aSet scale of " + entity.getName() + " to " + value);
} else { } else {
player.sendMessage("§cNot Looking at any entity!"); player.sendMessage("§cNot Looking at any entity! setting for nearest player in radius!");
Entity entity = getNearestPlayer(player,4);
String entityUUID = entity.getUniqueId().toString();
String command = "attribute " + entityUUID + " minecraft:scale base set " + value;
Bukkit.dispatchCommand(Bukkit.getConsoleSender(), command);
player.sendMessage("§aSet scale of " + entity.getName() + " to " + value);
} }
} }
public String ColorKey(String t) { public String ColorKey(String t) {
@ -136,6 +143,8 @@ public final class CoswayUtil extends JavaPlugin {
if (entity == null || source == null) return; if (entity == null || source == null) return;
Location entityLoc = entity.getLocation(); Location entityLoc = entity.getLocation();
entity.getWorld().playEffect(entity.getLocation(),Effect.BAT_TAKEOFF,1);
entity.getWorld().playSound(entity.getLocation(),Sound.ENTITY_BAT_TAKEOFF,10,1);
Vector knockbackDirection = entityLoc.toVector().subtract(source.toVector()).normalize(); Vector knockbackDirection = entityLoc.toVector().subtract(source.toVector()).normalize();
// Apply velocity in the opposite direction // Apply velocity in the opposite direction