Skip to content

Commit

Permalink
launch 1.1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
toxicity188 committed Nov 25, 2023
1 parent bd9b723 commit a41a6df
Show file tree
Hide file tree
Showing 11 changed files with 36 additions and 29 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {
}

val questAdderGroup = "kor.toxicity.questadder"
val questAdderVersion = "1.1.8"
val questAdderVersion = "1.1.9"

val adventureVersion = "4.14.0"
val platformVersion = "4.3.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ class NMSChannelImpl: NMSChannel {
QuestAdderBukkit.platform.changeSign(player, originalLocation, array)
connection.send(ClientboundOpenSignEditorPacket(blockPos))
it.signCallback = { arr ->
callback(arr)
connection.send(ClientboundBlockUpdatePacket(blockPos, air))
QuestAdderBukkit.task {
connection.send(ClientboundBlockUpdatePacket(blockPos, air))
callback(arr)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ class NMSChannelImpl: NMSChannel {
QuestAdderBukkit.platform.changeSign(player, originalLocation, array)
connection.send(ClientboundOpenSignEditorPacket(blockPos))
it.signCallback = { arr ->
callback(arr)
connection.send(ClientboundBlockUpdatePacket(blockPos, air))
QuestAdderBukkit.task {
connection.send(ClientboundBlockUpdatePacket(blockPos, air))
callback(arr)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ class NMSChannelImpl: NMSChannel {
QuestAdderBukkit.platform.changeSign(player, originalLocation, array)
connection.send(ClientboundOpenSignEditorPacket(blockPos))
it.signCallback = { arr ->
callback(arr)
connection.send(ClientboundBlockUpdatePacket(blockPos, air))
QuestAdderBukkit.task {
connection.send(ClientboundBlockUpdatePacket(blockPos, air))
callback(arr)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ class NMSChannelImpl: NMSChannel {
QuestAdderBukkit.platform.changeSign(player, originalLocation, array)
connection.send(ClientboundOpenSignEditorPacket(blockPos))
it.signCallback = { arr ->
callback(arr)
connection.send(ClientboundBlockUpdatePacket(blockPos, air))
QuestAdderBukkit.task {
connection.send(ClientboundBlockUpdatePacket(blockPos, air))
callback(arr)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ class NMSChannelImpl: NMSChannel {
QuestAdderBukkit.platform.changeSign(player, originalLocation, array)
connection.send(ClientboundOpenSignEditorPacket(blockPos))
it.signCallback = { arr ->
callback(arr)
connection.send(ClientboundBlockUpdatePacket(blockPos, air))
QuestAdderBukkit.task {
connection.send(ClientboundBlockUpdatePacket(blockPos, air))
callback(arr)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ class NMSChannelImpl: NMSChannel {
QuestAdderBukkit.platform.changeSign(player, originalLocation, array)
connection.send(ClientboundOpenSignEditorPacket(blockPos))
it.signCallback = { arr ->
callback(arr)
connection.send(ClientboundBlockUpdatePacket(blockPos, air))
QuestAdderBukkit.task {
connection.send(ClientboundBlockUpdatePacket(blockPos, air))
callback(arr)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ class NMSChannelImpl: NMSChannel {
QuestAdderBukkit.platform.changeSign(player, originalLocation, array)
connection.send(ClientboundOpenSignEditorPacket(blockPos, true))
it.signCallback = { arr ->
callback(arr)
connection.send(ClientboundBlockUpdatePacket(blockPos, air))
QuestAdderBukkit.task {
connection.send(ClientboundBlockUpdatePacket(blockPos, air))
callback(arr)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ class NMSChannelImpl: NMSChannel {
QuestAdderBukkit.platform.changeSign(player, originalLocation, array)
connection.send(ClientboundOpenSignEditorPacket(blockPos, true))
it.signCallback = { arr ->
callback(arr)
connection.send(ClientboundBlockUpdatePacket(blockPos, air))
QuestAdderBukkit.task {
connection.send(ClientboundBlockUpdatePacket(blockPos, air))
callback(arr)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ import java.util.concurrent.ThreadLocalRandom
class QuestAdderBukkit: JavaPlugin(), QuestAdderPlugin {
companion object: QuestAdder {

const val VERSION = "1.1.8"
const val VERSION = "1.1.9"

private val listener = object : Listener {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1010,19 +1010,26 @@ class Dialog(adder: QuestAdder, val file: File, private val dialogKey: String, s
}))
}
private fun start(run: DialogRun): DialogState? {
val uuid = run.current.player.uniqueId
if (!predicate(run.current)) {
subDialog?.let { l ->
if (l.isNotEmpty() && !playerTask.containsKey(uuid)) l.random().start(run.current)
try {
val uuid = run.current.player.uniqueId
if (!predicate(run.current)) {
subDialog?.let { l ->
if (l.isNotEmpty() && !playerTask.containsKey(uuid)) l.random().start(run.current)
}
return null
}
return null
}
if (playerTask.containsKey(uuid)) return null
playerTask[uuid] = run.apply {
initialTask(current)
start()
if (playerTask.containsKey(uuid)) return null
playerTask[uuid] = run.apply {
initialTask(current)
start()
}
return run.current.state
} catch (ex: Exception) {
QuestAdderBukkit.warn("runtime error: ${ex.message}")
} catch (ex: StackOverflowError) {
QuestAdderBukkit.warn("infinite loop error: dialog loops infinitely!")
}
return run.current.state
return null
}

override fun getKey(): String {
Expand Down

0 comments on commit a41a6df

Please sign in to comment.