File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed
src/main/kotlin/me/tryfle/ktlon Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ plugins {
7
7
}
8
8
9
9
group = " me.tryfle"
10
- version = " 1.0 "
10
+ version = " 1.1 "
11
11
12
12
minecraft.version(" 1.8.9" )
13
13
Original file line number Diff line number Diff line change @@ -6,12 +6,12 @@ import net.weavemc.loader.api.command.Command
6
6
7
7
class Chance : Command (" ktlchance" ) {
8
8
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 ) {
10
12
Data .instance.chance = args[0 ].toInt()
11
13
Util .msg(" Chance has been set to " + args[0 ] + " %." )
12
- Data .saveData(Data .instance)
13
- }
14
- else {
14
+ Data .saveData(Data .instance) } else {
15
15
Util .msg(" Please specify a chance from 1-100 in integer form." )
16
16
}
17
17
}
Original file line number Diff line number Diff line change @@ -44,15 +44,15 @@ class ClickListener {
44
44
45
45
@SubscribeEvent
46
46
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()) {
48
48
cps++
49
49
if (shouldClick) {
50
50
val ch: Double = Math .random() * 100 ;
51
51
if (ch.toInt() >= Data .instance.chance) {
52
52
return
53
53
}
54
54
}
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??
56
56
GlobalScope .launch { rClick() }
57
57
}
58
58
}
You can’t perform that action at this time.
0 commit comments