-
Notifications
You must be signed in to change notification settings - Fork 13
API Usage
leonardo-dgs edited this page Sep 25, 2023
·
2 revisions
<repository>
<id>codemc-repo</id>
<url>https://repo.codemc.io/repository/maven-public/</url>
</repository>
<dependency>
<groupId>net.leonardo_dgs</groupId>
<artifactId>InteractiveBooks</artifactId>
<version>1.7.2</version>
</dependency>
maven { url = 'https://repo.codemc.org/repository/maven-public/' }
implementation 'net.leonardo_dgs:InteractiveBooks:1.7.2'
You can get a book already loaded calling the function InteractiveBooks.getBook(String id)
Where id
is the book id, player
is the player used to get placeholders, can be omitted if you don't use placeholders.
You can get a book, already saved in memory, from its id, calling the function InteractiveBooks.getBook(String id)
.
Where id
is the book's id.
You can get an HashMap with all loaded books by calling the function InteractiveBooks.getBooks()
You can register a book, so it will be as if it had been loaded from a file in the InteractiveBooks' books folder.
The function is: InteractiveBooks.registerBook(IBook book)
You can unregister it, with: InteractiveBooks.unregisterBook(String id)
Where id
is the book id