Initial commit

This commit is contained in:
Jose
2026-01-18 17:28:23 +01:00
parent 0df40b2fa0
commit 3624a2741c
27 changed files with 119 additions and 121 deletions

View File

@@ -1,2 +1,2 @@
#Sun Jan 18 15:17:29 CET 2026 #Sun Jan 18 17:20:38 CET 2026
gradle.version=9.2.1 gradle.version=9.2.1

Binary file not shown.

1
.idea/.name generated Normal file
View File

@@ -0,0 +1 @@
HyStuff

6
.idea/vcs.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

View File

@@ -100,6 +100,10 @@ loadScripts(document, 'script');</script>
<dd>&nbsp;</dd> <dd>&nbsp;</dd>
<dt><a href="net/miarma/hystuff/common/HomeManager.html#getHomeCount()" class="member-name-link">getHomeCount()</a> - Method in class net.miarma.hystuff.common.<a href="net/miarma/hystuff/common/HomeManager.html" title="class in net.miarma.hystuff.common">HomeManager</a></dt> <dt><a href="net/miarma/hystuff/common/HomeManager.html#getHomeCount()" class="member-name-link">getHomeCount()</a> - Method in class net.miarma.hystuff.common.<a href="net/miarma/hystuff/common/HomeManager.html" title="class in net.miarma.hystuff.common">HomeManager</a></dt>
<dd>&nbsp;</dd> <dd>&nbsp;</dd>
<dt><a href="net/miarma/hystuff/common/LastPositionManager.html#getInstance()" class="member-name-link">getInstance()</a> - Static method in class net.miarma.hystuff.common.<a href="net/miarma/hystuff/common/LastPositionManager.html" title="class in net.miarma.hystuff.common">LastPositionManager</a></dt>
<dd>&nbsp;</dd>
<dt><a href="net/miarma/hystuff/common/HomeManager.html#getInstance(java.nio.file.Path,com.hypixel.hytale.logger.HytaleLogger)" class="member-name-link">getInstance(Path, HytaleLogger)</a> - Static method in class net.miarma.hystuff.common.<a href="net/miarma/hystuff/common/HomeManager.html" title="class in net.miarma.hystuff.common">HomeManager</a></dt>
<dd>&nbsp;</dd>
<dt><a href="net/miarma/hystuff/events/PlayerDeathListener.html#getQuery()" class="member-name-link">getQuery()</a> - Method in class net.miarma.hystuff.events.<a href="net/miarma/hystuff/events/PlayerDeathListener.html" title="class in net.miarma.hystuff.events">PlayerDeathListener</a></dt> <dt><a href="net/miarma/hystuff/events/PlayerDeathListener.html#getQuery()" class="member-name-link">getQuery()</a> - Method in class net.miarma.hystuff.events.<a href="net/miarma/hystuff/events/PlayerDeathListener.html" title="class in net.miarma.hystuff.events">PlayerDeathListener</a></dt>
<dd>&nbsp;</dd> <dd>&nbsp;</dd>
</dl> </dl>
@@ -119,8 +123,6 @@ loadScripts(document, 'script');</script>
<dd>&nbsp;</dd> <dd>&nbsp;</dd>
<dt><a href="net/miarma/hystuff/common/HomeManager.html" class="type-name-link" title="class in net.miarma.hystuff.common">HomeManager</a> - Class in <a href="net/miarma/hystuff/common/package-summary.html">net.miarma.hystuff.common</a></dt> <dt><a href="net/miarma/hystuff/common/HomeManager.html" class="type-name-link" title="class in net.miarma.hystuff.common">HomeManager</a> - Class in <a href="net/miarma/hystuff/common/package-summary.html">net.miarma.hystuff.common</a></dt>
<dd>&nbsp;</dd> <dd>&nbsp;</dd>
<dt><a href="net/miarma/hystuff/common/HomeManager.html#%3Cinit%3E(java.nio.file.Path,com.hypixel.hytale.logger.HytaleLogger)" class="member-name-link">HomeManager(Path, HytaleLogger)</a> - Constructor for class net.miarma.hystuff.common.<a href="net/miarma/hystuff/common/HomeManager.html" title="class in net.miarma.hystuff.common">HomeManager</a></dt>
<dd>&nbsp;</dd>
<dt><a href="net/miarma/hystuff/HyStuff.html" class="type-name-link" title="class in net.miarma.hystuff">HyStuff</a> - Class in <a href="net/miarma/hystuff/package-summary.html">net.miarma.hystuff</a></dt> <dt><a href="net/miarma/hystuff/HyStuff.html" class="type-name-link" title="class in net.miarma.hystuff">HyStuff</a> - Class in <a href="net/miarma/hystuff/package-summary.html">net.miarma.hystuff</a></dt>
<dd> <dd>
<div class="block">This class serves as the entrypoint for your plugin.</div> <div class="block">This class serves as the entrypoint for your plugin.</div>
@@ -132,8 +134,6 @@ loadScripts(document, 'script');</script>
<dl class="index"> <dl class="index">
<dt><a href="net/miarma/hystuff/common/LastPositionManager.html" class="type-name-link" title="class in net.miarma.hystuff.common">LastPositionManager</a> - Class in <a href="net/miarma/hystuff/common/package-summary.html">net.miarma.hystuff.common</a></dt> <dt><a href="net/miarma/hystuff/common/LastPositionManager.html" class="type-name-link" title="class in net.miarma.hystuff.common">LastPositionManager</a> - Class in <a href="net/miarma/hystuff/common/package-summary.html">net.miarma.hystuff.common</a></dt>
<dd>&nbsp;</dd> <dd>&nbsp;</dd>
<dt><a href="net/miarma/hystuff/common/LastPositionManager.html#%3Cinit%3E()" class="member-name-link">LastPositionManager()</a> - Constructor for class net.miarma.hystuff.common.<a href="net/miarma/hystuff/common/LastPositionManager.html" title="class in net.miarma.hystuff.common">LastPositionManager</a></dt>
<dd>&nbsp;</dd>
<dt><a href="net/miarma/hystuff/common/Location.html" class="type-name-link" title="class in net.miarma.hystuff.common">Location</a> - Record Class in <a href="net/miarma/hystuff/common/package-summary.html">net.miarma.hystuff.common</a></dt> <dt><a href="net/miarma/hystuff/common/Location.html" class="type-name-link" title="class in net.miarma.hystuff.common">Location</a> - Record Class in <a href="net/miarma/hystuff/common/package-summary.html">net.miarma.hystuff.common</a></dt>
<dd>&nbsp;</dd> <dd>&nbsp;</dd>
<dt><a href="net/miarma/hystuff/common/Location.html#%3Cinit%3E(java.lang.String,double,double,double,float,float)" class="member-name-link">Location(String, double, double, double, float, float)</a> - Constructor for record class net.miarma.hystuff.common.<a href="net/miarma/hystuff/common/Location.html" title="class in net.miarma.hystuff.common">Location</a></dt> <dt><a href="net/miarma/hystuff/common/Location.html#%3Cinit%3E(java.lang.String,double,double,double,float,float)" class="member-name-link">Location(String, double, double, double, float, float)</a> - Constructor for record class net.miarma.hystuff.common.<a href="net/miarma/hystuff/common/Location.html" title="class in net.miarma.hystuff.common">Location</a></dt>

File diff suppressed because one or more lines are too long

View File

@@ -53,15 +53,10 @@ loadScripts(document, 'script');</script>
<div class="toc-header">Contents&nbsp;<input type="text" class="filter-input" disabled placeholder="Filter contents (type .)" aria-label="Filter table of contents" autocomplete="off" spellcheck="false"><input type="reset" class="reset-filter" disabled tabindex="-1" value="Reset"></div> <div class="toc-header">Contents&nbsp;<input type="text" class="filter-input" disabled placeholder="Filter contents (type .)" aria-label="Filter table of contents" autocomplete="off" spellcheck="false"><input type="reset" class="reset-filter" disabled tabindex="-1" value="Reset"></div>
<ol class="toc-list" tabindex="-1"> <ol class="toc-list" tabindex="-1">
<li><a href="#" tabindex="0">Description</a></li> <li><a href="#" tabindex="0">Description</a></li>
<li><a href="#constructor-summary" tabindex="0">Constructor Summary</a></li>
<li><a href="#method-summary" tabindex="0">Method Summary</a></li> <li><a href="#method-summary" tabindex="0">Method Summary</a></li>
<li><a href="#constructor-detail" tabindex="0">Constructor Details</a>
<ol class="toc-list">
<li><a href="#%3Cinit%3E(java.nio.file.Path,com.hypixel.hytale.logger.HytaleLogger)" tabindex="0">HomeManager(Path, HytaleLogger)</a></li>
</ol>
</li>
<li><a href="#method-detail" tabindex="0">Method Details</a> <li><a href="#method-detail" tabindex="0">Method Details</a>
<ol class="toc-list"> <ol class="toc-list">
<li><a href="#getInstance(java.nio.file.Path,com.hypixel.hytale.logger.HytaleLogger)" tabindex="0">getInstance(Path, HytaleLogger)</a></li>
<li><a href="#save()" tabindex="0">save()</a></li> <li><a href="#save()" tabindex="0">save()</a></li>
<li><a href="#setHome(java.util.UUID,com.hypixel.hytale.server.core.universe.world.World,com.hypixel.hytale.math.vector.Vector3d,com.hypixel.hytale.math.vector.Vector3f)" tabindex="0">setHome(UUID, World, Vector3d, Vector3f)</a></li> <li><a href="#setHome(java.util.UUID,com.hypixel.hytale.server.core.universe.world.World,com.hypixel.hytale.math.vector.Vector3d,com.hypixel.hytale.math.vector.Vector3f)" tabindex="0">setHome(UUID, World, Vector3d, Vector3f)</a></li>
<li><a href="#getHome(java.util.UUID)" tabindex="0">getHome(UUID)</a></li> <li><a href="#getHome(java.util.UUID)" tabindex="0">getHome(UUID)</a></li>
@@ -89,26 +84,12 @@ loadScripts(document, 'script');</script>
</section> </section>
<section class="summary"> <section class="summary">
<ul class="summary-list"> <ul class="summary-list">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<li>
<section class="constructor-summary" id="constructor-summary">
<h2>Constructor Summary</h2>
<div class="caption"><span>Constructors</span></div>
<div class="summary-table two-column-summary">
<div class="table-header col-first">Constructor</div>
<div class="table-header col-last">Description</div>
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(java.nio.file.Path,com.hypixel.hytale.logger.HytaleLogger)" class="member-name-link">HomeManager</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html" title="class or interface in java.nio.file" class="external-link">Path</a>&nbsp;dataDir,
com.hypixel.hytale.logger.HytaleLogger&nbsp;logger)</code></div>
<div class="col-last even-row-color">&nbsp;</div>
</div>
</section>
</li>
<!-- ========== METHOD SUMMARY =========== --> <!-- ========== METHOD SUMMARY =========== -->
<li> <li>
<section class="method-summary" id="method-summary"> <section class="method-summary" id="method-summary">
<h2>Method Summary</h2> <h2>Method Summary</h2>
<div id="method-summary-table"> <div id="method-summary-table">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button></div> <div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab1" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab1', 3)" class="table-tab">Static Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button></div>
<div id="method-summary-table.tabpanel" role="tabpanel" aria-labelledby="method-summary-table-tab0"> <div id="method-summary-table.tabpanel" role="tabpanel" aria-labelledby="method-summary-table-tab0">
<div class="summary-table three-column-summary"> <div class="summary-table three-column-summary">
<div class="table-header col-first">Modifier and Type</div> <div class="table-header col-first">Modifier and Type</div>
@@ -120,21 +101,25 @@ loadScripts(document, 'script');</script>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div> <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getHomeCount()" class="member-name-link">getHomeCount</a>()</code></div> <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getHomeCount()" class="member-name-link">getHomeCount</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div> <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div> <div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="HomeManager.html" title="class in net.miarma.hystuff.common">HomeManager</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#hasHome(java.util.UUID)" class="member-name-link">hasHome</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/UUID.html" title="class or interface in java.util" class="external-link">UUID</a>&nbsp;playerUuid)</code></div> <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getInstance(java.nio.file.Path,com.hypixel.hytale.logger.HytaleLogger)" class="member-name-link">getInstance</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html" title="class or interface in java.nio.file" class="external-link">Path</a>&nbsp;dataDir,
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div> com.hypixel.hytale.logger.HytaleLogger&nbsp;logger)</code></div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">&nbsp;</div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#removeHome(java.util.UUID)" class="member-name-link">removeHome</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/UUID.html" title="class or interface in java.util" class="external-link">UUID</a>&nbsp;playerUuid)</code></div> <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#hasHome(java.util.UUID)" class="member-name-link">hasHome</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/UUID.html" title="class or interface in java.util" class="external-link">UUID</a>&nbsp;playerUuid)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div> <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#save()" class="member-name-link">save</a>()</code></div> <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#removeHome(java.util.UUID)" class="member-name-link">removeHome</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/UUID.html" title="class or interface in java.util" class="external-link">UUID</a>&nbsp;playerUuid)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div> <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setHome(java.util.UUID,com.hypixel.hytale.server.core.universe.world.World,com.hypixel.hytale.math.vector.Vector3d,com.hypixel.hytale.math.vector.Vector3f)" class="member-name-link">setHome</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/UUID.html" title="class or interface in java.util" class="external-link">UUID</a>&nbsp;playerUuid, <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#save()" class="member-name-link">save</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setHome(java.util.UUID,com.hypixel.hytale.server.core.universe.world.World,com.hypixel.hytale.math.vector.Vector3d,com.hypixel.hytale.math.vector.Vector3f)" class="member-name-link">setHome</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/UUID.html" title="class or interface in java.util" class="external-link">UUID</a>&nbsp;playerUuid,
com.hypixel.hytale.server.core.universe.world.World&nbsp;world, com.hypixel.hytale.server.core.universe.world.World&nbsp;world,
com.hypixel.hytale.math.vector.Vector3d&nbsp;position, com.hypixel.hytale.math.vector.Vector3d&nbsp;position,
com.hypixel.hytale.math.vector.Vector3f&nbsp;rotation)</code></div> com.hypixel.hytale.math.vector.Vector3f&nbsp;rotation)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div> <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
</div> </div>
</div> </div>
</div> </div>
@@ -147,30 +132,22 @@ loadScripts(document, 'script');</script>
</section> </section>
<section class="details"> <section class="details">
<ul class="details-list"> <ul class="details-list">
<!-- ========= CONSTRUCTOR DETAIL ======== --> <!-- ============ METHOD DETAIL ========== -->
<li> <li>
<section class="constructor-details" id="constructor-detail"> <section class="method-details" id="method-detail">
<h2>Constructor Details</h2> <h2>Method Details</h2>
<ul class="member-list"> <ul class="member-list">
<li> <li>
<section class="detail" id="&lt;init&gt;(java.nio.file.Path,com.hypixel.hytale.logger.HytaleLogger)"> <section class="detail" id="getInstance(java.nio.file.Path,com.hypixel.hytale.logger.HytaleLogger)">
<h3>HomeManager</h3> <h3>getInstance</h3>
<div class="horizontal-scroll"> <div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">HomeManager</span><wbr><span class="parameters">(@Nonnull <div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="HomeManager.html" title="class in net.miarma.hystuff.common">HomeManager</a></span>&nbsp;<span class="element-name">getInstance</span><wbr><span class="parameters">(@Nonnull
<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html" title="class or interface in java.nio.file" class="external-link">Path</a>&nbsp;dataDir, <a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html" title="class or interface in java.nio.file" class="external-link">Path</a>&nbsp;dataDir,
@Nonnull @Nonnull
com.hypixel.hytale.logger.HytaleLogger&nbsp;logger)</span></div> com.hypixel.hytale.logger.HytaleLogger&nbsp;logger)</span></div>
</div> </div>
</section> </section>
</li> </li>
</ul>
</section>
</li>
<!-- ============ METHOD DETAIL ========== -->
<li>
<section class="method-details" id="method-detail">
<h2>Method Details</h2>
<ul class="member-list">
<li> <li>
<section class="detail" id="save()"> <section class="detail" id="save()">
<h3>save</h3> <h3>save</h3>

View File

@@ -53,15 +53,10 @@ loadScripts(document, 'script');</script>
<div class="toc-header">Contents&nbsp;<input type="text" class="filter-input" disabled placeholder="Filter contents (type .)" aria-label="Filter table of contents" autocomplete="off" spellcheck="false"><input type="reset" class="reset-filter" disabled tabindex="-1" value="Reset"></div> <div class="toc-header">Contents&nbsp;<input type="text" class="filter-input" disabled placeholder="Filter contents (type .)" aria-label="Filter table of contents" autocomplete="off" spellcheck="false"><input type="reset" class="reset-filter" disabled tabindex="-1" value="Reset"></div>
<ol class="toc-list" tabindex="-1"> <ol class="toc-list" tabindex="-1">
<li><a href="#" tabindex="0">Description</a></li> <li><a href="#" tabindex="0">Description</a></li>
<li><a href="#constructor-summary" tabindex="0">Constructor Summary</a></li>
<li><a href="#method-summary" tabindex="0">Method Summary</a></li> <li><a href="#method-summary" tabindex="0">Method Summary</a></li>
<li><a href="#constructor-detail" tabindex="0">Constructor Details</a>
<ol class="toc-list">
<li><a href="#%3Cinit%3E()" tabindex="0">LastPositionManager()</a></li>
</ol>
</li>
<li><a href="#method-detail" tabindex="0">Method Details</a> <li><a href="#method-detail" tabindex="0">Method Details</a>
<ol class="toc-list"> <ol class="toc-list">
<li><a href="#getInstance()" tabindex="0">getInstance()</a></li>
<li><a href="#set(java.util.UUID,net.miarma.hystuff.common.Location)" tabindex="0">set(UUID, Location)</a></li> <li><a href="#set(java.util.UUID,net.miarma.hystuff.common.Location)" tabindex="0">set(UUID, Location)</a></li>
<li><a href="#get(java.util.UUID)" tabindex="0">get(UUID)</a></li> <li><a href="#get(java.util.UUID)" tabindex="0">get(UUID)</a></li>
<li><a href="#has(java.util.UUID)" tabindex="0">has(UUID)</a></li> <li><a href="#has(java.util.UUID)" tabindex="0">has(UUID)</a></li>
@@ -87,25 +82,12 @@ loadScripts(document, 'script');</script>
</section> </section>
<section class="summary"> <section class="summary">
<ul class="summary-list"> <ul class="summary-list">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<li>
<section class="constructor-summary" id="constructor-summary">
<h2>Constructor Summary</h2>
<div class="caption"><span>Constructors</span></div>
<div class="summary-table two-column-summary">
<div class="table-header col-first">Constructor</div>
<div class="table-header col-last">Description</div>
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E()" class="member-name-link">LastPositionManager</a>()</code></div>
<div class="col-last even-row-color">&nbsp;</div>
</div>
</section>
</li>
<!-- ========== METHOD SUMMARY =========== --> <!-- ========== METHOD SUMMARY =========== -->
<li> <li>
<section class="method-summary" id="method-summary"> <section class="method-summary" id="method-summary">
<h2>Method Summary</h2> <h2>Method Summary</h2>
<div id="method-summary-table"> <div id="method-summary-table">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button></div> <div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab1" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab1', 3)" class="table-tab">Static Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button></div>
<div id="method-summary-table.tabpanel" role="tabpanel" aria-labelledby="method-summary-table-tab0"> <div id="method-summary-table.tabpanel" role="tabpanel" aria-labelledby="method-summary-table-tab0">
<div class="summary-table three-column-summary"> <div class="summary-table three-column-summary">
<div class="table-header col-first">Modifier and Type</div> <div class="table-header col-first">Modifier and Type</div>
@@ -117,13 +99,16 @@ loadScripts(document, 'script');</script>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="Location.html" title="class in net.miarma.hystuff.common">Location</a></code></div> <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="Location.html" title="class in net.miarma.hystuff.common">Location</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#get(java.util.UUID)" class="member-name-link">get</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/UUID.html" title="class or interface in java.util" class="external-link">UUID</a>&nbsp;uuid)</code></div> <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#get(java.util.UUID)" class="member-name-link">get</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/UUID.html" title="class or interface in java.util" class="external-link">UUID</a>&nbsp;uuid)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div> <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div> <div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="LastPositionManager.html" title="class in net.miarma.hystuff.common">LastPositionManager</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#has(java.util.UUID)" class="member-name-link">has</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/UUID.html" title="class or interface in java.util" class="external-link">UUID</a>&nbsp;uuid)</code></div> <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getInstance()" class="member-name-link">getInstance</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div> <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">&nbsp;</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#set(java.util.UUID,net.miarma.hystuff.common.Location)" class="member-name-link">set</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/UUID.html" title="class or interface in java.util" class="external-link">UUID</a>&nbsp;uuid, <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#has(java.util.UUID)" class="member-name-link">has</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/UUID.html" title="class or interface in java.util" class="external-link">UUID</a>&nbsp;uuid)</code></div>
<a href="Location.html" title="class in net.miarma.hystuff.common">Location</a>&nbsp;pos)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div> <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#set(java.util.UUID,net.miarma.hystuff.common.Location)" class="member-name-link">set</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/UUID.html" title="class or interface in java.util" class="external-link">UUID</a>&nbsp;uuid,
<a href="Location.html" title="class in net.miarma.hystuff.common">Location</a>&nbsp;pos)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
</div> </div>
</div> </div>
</div> </div>
@@ -136,28 +121,20 @@ loadScripts(document, 'script');</script>
</section> </section>
<section class="details"> <section class="details">
<ul class="details-list"> <ul class="details-list">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<li>
<section class="constructor-details" id="constructor-detail">
<h2>Constructor Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="&lt;init&gt;()">
<h3>LastPositionManager</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">LastPositionManager</span>()</div>
</div>
</section>
</li>
</ul>
</section>
</li>
<!-- ============ METHOD DETAIL ========== --> <!-- ============ METHOD DETAIL ========== -->
<li> <li>
<section class="method-details" id="method-detail"> <section class="method-details" id="method-detail">
<h2>Method Details</h2> <h2>Method Details</h2>
<ul class="member-list"> <ul class="member-list">
<li> <li>
<section class="detail" id="getInstance()">
<h3>getInstance</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="LastPositionManager.html" title="class in net.miarma.hystuff.common">LastPositionManager</a></span>&nbsp;<span class="element-name">getInstance</span>()</div>
</div>
</section>
</li>
<li>
<section class="detail" id="set(java.util.UUID,net.miarma.hystuff.common.Location)"> <section class="detail" id="set(java.util.UUID,net.miarma.hystuff.common.Location)">
<h3>set</h3> <h3>set</h3>
<div class="horizontal-scroll"> <div class="horizontal-scroll">

View File

@@ -1,16 +1,16 @@
-classpath '/home/jomaa/IdeaProjects/HyStuff/build/classes/java/main:/home/jomaa/IdeaProjects/HyStuff/build/resources/main:/home/jomaa/.var/app/com.hypixel.HytaleLauncher/data/Hytale/install/release/package/game/latest/Server/HytaleServer.jar' -classpath '/home/jomaa/git/hystuff/build/classes/java/main:/home/jomaa/git/hystuff/build/resources/main:/home/jomaa/.var/app/com.hypixel.HytaleLauncher/data/Hytale/install/release/package/game/latest/Server/HytaleServer.jar'
-quiet -quiet
-d '/home/jomaa/IdeaProjects/HyStuff/build/docs/javadoc' -d '/home/jomaa/git/hystuff/build/docs/javadoc'
-windowtitle 'HyStuff 1.0.1 API' -windowtitle 'HyStuff 1.0.1 API'
-doctitle 'HyStuff 1.0.1 API' -doctitle 'HyStuff 1.0.1 API'
-notimestamp -notimestamp
-Xdoclint:-missing '-quiet' -Xdoclint:-missing '-quiet'
'/home/jomaa/IdeaProjects/HyStuff/src/main/java/net/miarma/hystuff/common/LastPositionManager.java' '/home/jomaa/git/hystuff/src/main/java/net/miarma/hystuff/common/LastPositionManager.java'
'/home/jomaa/IdeaProjects/HyStuff/src/main/java/net/miarma/hystuff/common/Location.java' '/home/jomaa/git/hystuff/src/main/java/net/miarma/hystuff/common/Location.java'
'/home/jomaa/IdeaProjects/HyStuff/src/main/java/net/miarma/hystuff/common/HomeManager.java' '/home/jomaa/git/hystuff/src/main/java/net/miarma/hystuff/common/HomeManager.java'
'/home/jomaa/IdeaProjects/HyStuff/src/main/java/net/miarma/hystuff/HyStuff.java' '/home/jomaa/git/hystuff/src/main/java/net/miarma/hystuff/HyStuff.java'
'/home/jomaa/IdeaProjects/HyStuff/src/main/java/net/miarma/hystuff/events/PlayerDeathListener.java' '/home/jomaa/git/hystuff/src/main/java/net/miarma/hystuff/events/PlayerDeathListener.java'
'/home/jomaa/IdeaProjects/HyStuff/src/main/java/net/miarma/hystuff/commands/BackCommand.java' '/home/jomaa/git/hystuff/src/main/java/net/miarma/hystuff/commands/BackCommand.java'
'/home/jomaa/IdeaProjects/HyStuff/src/main/java/net/miarma/hystuff/commands/SetHomeCommand.java' '/home/jomaa/git/hystuff/src/main/java/net/miarma/hystuff/commands/SetHomeCommand.java'
'/home/jomaa/IdeaProjects/HyStuff/src/main/java/net/miarma/hystuff/commands/HomeCommand.java' '/home/jomaa/git/hystuff/src/main/java/net/miarma/hystuff/commands/HomeCommand.java'
'/home/jomaa/IdeaProjects/HyStuff/src/main/java/net/miarma/hystuff/commands/DisposalCommand.java' '/home/jomaa/git/hystuff/src/main/java/net/miarma/hystuff/commands/DisposalCommand.java'

View File

@@ -40,8 +40,8 @@ public class HyStuff extends JavaPlugin {
@Override @Override
protected void setup() { protected void setup() {
LOGGER.atInfo().log("------ HYSTUFF PLUGIN SETUP BEGIN ------"); LOGGER.atInfo().log("------ HYSTUFF PLUGIN SETUP BEGIN ------");
this.homeManager = new HomeManager(this.getDataDirectory(), LOGGER); this.homeManager = HomeManager.getInstance(this.getDataDirectory(), LOGGER);
this.lastPositionManager = new LastPositionManager(); this.lastPositionManager = LastPositionManager.getInstance();
this.playerDeathListener = new PlayerDeathListener(lastPositionManager, LOGGER); this.playerDeathListener = new PlayerDeathListener(lastPositionManager, LOGGER);
LOGGER.atInfo().log("------- HYSTUFF PLUGIN SETUP END -------"); LOGGER.atInfo().log("------- HYSTUFF PLUGIN SETUP END -------");
} }

View File

@@ -38,6 +38,9 @@ public class BackCommand extends AbstractPlayerCommand {
UUID playerUuid = playerRef.getUuid(); UUID playerUuid = playerRef.getUuid();
Location lastPosition = this.lastPositionManager.get(playerUuid); Location lastPosition = this.lastPositionManager.get(playerUuid);
if (!this.lastPositionManager.has(playerUuid)) {
ctx.sendMessage(Message.raw("You don't have a last position to return to."));
} else {
final World targetWorld = Universe.get().getWorld(lastPosition.worldName()) != null ? final World targetWorld = Universe.get().getWorld(lastPosition.worldName()) != null ?
Universe.get().getWorld(lastPosition.worldName()) : world; Universe.get().getWorld(lastPosition.worldName()) : world;
@@ -52,5 +55,8 @@ public class BackCommand extends AbstractPlayerCommand {
ctx.sendMessage(Message.raw(String.format("Teleporting to your last position at %.1f, %.1f, %.1f", ctx.sendMessage(Message.raw(String.format("Teleporting to your last position at %.1f, %.1f, %.1f",
lastPosition.x(), lastPosition.y(), lastPosition.z()))); lastPosition.x(), lastPosition.y(), lastPosition.z())));
}); });
this.lastPositionManager.clear(playerUuid);
}
} }
} }

View File

@@ -2,6 +2,8 @@ package net.miarma.hystuff.commands;
import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.component.Ref;
import com.hypixel.hytale.component.Store; import com.hypixel.hytale.component.Store;
import com.hypixel.hytale.math.vector.Vector3d;
import com.hypixel.hytale.math.vector.Vector3f;
import com.hypixel.hytale.protocol.GameMode; import com.hypixel.hytale.protocol.GameMode;
import com.hypixel.hytale.server.core.Message; import com.hypixel.hytale.server.core.Message;
import com.hypixel.hytale.server.core.command.system.CommandContext; import com.hypixel.hytale.server.core.command.system.CommandContext;
@@ -13,6 +15,7 @@ import com.hypixel.hytale.server.core.universe.Universe;
import com.hypixel.hytale.server.core.universe.world.World; import com.hypixel.hytale.server.core.universe.world.World;
import com.hypixel.hytale.server.core.universe.world.storage.EntityStore; import com.hypixel.hytale.server.core.universe.world.storage.EntityStore;
import net.miarma.hystuff.common.HomeManager; import net.miarma.hystuff.common.HomeManager;
import net.miarma.hystuff.common.LastPositionManager;
import net.miarma.hystuff.common.Location; import net.miarma.hystuff.common.Location;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
@@ -20,10 +23,12 @@ import java.util.UUID;
public class HomeCommand extends AbstractPlayerCommand { public class HomeCommand extends AbstractPlayerCommand {
private final HomeManager homeManager; private final HomeManager homeManager;
private final LastPositionManager lastPositionManager;
public HomeCommand(HomeManager homeManager) { public HomeCommand(HomeManager homeManager) {
super("home", "Teleports you to your home"); super("home", "Teleports you to your home");
this.homeManager = homeManager; this.homeManager = homeManager;
this.lastPositionManager = LastPositionManager.getInstance();
} }
@Override @Override
@@ -42,6 +47,13 @@ public class HomeCommand extends AbstractPlayerCommand {
if (home == null) { if (home == null) {
ctx.sendMessage(Message.raw("You don't have a home set. Use /sethome first.")); ctx.sendMessage(Message.raw("You don't have a home set. Use /sethome first."));
} else { } else {
World currentWorld = Universe.get().getWorld(playerRef.getWorldUuid());
Vector3d pos = playerRef.getTransform().getPosition();
Vector3f rotation = playerRef.getHeadRotation();
Location currentLocation = new Location(currentWorld.getName(), pos.getX(), pos.getY(),
pos.getZ(), rotation.getYaw(), rotation.getPitch());
this.lastPositionManager.set(playerUuid, currentLocation);
final World homeWorld = Universe.get().getWorld(home.worldName()) != null ? final World homeWorld = Universe.get().getWorld(home.worldName()) != null ?
Universe.get().getWorld(home.worldName()) : world; Universe.get().getWorld(home.worldName()) : world;

View File

@@ -41,7 +41,7 @@ public class SetHomeCommand extends AbstractPlayerCommand {
ctx.sendMessage(Message.raw("Could not get your position.")); ctx.sendMessage(Message.raw("Could not get your position."));
} else { } else {
HeadRotation headRotation = store.getComponent(ref, HeadRotation.getComponentType()); HeadRotation headRotation = store.getComponent(ref, HeadRotation.getComponentType());
Vector3f rotation = headRotation != null ? headRotation.getRotation() : new Vector3f(0.0f, 0.0f, 0.0f); Vector3f rotation = headRotation.getRotation();
Vector3d position = transform.getPosition(); Vector3d position = transform.getPosition();
UUID playerUuid = playerRef.getUuid(); UUID playerUuid = playerRef.getUuid();
this.homeManager.setHome(playerUuid, world, position, rotation); this.homeManager.setHome(playerUuid, world, position, rotation);

View File

@@ -27,13 +27,20 @@ public class HomeManager {
private final Path dataDir; private final Path dataDir;
private final HytaleLogger LOGGER; private final HytaleLogger LOGGER;
private final Map<UUID, Location> homes = new ConcurrentHashMap<>(); private final Map<UUID, Location> homes = new ConcurrentHashMap<>();
private static HomeManager _instance;
public HomeManager(@Nonnull Path dataDir, @Nonnull HytaleLogger logger) { private HomeManager(@Nonnull Path dataDir, @Nonnull HytaleLogger logger) {
this.dataDir = dataDir; this.dataDir = dataDir;
this.LOGGER = logger; this.LOGGER = logger;
this.load(); this.load();
} }
public static HomeManager getInstance(@Nonnull Path dataDir, @Nonnull HytaleLogger logger) {
if(_instance == null)
_instance = new HomeManager(dataDir, logger);
return _instance;
}
private void load() { private void load() {
Path homesFile = this.dataDir.resolve(HOMES_FILE); Path homesFile = this.dataDir.resolve(HOMES_FILE);
if(!Files.exists(homesFile)) { if(!Files.exists(homesFile)) {

View File

@@ -9,6 +9,18 @@ import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
public class LastPositionManager { public class LastPositionManager {
private static LastPositionManager _instance;
private LastPositionManager() {
}
public static LastPositionManager getInstance() {
if(_instance == null)
_instance = new LastPositionManager();
return _instance;
}
private final Map<UUID, Location> lastPositions = new ConcurrentHashMap<>(); private final Map<UUID, Location> lastPositions = new ConcurrentHashMap<>();
public void set(UUID uuid, Location pos) { public void set(UUID uuid, Location pos) {