Initial commit
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -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
|
||||
|
||||
Binary file not shown.
Binary file not shown.
1
.idea/.name
generated
Normal file
1
.idea/.name
generated
Normal file
@@ -0,0 +1 @@
|
||||
HyStuff
|
||||
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal 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>
|
||||
@@ -100,6 +100,10 @@ loadScripts(document, 'script');</script>
|
||||
<dd> </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>
|
||||
<dd> </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> </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> </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>
|
||||
<dd> </dd>
|
||||
</dl>
|
||||
@@ -119,8 +123,6 @@ loadScripts(document, 'script');</script>
|
||||
<dd> </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>
|
||||
<dd> </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> </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>
|
||||
<dd>
|
||||
<div class="block">This class serves as the entrypoint for your plugin.</div>
|
||||
@@ -132,8 +134,6 @@ loadScripts(document, 'script');</script>
|
||||
<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>
|
||||
<dd> </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> </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>
|
||||
<dd> </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>
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -53,15 +53,10 @@ loadScripts(document, 'script');</script>
|
||||
<div class="toc-header">Contents <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">
|
||||
<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="#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>
|
||||
<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="#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>
|
||||
@@ -89,26 +84,12 @@ loadScripts(document, 'script');</script>
|
||||
</section>
|
||||
<section class="summary">
|
||||
<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> dataDir,
|
||||
com.hypixel.hytale.logger.HytaleLogger logger)</code></div>
|
||||
<div class="col-last even-row-color"> </div>
|
||||
</div>
|
||||
</section>
|
||||
</li>
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
<li>
|
||||
<section class="method-summary" id="method-summary">
|
||||
<h2>Method Summary</h2>
|
||||
<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 class="summary-table three-column-summary">
|
||||
<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-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"> </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-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> playerUuid)</code></div>
|
||||
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </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="#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> playerUuid)</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-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> dataDir,
|
||||
com.hypixel.hytale.logger.HytaleLogger logger)</code></div>
|
||||
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> </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> playerUuid)</code></div>
|
||||
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </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> playerUuid)</code></div>
|
||||
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </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> 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"> </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> playerUuid,
|
||||
com.hypixel.hytale.server.core.universe.world.World world,
|
||||
com.hypixel.hytale.math.vector.Vector3d position,
|
||||
com.hypixel.hytale.math.vector.Vector3f rotation)</code></div>
|
||||
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div>
|
||||
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -147,30 +132,22 @@ loadScripts(document, 'script');</script>
|
||||
</section>
|
||||
<section class="details">
|
||||
<ul class="details-list">
|
||||
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
||||
<!-- ============ METHOD DETAIL ========== -->
|
||||
<li>
|
||||
<section class="constructor-details" id="constructor-detail">
|
||||
<h2>Constructor Details</h2>
|
||||
<section class="method-details" id="method-detail">
|
||||
<h2>Method Details</h2>
|
||||
<ul class="member-list">
|
||||
<li>
|
||||
<section class="detail" id="<init>(java.nio.file.Path,com.hypixel.hytale.logger.HytaleLogger)">
|
||||
<h3>HomeManager</h3>
|
||||
<section class="detail" id="getInstance(java.nio.file.Path,com.hypixel.hytale.logger.HytaleLogger)">
|
||||
<h3>getInstance</h3>
|
||||
<div class="horizontal-scroll">
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="element-name">HomeManager</span><wbr><span class="parameters">(@Nonnull
|
||||
<div class="member-signature"><span class="modifiers">public static</span> <span class="return-type"><a href="HomeManager.html" title="class in net.miarma.hystuff.common">HomeManager</a></span> <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> dataDir,
|
||||
@Nonnull
|
||||
com.hypixel.hytale.logger.HytaleLogger logger)</span></div>
|
||||
</div>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</li>
|
||||
<!-- ============ METHOD DETAIL ========== -->
|
||||
<li>
|
||||
<section class="method-details" id="method-detail">
|
||||
<h2>Method Details</h2>
|
||||
<ul class="member-list">
|
||||
<li>
|
||||
<section class="detail" id="save()">
|
||||
<h3>save</h3>
|
||||
|
||||
@@ -53,15 +53,10 @@ loadScripts(document, 'script');</script>
|
||||
<div class="toc-header">Contents <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">
|
||||
<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="#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>
|
||||
<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="#get(java.util.UUID)" tabindex="0">get(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 class="summary">
|
||||
<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"> </div>
|
||||
</div>
|
||||
</section>
|
||||
</li>
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
<li>
|
||||
<section class="method-summary" id="method-summary">
|
||||
<h2>Method Summary</h2>
|
||||
<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 class="summary-table three-column-summary">
|
||||
<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-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> uuid)</code></div>
|
||||
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </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-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> uuid)</code></div>
|
||||
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </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="#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> uuid,
|
||||
<a href="Location.html" title="class in net.miarma.hystuff.common">Location</a> pos)</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-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-tab1 method-summary-table-tab4"> </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="#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> uuid)</code></div>
|
||||
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </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> uuid,
|
||||
<a href="Location.html" title="class in net.miarma.hystuff.common">Location</a> pos)</code></div>
|
||||
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -136,28 +121,20 @@ loadScripts(document, 'script');</script>
|
||||
</section>
|
||||
<section class="details">
|
||||
<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="<init>()">
|
||||
<h3>LastPositionManager</h3>
|
||||
<div class="horizontal-scroll">
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="element-name">LastPositionManager</span>()</div>
|
||||
</div>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</li>
|
||||
<!-- ============ METHOD DETAIL ========== -->
|
||||
<li>
|
||||
<section class="method-details" id="method-detail">
|
||||
<h2>Method Details</h2>
|
||||
<ul class="member-list">
|
||||
<li>
|
||||
<section class="detail" id="getInstance()">
|
||||
<h3>getInstance</h3>
|
||||
<div class="horizontal-scroll">
|
||||
<div class="member-signature"><span class="modifiers">public static</span> <span class="return-type"><a href="LastPositionManager.html" title="class in net.miarma.hystuff.common">LastPositionManager</a></span> <span class="element-name">getInstance</span>()</div>
|
||||
</div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="set(java.util.UUID,net.miarma.hystuff.common.Location)">
|
||||
<h3>set</h3>
|
||||
<div class="horizontal-scroll">
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -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
|
||||
-d '/home/jomaa/IdeaProjects/HyStuff/build/docs/javadoc'
|
||||
-d '/home/jomaa/git/hystuff/build/docs/javadoc'
|
||||
-windowtitle 'HyStuff 1.0.1 API'
|
||||
-doctitle 'HyStuff 1.0.1 API'
|
||||
-notimestamp
|
||||
-Xdoclint:-missing '-quiet'
|
||||
'/home/jomaa/IdeaProjects/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/IdeaProjects/HyStuff/src/main/java/net/miarma/hystuff/common/HomeManager.java'
|
||||
'/home/jomaa/IdeaProjects/HyStuff/src/main/java/net/miarma/hystuff/HyStuff.java'
|
||||
'/home/jomaa/IdeaProjects/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/IdeaProjects/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/IdeaProjects/HyStuff/src/main/java/net/miarma/hystuff/commands/DisposalCommand.java'
|
||||
'/home/jomaa/git/hystuff/src/main/java/net/miarma/hystuff/common/LastPositionManager.java'
|
||||
'/home/jomaa/git/hystuff/src/main/java/net/miarma/hystuff/common/Location.java'
|
||||
'/home/jomaa/git/hystuff/src/main/java/net/miarma/hystuff/common/HomeManager.java'
|
||||
'/home/jomaa/git/hystuff/src/main/java/net/miarma/hystuff/HyStuff.java'
|
||||
'/home/jomaa/git/hystuff/src/main/java/net/miarma/hystuff/events/PlayerDeathListener.java'
|
||||
'/home/jomaa/git/hystuff/src/main/java/net/miarma/hystuff/commands/BackCommand.java'
|
||||
'/home/jomaa/git/hystuff/src/main/java/net/miarma/hystuff/commands/SetHomeCommand.java'
|
||||
'/home/jomaa/git/hystuff/src/main/java/net/miarma/hystuff/commands/HomeCommand.java'
|
||||
'/home/jomaa/git/hystuff/src/main/java/net/miarma/hystuff/commands/DisposalCommand.java'
|
||||
|
||||
@@ -40,8 +40,8 @@ public class HyStuff extends JavaPlugin {
|
||||
@Override
|
||||
protected void setup() {
|
||||
LOGGER.atInfo().log("------ HYSTUFF PLUGIN SETUP BEGIN ------");
|
||||
this.homeManager = new HomeManager(this.getDataDirectory(), LOGGER);
|
||||
this.lastPositionManager = new LastPositionManager();
|
||||
this.homeManager = HomeManager.getInstance(this.getDataDirectory(), LOGGER);
|
||||
this.lastPositionManager = LastPositionManager.getInstance();
|
||||
this.playerDeathListener = new PlayerDeathListener(lastPositionManager, LOGGER);
|
||||
LOGGER.atInfo().log("------- HYSTUFF PLUGIN SETUP END -------");
|
||||
}
|
||||
|
||||
@@ -38,6 +38,9 @@ public class BackCommand extends AbstractPlayerCommand {
|
||||
UUID playerUuid = playerRef.getUuid();
|
||||
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 ?
|
||||
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",
|
||||
lastPosition.x(), lastPosition.y(), lastPosition.z())));
|
||||
});
|
||||
|
||||
this.lastPositionManager.clear(playerUuid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,8 @@ package net.miarma.hystuff.commands;
|
||||
|
||||
import com.hypixel.hytale.component.Ref;
|
||||
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.server.core.Message;
|
||||
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.storage.EntityStore;
|
||||
import net.miarma.hystuff.common.HomeManager;
|
||||
import net.miarma.hystuff.common.LastPositionManager;
|
||||
import net.miarma.hystuff.common.Location;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
@@ -20,10 +23,12 @@ import java.util.UUID;
|
||||
|
||||
public class HomeCommand extends AbstractPlayerCommand {
|
||||
private final HomeManager homeManager;
|
||||
private final LastPositionManager lastPositionManager;
|
||||
|
||||
public HomeCommand(HomeManager homeManager) {
|
||||
super("home", "Teleports you to your home");
|
||||
this.homeManager = homeManager;
|
||||
this.lastPositionManager = LastPositionManager.getInstance();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -42,6 +47,13 @@ public class HomeCommand extends AbstractPlayerCommand {
|
||||
if (home == null) {
|
||||
ctx.sendMessage(Message.raw("You don't have a home set. Use /sethome first."));
|
||||
} 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 ?
|
||||
Universe.get().getWorld(home.worldName()) : world;
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ public class SetHomeCommand extends AbstractPlayerCommand {
|
||||
ctx.sendMessage(Message.raw("Could not get your position."));
|
||||
} else {
|
||||
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();
|
||||
UUID playerUuid = playerRef.getUuid();
|
||||
this.homeManager.setHome(playerUuid, world, position, rotation);
|
||||
|
||||
@@ -27,13 +27,20 @@ public class HomeManager {
|
||||
private final Path dataDir;
|
||||
private final HytaleLogger LOGGER;
|
||||
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.LOGGER = logger;
|
||||
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() {
|
||||
Path homesFile = this.dataDir.resolve(HOMES_FILE);
|
||||
if(!Files.exists(homesFile)) {
|
||||
|
||||
@@ -9,6 +9,18 @@ import java.util.UUID;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
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<>();
|
||||
|
||||
public void set(UUID uuid, Location pos) {
|
||||
|
||||
Reference in New Issue
Block a user