File tree Expand file tree Collapse file tree 4 files changed +11
-11
lines changed
src/main/java/xyz/theprogramsrc/supercoreapi/spigot Expand file tree Collapse file tree 4 files changed +11
-11
lines changed Original file line number Diff line number Diff line change 4
4
<groupId >xyz.theprogramsrc</groupId >
5
5
<artifactId >SuperCoreAPI</artifactId >
6
6
<name >SuperCoreAPI</name >
7
- <version >4.8.1 </version >
7
+ <version >4.8.2 </version >
8
8
<build >
9
9
<sourceDirectory >src/main/java</sourceDirectory >
10
10
<defaultGoal >clean package</defaultGoal >
Original file line number Diff line number Diff line change 6
6
7
7
<groupId >xyz.theprogramsrc</groupId >
8
8
<artifactId >SuperCoreAPI</artifactId >
9
- <version >4.8.2 </version >
9
+ <version >4.8.3 </version >
10
10
<packaging >jar</packaging >
11
11
12
12
<name >SuperCoreAPI</name >
Original file line number Diff line number Diff line change @@ -32,7 +32,6 @@ public abstract class Dialog extends SpigotModule {
32
32
*/
33
33
public Dialog (Player player ){
34
34
super (false );
35
- this .debug ("Registering and opening dialog to '" + player .getName () + "'" );
36
35
this .player = player ;
37
36
this .placeholders = new HashMap <>();
38
37
this .openDialog ();
@@ -50,13 +49,14 @@ public void openDialog(){
50
49
if (this .canClose ()){
51
50
this .getSuperUtils ().sendMessage (this .getPlayer (), Base .DIALOG_HOW_TO_CLOSE .toString ());
52
51
}
53
- } );
52
+ this . debug ( "Opening dialog with title '" + this . getTitle () + "&r'" );
54
53
55
- if (this .task == null ){
56
- this .task = this .getSpigotTasks ().runRepeatingTask (0L , 1L , this ::sendTitleAndActionbar );
57
- }else {
58
- this .task .start ();
59
- }
54
+ if (this .task == null ){
55
+ this .task = this .getSpigotTasks ().runRepeatingTask (1L , 1L , this ::sendTitleAndActionbar );
56
+ }else {
57
+ this .task .start ();
58
+ }
59
+ });
60
60
}
61
61
62
62
private void sendTitleAndActionbar () {
@@ -69,7 +69,7 @@ private void sendTitleAndActionbar() {
69
69
*/
70
70
public void close (){
71
71
this .getSpigotTasks ().runTask (()->{
72
- this .task .stop ();
72
+ if ( this . task != null ) this .task .stop ();
73
73
HandlerList .unregisterAll (this );
74
74
Title .clearTitle (this .getPlayer ());
75
75
Actionbar .clearActionbar (this .getPlayer ());
Original file line number Diff line number Diff line change @@ -43,10 +43,10 @@ public abstract class GUI extends SpigotModule {
43
43
*/
44
44
public GUI (Player player ){
45
45
super (false );
46
- this .debug ("Registering GUI with title '" + this .getTitle () + "&r'" );
47
46
this .manuallyClosed = false ;
48
47
this .player = player ;
49
48
this .buttons = new LinkedHashMap <>();
49
+ this .debug ("Registering GUI with title '" + this .getTitle () + "&r'" );
50
50
this .task = this .getSpigotTasks ().runRepeatingTask (1L , 1L , ()->{
51
51
if (this .inv != null ){
52
52
if (!this .previousTitle .equals (this .getTitle ()) || this .getRows ().getSize () != this .previousSize ){
You can’t perform that action at this time.
0 commit comments