Skip to content

Commit

Permalink
Fix hitbox remove.
Browse files Browse the repository at this point in the history
  • Loading branch information
toxicity188 committed Jan 11, 2025
1 parent 8cb30fa commit 1f84e73
Show file tree
Hide file tree
Showing 13 changed files with 20 additions and 5 deletions.
8 changes: 7 additions & 1 deletion api/src/main/java/kr/toxicity/model/api/BetterModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@
/**
* A dummy class for BetterModel plugin instance.
*/
public class BetterModel {
public final class BetterModel {

/**
* Private initializer
*/
private BetterModel() {}

/**
* Checks running platform is Paper.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

@Getter
@Setter
public class ModelDamagedEvent extends EntityEvent implements Cancellable {
public final class ModelDamagedEvent extends EntityEvent implements Cancellable {

public static final HandlerList HANDLER_LIST = new HandlerList();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import org.jetbrains.annotations.NotNull;

@Getter
public class ModelInteractEvent extends PlayerEvent implements Cancellable {
public final class ModelInteractEvent extends PlayerEvent implements Cancellable {

public static final HandlerList HANDLER_LIST = new HandlerList();

Expand Down
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
kotlin("jvm") version "2.1.0"
id("org.jetbrains.dokka") version "2.0.0"
id("io.github.goooler.shadow") version "8.1.8"
id("io.papermc.paperweight.userdev") version "2.0.0-beta.12" apply false
id("io.papermc.paperweight.userdev") version "2.0.0-beta.13" apply false
id("xyz.jpenilla.run-paper") version "2.3.1"
id("xyz.jpenilla.resource-factory-bukkit-convention") version "1.2.0"
id("com.modrinth.minotaur") version "2.+"
Expand All @@ -22,7 +22,7 @@ allprojects {
apply(plugin = "kotlin")
apply(plugin = "org.jetbrains.dokka")
group = "kr.toxicity.model"
version = "1.3.2" + (buildNumber?.let { "-SNAPSHOT-$it" } ?: "")
version = "1.3.3" + (buildNumber?.let { "-SNAPSHOT-$it" } ?: "")
repositories {
mavenCentral()
maven("https://repo.papermc.io/repository/maven-public/")
Expand Down
1 change: 1 addition & 0 deletions changelog/1.3.3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# BetterModel 1.3.3
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ class HitBoxImpl(
}

override fun remove(reason: RemovalReason) {
updatingSectionStatus = false
super.remove(reason)
listener.remove(this)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ class HitBoxImpl(
}

override fun remove(reason: RemovalReason) {
updatingSectionStatus = false
super.remove(reason)
listener.remove(this)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ class HitBoxImpl(
}

override fun remove(reason: RemovalReason) {
updatingSectionStatus = false
super.remove(reason)
listener.remove(this)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ class HitBoxImpl(
}

override fun remove(reason: RemovalReason) {
updatingSectionStatus = false
super.remove(reason)
listener.remove(this)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ class HitBoxImpl(
}

override fun remove(reason: RemovalReason) {
updatingSectionStatus = false
super.remove(reason)
listener.remove(this)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ class HitBoxImpl(
}

override fun remove(reason: RemovalReason) {
if (BetterModel.IS_PAPER) `moonrise$setUpdatingSectionStatus`(false)
super.remove(reason)
listener.remove(this)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ class HitBoxImpl(
}

override fun remove(reason: RemovalReason) {
if (BetterModel.IS_PAPER) `moonrise$setUpdatingSectionStatus`(false)
super.remove(reason)
listener.remove(this)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ class HitBoxImpl(
}

override fun remove(reason: RemovalReason) {
if (BetterModel.IS_PAPER) `moonrise$setUpdatingSectionStatus`(false)
super.remove(reason)
listener.remove(this)
}
Expand Down

0 comments on commit 1f84e73

Please sign in to comment.