@@ -79,6 +79,7 @@ public abstract class Skill implements IconHolder {
79
79
private static final String REQLVL = "skill-req-lvl" ;
80
80
private static final String MSG = "msg" ;
81
81
private static final String PERM = "needs-permission" ;
82
+ private static final String COOLDOWN_MESSAGE = "cooldown-message" ;
82
83
private static final String DESC = "desc" ;
83
84
private static final String ATTR = "attributes" ;
84
85
private static final String COMBO = "combo" ;
@@ -101,6 +102,7 @@ public abstract class Skill implements IconHolder {
101
102
private int maxLevel ;
102
103
private int skillReqLevel ;
103
104
private boolean needsPermission ;
105
+ private boolean cooldownMessage ;
104
106
private int combo ;
105
107
106
108
/**
@@ -394,6 +396,15 @@ public double getCooldown(int level) {
394
396
return settings .getAttr (SkillAttribute .COOLDOWN , level );
395
397
}
396
398
399
+ /**
400
+ * Checks whether a message is sent when attempting to run the skill while in cooldown
401
+ *
402
+ * @return true if the message is sent, false otherwise
403
+ */
404
+ public boolean cooldownMessage () {
405
+ return cooldownMessage ;
406
+ }
407
+
397
408
/**
398
409
* Retrieves the range of the skill in blocks
399
410
*
@@ -820,6 +831,7 @@ public void save(DataSection config) {
820
831
config .set (REQ , skillReq );
821
832
config .set (REQLVL , skillReqLevel );
822
833
config .set (PERM , needsPermission );
834
+ config .set (COOLDOWN_MESSAGE , cooldownMessage );
823
835
if (combo >= 0 && canCast ())
824
836
config .set (COMBO , SkillAPI .getComboManager ().getSaveString (combo ));
825
837
settings .save (config .createSection (ATTR ));
@@ -859,6 +871,7 @@ public void load(DataSection config) {
859
871
skillReqLevel = config .getInt (REQLVL , skillReqLevel );
860
872
message = TextFormatter .colorString (config .getString (MSG , message ));
861
873
needsPermission = config .getString (PERM , needsPermission + "" ).equalsIgnoreCase ("true" );
874
+ cooldownMessage = config .getBoolean (COOLDOWN_MESSAGE , true );
862
875
combo = SkillAPI .getComboManager ().parseCombo (config .getString (COMBO ));
863
876
864
877
if (config .isList (DESC )) {
0 commit comments