kyoripowered / adventure-text-feature-pagination Goto Github PK
View Code? Open in Web Editor NEWA basic pagination system for text in the Adventure library.
License: MIT License
A basic pagination system for text in the Adventure library.
License: MIT License
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
org.junit:junit-bom
, com.google.truth.extensions:truth-java8-extension
, com.google.truth:truth
)gradle
, io.github.gradle-nexus.publish-plugin
).github/workflows/build.yml
settings.gradle
org.gradle.toolchains.foojay-resolver-convention 0.8.0
build.gradle
net.kyori.indra 3.1.3
net.kyori.indra.publishing.sonatype 3.1.3
net.kyori.indra.licenser.spotless 3.1.3
io.github.gradle-nexus.publish-plugin 2.0.0-rc-2
net.kyori:adventure-api 4.16.0
com.google.guava:guava-testlib 33.1.0-jre
com.google.truth:truth 1.4.2
com.google.truth.extensions:truth-java8-extension 1.4.2
org.junit:junit-bom 5.10.2
gradle/wrapper/gradle-wrapper.properties
gradle 8.7
This may be a mistake on my end, attempting to integrate this API with my recent works and having some difficulty with pagination. No matter what I attempt to do, the footer is always slightly longer than the header. I've attempted at this point any number of fixes and tried digging for some potential solutions.
I do know this is still a very new feature, so I figured I'd at least provide a bug report for my findings to see if it helps
Version: 3.0.2
Using text-serializer-gson
,text-feature-pagination
, and text-api
with text-bukkit-adapter
Platform is Paper
Width 50 with dummy data to cause pagination
Code (In Kotlin) ((An abomination of formatting, I apologize in advance))
return Pagination.builder().line { cs ->
cs.character('=')
}.width(53).build(TextComponent.of("Charters").color(TextColor.GOLD), Pagination.Renderer.RowRenderer { value, index ->
return@RowRenderer listOf(if (value == null) TextComponent.of("${index + 1}. ").color(TextColor.YELLOW).content("ERR?").color(TextColor.RED) else
TextComponent.of("${index + 1}. ")
.color(TextColor.YELLOW)
.append(TextComponent.of(value.name).color(TextColor.GRAY))
.hoverEvent(HoverEvent.of(HoverEvent.Action.SHOW_TEXT, TextComponent.of("Click to view this charter").color(TextColor.GRAY)))
.clickEvent(ClickEvent.of(ClickEvent.Action.RUN_COMMAND, "/charter info ${value.name}")))
}, Pagination.PageCommandFunction { page -> "/charter list -page $page" })
val rendered = settlementService.buildSettlementPagination().render(settlementService.dummyData().sortedBy { settlement -> settlement.name }, page)
rendered.forEach { comp ->
TextAdapter.sendComponent(p, comp)
}
It would be great if we could render the footer in a similar way to the header - that is have renderFooter (and maybe renderFooterButtons) be in the Pagination.Renderer Interface instead of the PaginationImpl class. This would allow for arranging the previous and next buttons in a desired way among other custom formatting
Hello, I'm wondering if it's under consideration to publish a release version soon. Is there anything preventing a full release?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.