Bump version

This commit is contained in:
tofaa 2024-09-05 19:00:45 +03:00
parent b18c8399ed
commit 6849d6ec6c
4 changed files with 9 additions and 13 deletions

View file

@ -1,6 +1,6 @@
import java.io.ByteArrayOutputStream import java.io.ByteArrayOutputStream
val fullVersion = "2.4.9" val fullVersion = "2.4.10"
val snapshot = true val snapshot = true
group = "me.tofaa.entitylib" group = "me.tofaa.entitylib"

View file

@ -12,7 +12,7 @@ repositories {
dependencies { dependencies {
compileOnly(libs.paper) compileOnly(libs.paper)
compileOnly(libs.packetevents.spigot) compileOnly(libs.packetevents.spigot)
implementation("me.tofaa.entitylib:spigot:2.4.5-SNAPSHOT") implementation(project(":platforms:spigot"))
// implementation(project(":platforms:spigot")) // implementation(project(":platforms:spigot"))
} }

View file

@ -49,6 +49,10 @@ public class TestEntityLibPlugin extends JavaPlugin {
catch (NoSuchMethodException | InvocationTargetException | IllegalAccessException e) { catch (NoSuchMethodException | InvocationTargetException | IllegalAccessException e) {
e.printStackTrace(); e.printStackTrace();
} }
}
}
} }

View file

@ -5,6 +5,7 @@ import com.github.retrooper.packetevents.protocol.entity.type.EntityTypes;
import com.github.retrooper.packetevents.wrapper.play.server.WrapperPlayServerUpdateAttributes; import com.github.retrooper.packetevents.wrapper.play.server.WrapperPlayServerUpdateAttributes;
import io.github.retrooper.packetevents.util.SpigotConversionUtil; import io.github.retrooper.packetevents.util.SpigotConversionUtil;
import me.tofaa.entitylib.EntityLib; import me.tofaa.entitylib.EntityLib;
import me.tofaa.entitylib.wrapper.WrapperEntity;
import me.tofaa.entitylib.wrapper.WrapperLivingEntity; import me.tofaa.entitylib.wrapper.WrapperLivingEntity;
import org.bukkit.command.CommandSender; import org.bukkit.command.CommandSender;
import org.bukkit.command.defaults.BukkitCommand; import org.bukkit.command.defaults.BukkitCommand;
@ -15,7 +16,7 @@ import java.util.UUID;
public class TestMassivePigCommand extends BukkitCommand { public class TestMassivePigCommand extends BukkitCommand {
private WrapperLivingEntity pig; private WrapperEntity pig;
public TestMassivePigCommand() { public TestMassivePigCommand() {
super("testmassivepig"); super("testmassivepig");
@ -31,16 +32,7 @@ public class TestMassivePigCommand extends BukkitCommand {
player.sendMessage("Large pig removed"); player.sendMessage("Large pig removed");
return true; return true;
} }
pig = new WrapperLivingEntity(EntityTypes.PIG); pig = new WrapperEntity(EntityTypes.TNT);
pig.getAttributes().setAttribute(
Attributes.GENERIC_SCALE,
10,
new WrapperPlayServerUpdateAttributes.PropertyModifier(
UUID.randomUUID(),
10,
WrapperPlayServerUpdateAttributes.PropertyModifier.Operation.MULTIPLY_BASE
)
);
pig.addViewer(player.getUniqueId()); pig.addViewer(player.getUniqueId());
pig.spawn(SpigotConversionUtil.fromBukkitLocation(player.getLocation())); pig.spawn(SpigotConversionUtil.fromBukkitLocation(player.getLocation()));
player.sendMessage("Large pig spawned"); player.sendMessage("Large pig spawned");