Skip to content

Commit

Permalink
Updated XSeries to work with 1.20.6 - 1.21
Browse files Browse the repository at this point in the history
  • Loading branch information
Tigerpanzer02 committed Jul 11, 2024
1 parent 4a938a3 commit 94bebf2
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion MiniGamesBox API/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ plugins {
dependencies {
implementation("me.tigerhix.lib:scoreboard:1.4.4") { isTransitive = false }
compileOnly(project(":MiniGamesBox-Database", "shadow"))
compileOnly("com.github.cryptomorin:XSeries:9.10.0") { isTransitive = false }
compileOnly("com.github.cryptomorin:XSeries:11.2.0") { isTransitive = false }
}

tasks{
Expand Down
2 changes: 1 addition & 1 deletion MiniGamesBox Classic/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ plugins {

dependencies {
implementation("me.tigerhix.lib:scoreboard:1.4.4") { isTransitive = false }
implementation("com.github.cryptomorin:XSeries:9.10.0") { isTransitive = false }
implementation("com.github.cryptomorin:XSeries:11.2.0") { isTransitive = false }
implementation(project(":MiniGamesBox-API", "shadow"))
implementation(project(":MiniGamesBox-Inventory", "shadow"))
implementation(project(":MiniGamesBox-Database", "shadow"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public ItemStack getItem() {
.lore(ChatColor.GOLD + "Custom Kits, Custom Achievements, Custom ranks, Replay Ability and more!")
.lore("&aControls")
.lore("&eCLICK \n&7-> Link for patreon program")
.enchantment(XEnchantment.DURABILITY.getEnchant())
.enchantment(XEnchantment.UNBREAKING.getEnchant())
.colorizeItem();
return item.build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public ItemStack getItem() {
.lore(ChatColor.GRAY + "support us by donating on other platforms such as paypal!")
.lore("&aControls")
.lore("&eCLICK \n&7-> Link for donation options")
.enchantment(XEnchantment.DURABILITY.getEnchant())
.enchantment(XEnchantment.UNBREAKING.getEnchant())
.colorizeItem();
return item.build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,10 @@ public static CompletableFuture<Boolean> teleport(Entity entity, Location locati

public static void sendParticles(String particleName, Player player, Location location, int count) {
if(!isPaper && ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_9_R1)) {
Particle particle = XParticle.getParticle(particleName);
Particle particle = XParticle.of(particleName).orElse(XParticle.ANGRY_VILLAGER).get();
location.getWorld().spawnParticle(particle, location, count, 0, 0, 0, 0, getParticleDataType(particle, location));
} else if(isParticleBuilderSupported) {
Particle particle = XParticle.getParticle(particleName);
Particle particle = XParticle.of(particleName).orElse(XParticle.ANGRY_VILLAGER).get();
Object dataType = getParticleDataType(particle, location);

if(dataType == null) {
Expand All @@ -217,10 +217,10 @@ public static void sendParticles(String particleName, Player player, Location lo

public static void sendParticles(String particleName, Set<Player> players, Location location, int count) {
if(!isPaper && ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_9_R1)) {
Particle particle = XParticle.getParticle(particleName);
Particle particle = XParticle.of(particleName).orElse(XParticle.ANGRY_VILLAGER).get();
location.getWorld().spawnParticle(particle, location, count, 0, 0, 0, 0, getParticleDataType(particle, location));
} else if(isParticleBuilderSupported) {
Particle particle = XParticle.getParticle(particleName);
Particle particle = XParticle.of(particleName).orElse(XParticle.ANGRY_VILLAGER).get();
Object dataType = getParticleDataType(particle, location);

if(dataType == null) {
Expand All @@ -242,7 +242,7 @@ public static void sendParticles(String particle, Set<Player> players, Location

public static void sendParticles(String particleName, Set<Player> players, Location location, int count, double offsetX, double offsetY, double offsetZ, double extra) {
if(!isPaper && ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_9_R1)) {
Particle particle = XParticle.getParticle(particleName);
Particle particle = XParticle.of(particleName).orElse(XParticle.ANGRY_VILLAGER).get();
Object dataType = getParticleDataType(particle, location);

if(dataType != null) {
Expand All @@ -251,7 +251,7 @@ public static void sendParticles(String particleName, Set<Player> players, Locat
location.getWorld().spawnParticle(particle, location, count, 0, 0, 0, extra);
}
} else if(isParticleBuilderSupported) {
Particle particle = XParticle.getParticle(particleName);
Particle particle = XParticle.of(particleName).orElse(XParticle.ANGRY_VILLAGER).get();
Object dataType = getParticleDataType(particle, location);

if(dataType == null) {
Expand Down

0 comments on commit 94bebf2

Please sign in to comment.