File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99}
1010
1111group = ' me.playbosswar.com'
12- version = ' 8.16.0 '
12+ version = ' 8.16.1 '
1313description = ' CommandTimer'
1414
1515repositories {
@@ -74,7 +74,7 @@ publishing {
7474 maven(MavenPublication ) {
7575 groupId = ' me.playbosswar.com'
7676 artifactId = ' commandtimer'
77- version = ' 8.16.0 '
77+ version = ' 8.16.1 '
7878
7979 from components. java
8080 }
Original file line number Diff line number Diff line change 1010
1111
1212group = ' me.playbosswar.com'
13- version = ' 8.16.0 '
13+ version = ' 8.16.1 '
1414description = ' CommandTimer'
1515
1616repositories {
@@ -63,7 +63,7 @@ publishing {
6363 maven(MavenPublication ) {
6464 groupId = ' me.playbosswar.com'
6565 artifactId = ' commandtimer-java17'
66- version = ' 8.16.0 '
66+ version = ' 8.16.1 '
6767
6868 from components. java
6969 }
Original file line number Diff line number Diff line change 1010
1111
1212group = ' me.playbosswar.com'
13- version = ' 8.16.0 '
13+ version = ' 8.16.1 '
1414description = ' CommandTimer'
1515
1616repositories {
@@ -67,7 +67,7 @@ publishing {
6767 maven(MavenPublication ) {
6868 groupId = ' me.playbosswar.com'
6969 artifactId = ' commandtimer-java21'
70- version = ' 8.16.0 '
70+ version = ' 8.16.1 '
7171 from components. java
7272 }
7373 }
Original file line number Diff line number Diff line change @@ -125,11 +125,15 @@ public void onEnable() {
125125
126126 @ Override
127127 public void onDisable () {
128- tasksManager .disable ();
128+ if (tasksManager != null ) {
129+ tasksManager .disable ();
130+ }
129131 if (adHocCommandsManager != null ) {
130132 adHocCommandsManager .disable ();
131133 }
132- conditionEngineManager .onDisable ();
134+ if (conditionEngineManager != null ) {
135+ conditionEngineManager .onDisable ();
136+ }
133137 saveDefaultConfig ();
134138 plugin = null ;
135139 }
Original file line number Diff line number Diff line change @@ -348,18 +348,12 @@ public void storeInstance() {
348348 transaction .setContext ("task" , json );
349349
350350 try {
351- String path ;
352- File existingFile = null ;
353- try {
354- path = Files .getTaskFile (id );
355- existingFile = new File (path );
356- } catch (IllegalStateException e ) {
357- path = Files .getNewTaskFile (id );
358- }
351+ String path = Files .getTaskFile (id );
352+ File existingFile = new File (path );
359353
360354 JsonObject jsonObject = new JsonParser ().parse (json ).getAsJsonObject ();
361355
362- if (existingFile != null && existingFile .exists ()) {
356+ if (existingFile .exists ()) {
363357 try (FileReader fr = new FileReader (existingFile )) {
364358 JsonObject existingJson = new JsonParser ().parse (fr ).getAsJsonObject ();
365359 if (existingJson .has ("configVersion" )) {
Original file line number Diff line number Diff line change @@ -123,15 +123,15 @@ public static String getTaskFile(UUID id) {
123123 if (file != null ) {
124124 return file .getAbsolutePath ();
125125 }
126- throw new IllegalStateException ( "Task file not found for UUID: " + id );
126+ return getNewTaskFile ( id );
127127 }
128128
129129 public static String getTaskLocalExecutionFile (UUID id ) {
130130 File file = findMetadataFileByUuid (id );
131131 if (file != null ) {
132132 return file .getAbsolutePath ();
133133 }
134- throw new IllegalStateException ( "Task metadata file not found for UUID: " + id );
134+ return getNewTaskLocalExecutionFile ( id );
135135 }
136136
137137 public static String getNewTaskFile (UUID id ) {
@@ -151,7 +151,7 @@ public static String getAdHocCommandFile(UUID id) {
151151 if (file != null ) {
152152 return file .getAbsolutePath ();
153153 }
154- throw new IllegalStateException ( "Ad-hoc command file not found for UUID: " + id );
154+ return getNewAdHocCommandFile ( id );
155155 }
156156
157157 public static String getNewAdHocCommandFile (UUID id ) {
Original file line number Diff line number Diff line change 11main : me.playbosswar.com.CommandTimerPlugin
22name : " CommandTimer"
3- version : " 8.16.0 "
3+ version : " 8.16.1 "
44description : " Schedule commands like you want"
55author : PlayBossWar
66api-version : 1.13
You can’t perform that action at this time.
0 commit comments