Skip to content

Commit 0d719e8

Browse files
author
Im-Fran
committed
Fixes
* Fixed console throwing error when user leaves and had a GUI opened. Signed-off-by: fran <[email protected]>
1 parent eed7d56 commit 0d719e8

4 files changed

Lines changed: 4 additions & 16 deletions

File tree

dependency-reduced-pom.xml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<groupId>xyz.theprogramsrc</groupId>
55
<artifactId>SuperCoreAPI</artifactId>
66
<name>SuperCoreAPI</name>
7-
<version>4.9.1</version>
7+
<version>4.10.2_BETA4</version>
88
<build>
99
<sourceDirectory>src/main/java</sourceDirectory>
1010
<defaultGoal>clean package</defaultGoal>
@@ -49,10 +49,6 @@
4949
<pattern>org.apache.commons.io</pattern>
5050
<shadedPattern>xyz.theprogramsrc.supercoreapi.apache.commons.io</shadedPattern>
5151
</relocation>
52-
<relocation>
53-
<pattern>dev.jorel.commandapi-shade</pattern>
54-
<shadedPattern>xyz.theprogramsrc.supercoreapi.commandapi</shadedPattern>
55-
</relocation>
5652
</relocations>
5753
</configuration>
5854
</execution>
@@ -81,10 +77,6 @@
8177
<id>sonatype</id>
8278
<url>https://oss.sonatype.org/content/groups/public/</url>
8379
</repository>
84-
<repository>
85-
<id>commandapi</id>
86-
<url>https://raw.githubusercontent.com/JorelAli/CommandAPI/mvn-repo/</url>
87-
</repository>
8880
<repository>
8981
<id>jitpack.io</id>
9082
<url>https://jitpack.io</url>

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>xyz.theprogramsrc</groupId>
88
<artifactId>SuperCoreAPI</artifactId>
9-
<version>4.10.1</version>
9+
<version>4.10.2</version>
1010
<packaging>jar</packaging>
1111

1212
<name>SuperCoreAPI</name>

src/main/java/xyz/theprogramsrc/supercoreapi/SuperPlugin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public interface SuperPlugin<PLUGIN> {
1818
/*
1919
* This need to be updated on every new release
2020
*/
21-
String SUPER_CORE_API_VERSION = "4.10.1";
21+
String SUPER_CORE_API_VERSION = "4.10.2";
2222

2323
/**
2424
* Gets if this plugin is paid, By default is set to true, but is recommended to change it if your plugin is free.

src/main/java/xyz/theprogramsrc/supercoreapi/spigot/guis/GUI.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ public GUI(Player player){
4646
this.manuallyClosed = false;
4747
this.player = player;
4848
this.buttons = new LinkedHashMap<>();
49-
this.debug("Registering GUI with title '" + this.getTitle() + "&r'");
5049
this.task = this.getSpigotTasks().runRepeatingTask(1L, 1L, ()->{
5150
if(this.inv != null){
5251
if(!this.previousTitle.equals(this.getTitle()) || this.getRows().getSize() != this.previousSize){
@@ -305,10 +304,7 @@ public void onClick(InventoryClickEvent event){
305304
@EventHandler(priority = EventPriority.LOWEST)
306305
public void onQuit(PlayerQuitEvent event){
307306
if(this.inv != null && event.getPlayer().equals(this.player)){
308-
this.inv = null;
309-
this.task.stop();
310-
HandlerList.unregisterAll(this);
311-
this.onEvent(new GUICloseEvent(this));
307+
this.close();
312308
}
313309
}
314310

0 commit comments

Comments
 (0)