Skip to content

Commit

Permalink
fixed inventory issue
Browse files Browse the repository at this point in the history
  • Loading branch information
GhastCraftHD committed Apr 5, 2024
1 parent f6eeee0 commit 23434b0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public void registerChatInput(Holography main, Player player) {
Message.NEW_TEXT_SUBTITLE,
Title.Times.times(
Duration.of(200, ChronoUnit.MILLIS),
Duration.of(4, ChronoUnit.SECONDS),
Duration.of(6, ChronoUnit.SECONDS),
Duration.of(200, ChronoUnit.MILLIS)
)
));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import de.leghast.holography.ui.Attribute;
import de.leghast.holography.ui.Page;
import de.leghast.holography.ui.UserInterface;
import org.bukkit.Bukkit;
import org.bukkit.entity.Display;
import org.bukkit.entity.Player;
import org.bukkit.entity.TextDisplay;
Expand Down Expand Up @@ -48,8 +49,12 @@ public AttributeInteractionHandler(Holography main, int slot, Player player) {
case TEXT -> {
switch(slot){
case 29 -> {
wrapper.registerChatInput(main, player);
player.closeInventory();
Bukkit.getScheduler().runTaskLater(main,
() -> {
wrapper.registerChatInput(main, player);
player.closeInventory();
}, 1L
);
}
case 30 -> wrapper.setLineWidth(main, player);
case 31 -> wrapper.toggleTextShadow();
Expand Down Expand Up @@ -88,7 +93,7 @@ public AttributeInteractionHandler(Holography main, int slot, Player player) {
}
}

if(attribute != Attribute.TEXT && slot != 29 && slot != 26 && slot != 44){
if(slot != 26 && slot != 44){
new UserInterface(main, player, main.getSettingsManager().getAdjusterSettings(player.getUniqueId()).getPage());
}

Expand Down

0 comments on commit 23434b0

Please sign in to comment.