Skip to content

Commit

Permalink
Release v1.3.6 (#83)
Browse files Browse the repository at this point in the history
fix: Some errors were not showing, appeal popup not closing
  • Loading branch information
RappyTV authored Dec 9, 2024
2 parents 166875a + 4f36527 commit d5c1d5f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions api/src/main/java/com/rappytv/globaltags/api/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
import com.google.gson.JsonObject;
import com.google.gson.JsonPrimitive;
import com.rappytv.globaltags.wrapper.http.ApiHandler.ApiResponse;
import java.util.UUID;
import net.labymod.api.Laby;
import net.labymod.api.client.component.Component;
import net.labymod.api.client.component.format.NamedTextColor;
import net.labymod.api.client.gui.screen.widget.widgets.popup.SimpleAdvancedPopup;
import net.labymod.api.labyconnect.LabyConnectSession;
import net.labymod.api.notification.Notification;
import net.labymod.api.notification.Notification.Type;
import java.util.UUID;

public class Util {

Expand Down Expand Up @@ -73,7 +73,7 @@ public static void notify(Component title, Component description) {

public static Component getResponseComponent(ApiResponse<String> response) {
return Component.text(
response.getData(),
response.isSuccessful() ? response.getData() : response.getError(),
response.isSuccessful() ? NamedTextColor.GREEN : NamedTextColor.RED
);
}
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {

val versions = providers.gradleProperty("net.labymod.minecraft-versions").get().split(";")
group = "org.example"
version = providers.environmentVariable("VERSION").getOrElse("1.3.5")
version = providers.environmentVariable("VERSION").getOrElse("1.3.6")

labyMod {
defaultPackageName = "com.rappytv.globaltags" //change this to your main package name (used by all modules)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public AppealPopup(GlobalTagAPI api) {
))
.addId("send-button", "popup-description");
sendButton.setEnabled(false);
sendButton.setActionListener(() ->
sendButton.setActionListener(() -> {
this.api.getApiHandler().appealBan(inputWidget.getText(), (response) ->
Util.notify(
Component.translatable(response.isSuccessful()
Expand All @@ -48,8 +48,9 @@ public AppealPopup(GlobalTagAPI api) {
),
Component.text(response.getData(), NamedTextColor.WHITE)
)
)
);
);
this.close();
});
inputWidget.updateListener((text) -> sendButton.setEnabled(!text.isBlank()));

content.addChild(labelWidget);
Expand Down

0 comments on commit d5c1d5f

Please sign in to comment.