Skip to content

Commit f0ae091

Browse files
committed
💜 Bug fix
1 parent 0590fab commit f0ae091

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ plugins {
77
}
88

99
group = "me.tryfle"
10-
version = "1.0"
10+
version = "1.1"
1111

1212
minecraft.version("1.8.9")
1313

src/main/kotlin/me/tryfle/ktlon/command/Chance.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ import net.weavemc.loader.api.command.Command
66

77
class Chance: Command("ktlchance") {
88
override fun handle(args: Array<out String>) {
9-
if (args[0].toInt() in 1..100) {
9+
if (args.isEmpty()) {
10+
Util.msg("Chance is currently set to " + Data.instance.chance + "%.")
11+
} else if (args[0].toInt() in 0..100) {
1012
Data.instance.chance = args[0].toInt()
1113
Util.msg("Chance has been set to " + args[0] + "%.")
12-
Data.saveData(Data.instance)
13-
}
14-
else {
14+
Data.saveData(Data.instance) } else {
1515
Util.msg("Please specify a chance from 1-100 in integer form.")
1616
}
1717
}

src/main/kotlin/me/tryfle/ktlon/listener/ClickListener.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@ class ClickListener {
4444

4545
@SubscribeEvent
4646
fun onClick(e: MouseEvent) {
47-
if (Minecraft.getMinecraft().thePlayer != null && e.button == getEventButton()) {
47+
if (Data.instance.enabled && Minecraft.getMinecraft().thePlayer != null && e.button == getEventButton()) {
4848
cps++
4949
if (shouldClick) {
5050
val ch: Double = Math.random() * 100;
5151
if (ch.toInt() >= Data.instance.chance) {
5252
return
5353
}
5454
}
55-
if (Data.instance.fiveCps && cps < 5) return
55+
if (Data.instance.fiveCps && cps < 7) return //for some reason 5 cps is 7 cps lol??
5656
GlobalScope.launch { rClick() }
5757
}
5858
}

0 commit comments

Comments
 (0)