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 44 <groupId >xyz.theprogramsrc</groupId >
55 <artifactId >SuperCoreAPI</artifactId >
66 <name >SuperCoreAPI</name >
7- <version >4.8.1 </version >
7+ <version >4.8.2 </version >
88 <build >
99 <sourceDirectory >src/main/java</sourceDirectory >
1010 <defaultGoal >clean package</defaultGoal >
Original file line number Diff line number Diff line change 66
77 <groupId >xyz.theprogramsrc</groupId >
88 <artifactId >SuperCoreAPI</artifactId >
9- <version >4.8.2 </version >
9+ <version >4.8.3 </version >
1010 <packaging >jar</packaging >
1111
1212 <name >SuperCoreAPI</name >
Original file line number Diff line number Diff line change @@ -32,7 +32,6 @@ public abstract class Dialog extends SpigotModule {
3232 */
3333 public Dialog (Player player ){
3434 super (false );
35- this .debug ("Registering and opening dialog to '" + player .getName () + "'" );
3635 this .player = player ;
3736 this .placeholders = new HashMap <>();
3837 this .openDialog ();
@@ -50,13 +49,14 @@ public void openDialog(){
5049 if (this .canClose ()){
5150 this .getSuperUtils ().sendMessage (this .getPlayer (), Base .DIALOG_HOW_TO_CLOSE .toString ());
5251 }
53- } );
52+ this . debug ( "Opening dialog with title '" + this . getTitle () + "&r'" );
5453
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+ });
6060 }
6161
6262 private void sendTitleAndActionbar () {
@@ -69,7 +69,7 @@ private void sendTitleAndActionbar() {
6969 */
7070 public void close (){
7171 this .getSpigotTasks ().runTask (()->{
72- this .task .stop ();
72+ if ( this . task != null ) this .task .stop ();
7373 HandlerList .unregisterAll (this );
7474 Title .clearTitle (this .getPlayer ());
7575 Actionbar .clearActionbar (this .getPlayer ());
Original file line number Diff line number Diff line change @@ -43,10 +43,10 @@ public abstract class GUI extends SpigotModule {
4343 */
4444 public GUI (Player player ){
4545 super (false );
46- this .debug ("Registering GUI with title '" + this .getTitle () + "&r'" );
4746 this .manuallyClosed = false ;
4847 this .player = player ;
4948 this .buttons = new LinkedHashMap <>();
49+ this .debug ("Registering GUI with title '" + this .getTitle () + "&r'" );
5050 this .task = this .getSpigotTasks ().runRepeatingTask (1L , 1L , ()->{
5151 if (this .inv != null ){
5252 if (!this .previousTitle .equals (this .getTitle ()) || this .getRows ().getSize () != this .previousSize ){
You can’t perform that action at this time.
0 commit comments