-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main'
# Conflicts: # docs/index.html
- Loading branch information
Showing
101 changed files
with
54,693 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,65 +1,7 @@ | ||
# Minecraft GUI library | ||
|
||
### Installation with jitpack | ||
A simple GUI library for Minecraft plugins. This library is written in Kotlin and can be used in both Java and Kotlin plugins. | ||
|
||
> [!NOTE]\ | ||
> Replace the `LATEST-COMMIT-HASH` with the latest commit hash | ||
For installation instructions and usage examples, visit: | ||
|
||
```xml | ||
<repository> | ||
<id>jitpack.io</id> | ||
<url>https://jitpack.io</url> | ||
</repository> | ||
|
||
<dependency> | ||
<groupId>com.github.xap3y</groupId> | ||
<artifactId>xagui</artifactId> | ||
<version>LATEST-COMMIT-HASH</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
``` | ||
|
||
## Kotlin Examples | ||
|
||
> To see Java example for [this GUI](https://github.com/xap3y/XaGUI/blob/main/docs/image.png), click [HERE](https://github.com/xap3y/XaGUI/blob/main/src/main/examples/Example.java) | ||
**Add this to your onEnable method** | ||
|
||
```kotlin | ||
val xaGui = XaGui(this) | ||
``` | ||
|
||
### Create a new GUI | ||
|
||
```kotlin | ||
|
||
// GUI with 6 rows | ||
val gui = xaGui.createMenu("&7GUI TITLE", 6) | ||
|
||
// Fill borders with glass panes | ||
gui.fillBorder(6) | ||
|
||
// Set slot 4 to barrier, and when player click it, it will close the GUI | ||
gui.setSlot(4, GuiButton(ItemStack(Material.BARRIER)).setListener { | ||
p.closeInventory() | ||
}) | ||
|
||
// This will fill the slots with OAK_BUTTON and when player click it, it will update the slot to STONE | ||
val slots = setOf(10, 11, 12, 13, 14, 15, 16, 19, 20, 21, 22, 23, 24, 25, 28, 29, 30, 31, 32, 33, 34, 37, 38, 39, 40, 41, 42, 43) | ||
gui.fillSlots(slots, GuiButton(ItemStack(Material.OAK_BUTTON)).setListener { | ||
gui.updateSlot(it.slot, ItemStack(Material.STONE)) | ||
}) | ||
|
||
gui.setOnClose { | ||
// Do something when the player closes the GUI | ||
it.player.sendMessage("You closed the GUI") | ||
} | ||
|
||
gui.setOnOpen { | ||
// Do something when the player opens the GUI | ||
it.player.sendMessage("You opened the GUI") | ||
} | ||
|
||
// Opens the GUI. Synchronous | ||
gui.open(player) | ||
``` | ||
## https://xagui.xap3y.eu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# Minecraft GUI library | ||
|
||
A simple GUI library for Minecraft plugins. This library is written in Kotlin and can be used in both Java and Kotlin plugins. | ||
|
||
### Installation with jitpack | ||
|
||
> [!NOTE]\ | ||
> Replace the `LATEST-COMMIT-HASH` with the latest commit hash | ||
|
||
```xml | ||
<repository> | ||
<id>jitpack.io</id> | ||
<url>https://jitpack.io</url> | ||
</repository> | ||
|
||
<dependency> | ||
<groupId>com.github.xap3y</groupId> | ||
<artifactId>xagui</artifactId> | ||
<version>LATEST-COMMIT-HASH</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
``` | ||
|
||
## Kotlin Examples | ||
|
||
> To see Java example for [this GUI](https://github.com/xap3y/XaGUI/blob/main/docs/image.png), click [HERE](https://github.com/xap3y/XaGUI/blob/main/src/main/examples/Example.java) | ||
|
||
**Add this to your onEnable method** | ||
|
||
```kotlin | ||
val xaGui = XaGui(this) | ||
``` | ||
|
||
### Create a new GUI | ||
|
||
```kotlin | ||
|
||
// GUI with 6 rows | ||
val gui = xaGui.createMenu("&7GUI TITLE", 6) | ||
|
||
// Fill borders with glass panes | ||
gui.fillBorder(6) | ||
|
||
// Set slot 4 to barrier, and when player click it, it will close the GUI | ||
gui.setSlot(4, GuiButton(ItemStack(Material.BARRIER)).setListener { | ||
p.closeInventory() | ||
}) | ||
|
||
// This will fill the slots with OAK_BUTTON and when player click it, it will update the slot to STONE | ||
val slots = setOf(10, 11, 12, 13, 14, 15, 16, 19, 20, 21, 22, 23, 24, 25, 28, 29, 30, 31, 32, 33, 34, 37, 38, 39, 40, 41, 42, 43) | ||
gui.fillSlots(slots, GuiButton(ItemStack(Material.OAK_BUTTON)).setListener { | ||
gui.updateSlot(it.slot, ItemStack(Material.STONE)) | ||
}) | ||
|
||
gui.setOnClose { | ||
// Do something when the player closes the GUI | ||
it.player.sendMessage("You closed the GUI") | ||
} | ||
|
||
gui.setOnOpen { | ||
// Do something when the player opens the GUI | ||
it.player.sendMessage("You opened the GUI") | ||
} | ||
|
||
// Opens the GUI. Synchronous | ||
gui.open(player) | ||
``` | ||
|
||
## TODO | ||
|
||
- docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<html lang="en"> | ||
<head> | ||
<title>All Classes </title> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | ||
<meta name="dc.created" content="2020-03-25"> | ||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style"> | ||
<link rel="stylesheet" type="text/css" href="dokka-javadoc-stylesheet.css" title="Style"> | ||
<link rel="stylesheet" type="text/css" href="jquery/jquery-ui.css" title="Style"> | ||
<script type="text/javascript" src="jquery/jquery-3.6.0.min.js"></script> | ||
<script type="text/javascript" src="jquery/jquery-migrate-3.4.0.min.js"></script> | ||
<script type="text/javascript" src="jquery/jquery-ui.js"></script> | ||
|
||
<script type="text/javascript" src="search.js"></script> | ||
<script async type="text/javascript" src="module-search-index.js"></script> | ||
<script async type="text/javascript" src="package-search-index.js"></script> | ||
<script async type="text/javascript" src="type-search-index.js"></script> | ||
<script async type="text/javascript" src="member-search-index.js"></script> | ||
<script async type="text/javascript" src="tag-search-index.js"></script> | ||
</head><body> | ||
<h1 class="bar">All Classes</h1> | ||
<main role="main" class="indexContainer"> | ||
<ul> | ||
|
||
<li><a href=eu/xap3y/xagui/GuiMenu.html>GuiMenu</a></li> | ||
|
||
<li><a href=eu/xap3y/xagui/XaGui.html>XaGui</a></li> | ||
|
||
<li><a href=eu/xap3y/xagui/exceptions/PageOutOfBoundException.html>PageOutOfBoundException</a></li> | ||
|
||
<li><a href=eu/xap3y/xagui/exceptions/RowsOutOfBoundException.html>RowsOutOfBoundException</a></li> | ||
|
||
<li><a href=eu/xap3y/xagui/exceptions/SlotOutOfBoundException.html>SlotOutOfBoundException</a></li> | ||
|
||
<li><a href=eu/xap3y/xagui/interfaces/ButtonListener.html>ButtonListener</a></li> | ||
|
||
<li><a href=eu/xap3y/xagui/interfaces/GuiButtonInterface.html>GuiButtonInterface</a></li> | ||
|
||
<li><a href=eu/xap3y/xagui/interfaces/GuiClickInterface.html>GuiClickInterface</a></li> | ||
|
||
<li><a href=eu/xap3y/xagui/interfaces/GuiCloseInterface.html>GuiCloseInterface</a></li> | ||
|
||
<li><a href=eu/xap3y/xagui/interfaces/GuiInterface.html>GuiInterface</a></li> | ||
|
||
<li><a href=eu/xap3y/xagui/interfaces/GuiOpenInterface.html>GuiOpenInterface</a></li> | ||
|
||
<li><a href=eu/xap3y/xagui/interfaces/GuiPageSwitchInterface.html>GuiPageSwitchInterface</a></li> | ||
|
||
<li><a href=eu/xap3y/xagui/listeners/GuiMenuListener.html>GuiMenuListener</a></li> | ||
|
||
<li><a href=eu/xap3y/xagui/models/GuiButton.html>GuiButton</a></li> | ||
|
||
<li><a href=eu/xap3y/xagui/models/GuiPageSwitchModel.html>GuiPageSwitchModel</a></li> | ||
</ul> | ||
</main> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,154 @@ | ||
<!DOCTYPE HTML> | ||
<!-- NewPage --> | ||
<html lang="en"><head> | ||
<title>Deprecated </title> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | ||
<meta name="dc.created" content="2020-03-25"> | ||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style"> | ||
<link rel="stylesheet" type="text/css" href="dokka-javadoc-stylesheet.css" title="Style"> | ||
<link rel="stylesheet" type="text/css" href="jquery/jquery-ui.css" title="Style"> | ||
<script type="text/javascript" src="jquery/jquery-3.6.0.min.js"></script> | ||
<script type="text/javascript" src="jquery/jquery-migrate-3.4.0.min.js"></script> | ||
<script type="text/javascript" src="jquery/jquery-ui.js"></script> | ||
|
||
<script type="text/javascript" src="search.js"></script> | ||
<script async type="text/javascript" src="module-search-index.js"></script> | ||
<script async type="text/javascript" src="package-search-index.js"></script> | ||
<script async type="text/javascript" src="type-search-index.js"></script> | ||
<script async type="text/javascript" src="member-search-index.js"></script> | ||
<script async type="text/javascript" src="tag-search-index.js"></script> | ||
</head><body> | ||
<script type="text/javascript"> | ||
var pathtoroot = ""; | ||
</script> | ||
<noscript> | ||
<div>JavaScript is disabled on your browser.</div> | ||
</noscript><header role="banner"> | ||
<nav role="navigation"> | ||
<div class="fixedNav"> | ||
<!-- ========= START OF TOP NAVBAR ======= --> | ||
<div class="topNav"><a id="navbar.top"> | ||
<!-- --> | ||
</a> | ||
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a> | ||
</div> | ||
<a id="navbar.top.firstrow"> | ||
<!-- --> | ||
</a> | ||
<ul class="navList" title="Navigation"> | ||
<li><a href="index.html">Overview</a></li> | ||
|
||
<li><a href="package-summary.html">Package</a></li> | ||
|
||
<li>Class</li> | ||
|
||
<li><a href="package-tree.html">Tree</a></li> | ||
|
||
<li><a href="deprecated.html">Deprecated</a></li> | ||
<li><a href="index-files/index-1.html">Index</a></li> | ||
<li>Help</li> | ||
</ul></div> | ||
<div class="subNav"> | ||
<ul class="navList" id="allclasses_navbar_top" style="display: block;"> | ||
<li><a href="allclasses.html">All Classes</a></li> | ||
</ul> | ||
|
||
<ul class="navListSearch"> | ||
<li><label for="search">SEARCH:</label> | ||
<input type="text" id="search" value="search" class="ui-autocomplete-input" autocomplete="off" placeholder="Search"> | ||
<input type="reset" id="reset" value="reset"> | ||
</li> | ||
</ul> | ||
<div> | ||
<script type="text/javascript"><!-- | ||
allClassesLink = document.getElementById("allclasses_navbar_top"); | ||
if(window==top) { | ||
allClassesLink.style.display = "block"; | ||
} | ||
else { | ||
allClassesLink.style.display = "none"; | ||
} | ||
//--> | ||
</script> | ||
<noscript> | ||
<div>JavaScript is disabled on your browser.</div> | ||
</noscript> | ||
</div> | ||
<a id="skip.navbar.top"> | ||
<!-- --> | ||
</a></div><!-- ========= END OF TOP NAVBAR ========= --> | ||
</div> | ||
<div class="navPadding"> </div> | ||
<script type="text/javascript"><!-- | ||
$('.navPadding').css('padding-top', $('.fixedNav').css("height")); | ||
//--> | ||
</script> | ||
</nav> | ||
</header> | ||
|
||
<main role="main"> | ||
<div class="header"> | ||
<h1 title="Deprecated API" class="title">Deprecated API</h1> | ||
<h2 title="Contents">Contents</h2> | ||
<ul> | ||
|
||
</ul> | ||
</div> | ||
<div class="contentContainer"> | ||
|
||
</div> | ||
</main><footer role="contentinfo"> | ||
<nav role="navigation"> | ||
<!-- ======= START OF BOTTOM NAVBAR ====== --> | ||
<div class="bottomNav"><a id="navbar.bottom"> | ||
<!-- --> | ||
</a> | ||
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a> | ||
</div> | ||
<a id="navbar.bottom.firstrow"> | ||
<!-- --> | ||
</a> | ||
<ul class="navList" title="Navigation"> | ||
<li><a href="index.html">Overview</a></li> | ||
|
||
<li><a href="package-summary.html">Package</a></li> | ||
|
||
<li>Class</li> | ||
|
||
<li><a href="package-tree.html">Tree</a></li> | ||
|
||
<li><a href="deprecated.html">Deprecated</a></li> | ||
<li><a href="index-files/index-1.html">Index</a></li> | ||
<li>Help</li> | ||
</ul></div> | ||
<a id="skip.navbar.bottom"> | ||
<!-- --> | ||
</a> | ||
<div class="subNav"> | ||
<ul class="navList" id="allclasses_navbar_top" style="display: block;"> | ||
<li><a href="allclasses.html">All Classes</a></li> | ||
</ul> | ||
<div> | ||
<script type="text/javascript"><!-- | ||
allClassesLink = document.getElementById("allclasses_navbar_top"); | ||
if(window==top) { | ||
allClassesLink.style.display = "block"; | ||
} | ||
else { | ||
allClassesLink.style.display = "none"; | ||
} | ||
//--> | ||
</script> | ||
<noscript> | ||
<div>JavaScript is disabled on your browser.</div> | ||
</noscript> | ||
</div> | ||
<a id="skip.navbar.top"> | ||
<!-- --> | ||
</a></div><!-- ======== END OF BOTTOM NAVBAR ======= --> | ||
</nav> | ||
</footer><ul class="ui-autocomplete ui-front ui-menu ui-widget ui-widget-content" id="ui-id-1" tabindex="0" | ||
style="display: none;"></ul> | ||
<span role="status" aria-live="assertive" aria-relevant="additions" class="ui-helper-hidden-accessible"></span> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/* | ||
* Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. | ||
*/ | ||
|
||
pre.wrap-overflow { | ||
overflow-x: auto; | ||
white-space: pre-wrap; | ||
white-space: -moz-pre-wrap; | ||
word-wrap: break-word; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
$dokka.format:javadoc-v1 | ||
$dokka.linkExtension:html | ||
|
||
eu.xap3y.xagui | ||
eu.xap3y.xagui.exceptions | ||
eu.xap3y.xagui.interfaces | ||
eu.xap3y.xagui.listeners | ||
eu.xap3y.xagui.models | ||
|
Oops, something went wrong.