@@ -37,7 +37,7 @@ To add this project as a dependency to your project, add the following to your p
37
37
<dependency >
38
38
<groupId >com.github.Despical</groupId >
39
39
<artifactId >CommandFramework</artifactId >
40
- <version >1.3.2 </version >
40
+ <version >1.3.3 </version >
41
41
<scope >compile</scope >
42
42
</dependency >
43
43
```
@@ -50,7 +50,7 @@ repositories {
50
50
```
51
51
```
52
52
dependencies {
53
- compileOnly group: "com.github.Despical", name: "CommandFramework", version: "1.3.2 ";
53
+ compileOnly group: "com.github.Despical", name: "CommandFramework", version: "1.3.3 ";
54
54
}
55
55
```
56
56
@@ -59,8 +59,11 @@ dependencies {
59
59
``` java
60
60
import me.despical.commandframework.Command ;
61
61
import me.despical.commandframework.CommandArguments ;
62
+ import me.despical.commandframework.Cooldown ;
62
63
import me.despical.commandframework.CustomParameters ;
63
64
65
+ import java.util.concurrent.TimeUnit ;
66
+
64
67
public class ExampleClass extends JavaPlugin {
65
68
66
69
// Don't forget to shade framework in to your project
@@ -104,13 +107,18 @@ public class ExampleClass extends JavaPlugin {
104
107
usage = " /example" ,
105
108
min = 1 ,
106
109
max = 5 ,
107
- cooldown = 10 ,
108
110
onlyOp = false , // this option will ignore permission if it is set
109
111
// be careful if you are using non-thread safe operations
110
112
// and if you want to enable option below
111
113
async = false ,
112
114
senderType = Command . SenderType . CONSOLE
113
115
)
116
+ @Cooldown (
117
+ cooldown = 10 ,
118
+ timeUnit = TimeUnit . SECONDS ,
119
+ bypassPerm = " command.cooldownBypass" ,
120
+ overrideConsole = true // console will now be affected by cooldown
121
+ )
114
122
public void exampleCommand (CommandArguments arguments ) {
115
123
// CommandArguments class contains basic things related Bukkit commands
116
124
// And here it's all done, you've created command with properties above!
@@ -137,7 +145,7 @@ public class ExampleClass extends JavaPlugin {
137
145
// CommandArguments parameter can be added to anywhere in method as a parameter.
138
146
arguments. sendMessage(" First parameter is " + firstParameter);
139
147
}
140
-
148
+
141
149
// Aliases don't need to be same with the command above
142
150
@Completer (
143
151
name = " example" ,
0 commit comments