JavaScript is disabled on your browser.
@@ -27,19 +27,19 @@ loadScripts(document, 'script');
@@ -50,11 +50,11 @@ loadScripts(document, 'script');
Package Hierarchies:
Class Hierarchy
@@ -67,9 +67,10 @@ loadScripts(document, 'script');
com.hypixel.hytale.server.core.command.system.basecommands.AbstractPlayerCommand
diff --git a/build/docs/javadoc/net/miarma/hystuff/commands/teleport/TpAcceptCommand.html b/build/docs/javadoc/net/miarma/hystuff/commands/teleport/TpAcceptCommand.html
new file mode 100644
index 0000000..f3b462d
--- /dev/null
+++ b/build/docs/javadoc/net/miarma/hystuff/commands/teleport/TpAcceptCommand.html
@@ -0,0 +1,222 @@
+
+
+
+
+TpAcceptCommand (HyStuff 1.2.0 API)
+
+
+
+
+
+
+
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+Description
+Field Summary
+Constructor Summary
+Method Summary
+Constructor Details
+
+TpAcceptCommand()
+
+
+Method Details
+
+canGeneratePermission()
+execute(CommandContext, Store, Ref, PlayerRef, World)
+
+
+
+
+
+
+
+java.lang.Object
+
com.hypixel.hytale.server.core.command.system.AbstractCommand
+
com.hypixel.hytale.server.core.command.system.basecommands.AbstractAsyncCommand
+
com.hypixel.hytale.server.core.command.system.basecommands.AbstractPlayerCommand
+
net.miarma.hystuff.commands.teleport.TpAcceptCommand
+
+
+
+
+
+
+
+
+
+
+Field Summary
+
+
Fields inherited from class com.hypixel.hytale.server.core.command.system.AbstractCommand
+EMPTY_STRING_ARRAY, LOGGER
+
+
+
+
+
+Constructor Summary
+Constructors
+
+
+
+
+
+
+Method Summary
+
+
All Methods Instance Methods Concrete Methods
+
+
+
+
+
+
protected boolean
+
+
+
protected void
+
execute (com.hypixel.hytale.server.core.command.system.CommandContext ctx,
+ com.hypixel.hytale.component.Store<com.hypixel.hytale.server.core.universe.world.storage.EntityStore> store,
+ com.hypixel.hytale.component.Ref<com.hypixel.hytale.server.core.universe.world.storage.EntityStore> ref,
+ com.hypixel.hytale.server.core.universe.PlayerRef playerRef,
+ com.hypixel.hytale.server.core.universe.world.World world)
+
+
+
+
+
+
Methods inherited from class com.hypixel.hytale.server.core.command.system.basecommands.AbstractPlayerCommand
+executeAsync
+
+
Methods inherited from class com.hypixel.hytale.server.core.command.system.basecommands.AbstractAsyncCommand
+execute, runAsync
+
+
Methods inherited from class com.hypixel.hytale.server.core.command.system.AbstractCommand
+acceptCall, addAliases, addSubCommand, addUsageVariant, completeRegistration, countParents, generatePermissionNode, getAliases, getDescription, getFullyQualifiedName, getName, getOwner, getPermission, getPermissionGroups, getPermissionGroupsRecursive, getRequiredArguments, getSubCommands, getUsageShort, getUsageString, hasBeenRegistered, hasPermission, isVariant, matches, putRecursivePermissionGroups, requirePermission, setAllowsExtraArguments, setOwner, setPermissionGroup, setPermissionGroups, setUnavailableInSingleplayer, withDefaultArg, withDefaultArg, withFlagArg, withListDefaultArg, withListOptionalArg, withListRequiredArg, withOptionalArg, withOptionalArg, withRequiredArg, withRequiredArg
+
+
Methods inherited from class Object
+
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait
+
+
+
+
+
+
+
+
+
+
+
+
+
+Method Details
+
+
+
+canGeneratePermission
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/build/docs/javadoc/net/miarma/hystuff/commands/teleport/TpDenyCommand.html b/build/docs/javadoc/net/miarma/hystuff/commands/teleport/TpDenyCommand.html
new file mode 100644
index 0000000..857d1b9
--- /dev/null
+++ b/build/docs/javadoc/net/miarma/hystuff/commands/teleport/TpDenyCommand.html
@@ -0,0 +1,222 @@
+
+
+
+
+TpDenyCommand (HyStuff 1.2.0 API)
+
+
+
+
+
+
+
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+Description
+Field Summary
+Constructor Summary
+Method Summary
+Constructor Details
+
+TpDenyCommand()
+
+
+Method Details
+
+canGeneratePermission()
+execute(CommandContext, Store, Ref, PlayerRef, World)
+
+
+
+
+
+
+
+java.lang.Object
+
com.hypixel.hytale.server.core.command.system.AbstractCommand
+
com.hypixel.hytale.server.core.command.system.basecommands.AbstractAsyncCommand
+
com.hypixel.hytale.server.core.command.system.basecommands.AbstractPlayerCommand
+
net.miarma.hystuff.commands.teleport.TpDenyCommand
+
+
+
+
+
+
+
+
+
+
+Field Summary
+
+
Fields inherited from class com.hypixel.hytale.server.core.command.system.AbstractCommand
+EMPTY_STRING_ARRAY, LOGGER
+
+
+
+
+
+Constructor Summary
+Constructors
+
+
+
+
+
+
+Method Summary
+
+
All Methods Instance Methods Concrete Methods
+
+
+
+
+
+
protected boolean
+
+
+
protected void
+
execute (com.hypixel.hytale.server.core.command.system.CommandContext ctx,
+ com.hypixel.hytale.component.Store<com.hypixel.hytale.server.core.universe.world.storage.EntityStore> store,
+ com.hypixel.hytale.component.Ref<com.hypixel.hytale.server.core.universe.world.storage.EntityStore> ref,
+ com.hypixel.hytale.server.core.universe.PlayerRef playerRef,
+ com.hypixel.hytale.server.core.universe.world.World world)
+
+
+
+
+
+
Methods inherited from class com.hypixel.hytale.server.core.command.system.basecommands.AbstractPlayerCommand
+executeAsync
+
+
Methods inherited from class com.hypixel.hytale.server.core.command.system.basecommands.AbstractAsyncCommand
+execute, runAsync
+
+
Methods inherited from class com.hypixel.hytale.server.core.command.system.AbstractCommand
+acceptCall, addAliases, addSubCommand, addUsageVariant, completeRegistration, countParents, generatePermissionNode, getAliases, getDescription, getFullyQualifiedName, getName, getOwner, getPermission, getPermissionGroups, getPermissionGroupsRecursive, getRequiredArguments, getSubCommands, getUsageShort, getUsageString, hasBeenRegistered, hasPermission, isVariant, matches, putRecursivePermissionGroups, requirePermission, setAllowsExtraArguments, setOwner, setPermissionGroup, setPermissionGroups, setUnavailableInSingleplayer, withDefaultArg, withDefaultArg, withFlagArg, withListDefaultArg, withListOptionalArg, withListRequiredArg, withOptionalArg, withOptionalArg, withRequiredArg, withRequiredArg
+
+
Methods inherited from class Object
+
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait
+
+
+
+
+
+
+
+
+
+
+
+
+
+Method Details
+
+
+
+canGeneratePermission
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/build/docs/javadoc/net/miarma/hystuff/commands/teleport/TpaCommand.html b/build/docs/javadoc/net/miarma/hystuff/commands/teleport/TpaCommand.html
new file mode 100644
index 0000000..3871abd
--- /dev/null
+++ b/build/docs/javadoc/net/miarma/hystuff/commands/teleport/TpaCommand.html
@@ -0,0 +1,222 @@
+
+
+
+
+TpaCommand (HyStuff 1.2.0 API)
+
+
+
+
+
+
+
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+Description
+Field Summary
+Constructor Summary
+Method Summary
+Constructor Details
+
+TpaCommand()
+
+
+Method Details
+
+canGeneratePermission()
+execute(CommandContext, Store, Ref, PlayerRef, World)
+
+
+
+
+
+
+
+java.lang.Object
+
com.hypixel.hytale.server.core.command.system.AbstractCommand
+
com.hypixel.hytale.server.core.command.system.basecommands.AbstractAsyncCommand
+
com.hypixel.hytale.server.core.command.system.basecommands.AbstractPlayerCommand
+
net.miarma.hystuff.commands.teleport.TpaCommand
+
+
+
+
+
+
+
+
+
+
+Field Summary
+
+
Fields inherited from class com.hypixel.hytale.server.core.command.system.AbstractCommand
+EMPTY_STRING_ARRAY, LOGGER
+
+
+
+
+
+Constructor Summary
+Constructors
+
+
+
+
+
+
+Method Summary
+
+
All Methods Instance Methods Concrete Methods
+
+
+
+
+
+
protected boolean
+
+
+
protected void
+
execute (com.hypixel.hytale.server.core.command.system.CommandContext ctx,
+ com.hypixel.hytale.component.Store<com.hypixel.hytale.server.core.universe.world.storage.EntityStore> store,
+ com.hypixel.hytale.component.Ref<com.hypixel.hytale.server.core.universe.world.storage.EntityStore> ref,
+ com.hypixel.hytale.server.core.universe.PlayerRef requester,
+ com.hypixel.hytale.server.core.universe.world.World world)
+
+
+
+
+
+
Methods inherited from class com.hypixel.hytale.server.core.command.system.basecommands.AbstractPlayerCommand
+executeAsync
+
+
Methods inherited from class com.hypixel.hytale.server.core.command.system.basecommands.AbstractAsyncCommand
+execute, runAsync
+
+
Methods inherited from class com.hypixel.hytale.server.core.command.system.AbstractCommand
+acceptCall, addAliases, addSubCommand, addUsageVariant, completeRegistration, countParents, generatePermissionNode, getAliases, getDescription, getFullyQualifiedName, getName, getOwner, getPermission, getPermissionGroups, getPermissionGroupsRecursive, getRequiredArguments, getSubCommands, getUsageShort, getUsageString, hasBeenRegistered, hasPermission, isVariant, matches, putRecursivePermissionGroups, requirePermission, setAllowsExtraArguments, setOwner, setPermissionGroup, setPermissionGroups, setUnavailableInSingleplayer, withDefaultArg, withDefaultArg, withFlagArg, withListDefaultArg, withListOptionalArg, withListRequiredArg, withOptionalArg, withOptionalArg, withRequiredArg, withRequiredArg
+
+
Methods inherited from class Object
+
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait
+
+
+
+
+
+
+
+
+
+
+
+
+
+Method Details
+
+
+
+canGeneratePermission
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/build/docs/javadoc/net/miarma/hystuff/commands/teleport/TpaHereCommand.html b/build/docs/javadoc/net/miarma/hystuff/commands/teleport/TpaHereCommand.html
new file mode 100644
index 0000000..aadfd33
--- /dev/null
+++ b/build/docs/javadoc/net/miarma/hystuff/commands/teleport/TpaHereCommand.html
@@ -0,0 +1,222 @@
+
+
+
+
+TpaHereCommand (HyStuff 1.2.0 API)
+
+
+
+
+
+
+
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+Description
+Field Summary
+Constructor Summary
+Method Summary
+Constructor Details
+
+TpaHereCommand()
+
+
+Method Details
+
+canGeneratePermission()
+execute(CommandContext, Store, Ref, PlayerRef, World)
+
+
+
+
+
+
+
+java.lang.Object
+
com.hypixel.hytale.server.core.command.system.AbstractCommand
+
com.hypixel.hytale.server.core.command.system.basecommands.AbstractAsyncCommand
+
com.hypixel.hytale.server.core.command.system.basecommands.AbstractPlayerCommand
+
net.miarma.hystuff.commands.teleport.TpaHereCommand
+
+
+
+
+
+
+
+
+
+
+Field Summary
+
+
Fields inherited from class com.hypixel.hytale.server.core.command.system.AbstractCommand
+EMPTY_STRING_ARRAY, LOGGER
+
+
+
+
+
+Constructor Summary
+Constructors
+
+
+
+
+
+
+Method Summary
+
+
All Methods Instance Methods Concrete Methods
+
+
+
+
+
+
protected boolean
+
+
+
protected void
+
execute (com.hypixel.hytale.server.core.command.system.CommandContext ctx,
+ com.hypixel.hytale.component.Store<com.hypixel.hytale.server.core.universe.world.storage.EntityStore> store,
+ com.hypixel.hytale.component.Ref<com.hypixel.hytale.server.core.universe.world.storage.EntityStore> ref,
+ com.hypixel.hytale.server.core.universe.PlayerRef requester,
+ com.hypixel.hytale.server.core.universe.world.World world)
+
+
+
+
+
+
Methods inherited from class com.hypixel.hytale.server.core.command.system.basecommands.AbstractPlayerCommand
+executeAsync
+
+
Methods inherited from class com.hypixel.hytale.server.core.command.system.basecommands.AbstractAsyncCommand
+execute, runAsync
+
+
Methods inherited from class com.hypixel.hytale.server.core.command.system.AbstractCommand
+acceptCall, addAliases, addSubCommand, addUsageVariant, completeRegistration, countParents, generatePermissionNode, getAliases, getDescription, getFullyQualifiedName, getName, getOwner, getPermission, getPermissionGroups, getPermissionGroupsRecursive, getRequiredArguments, getSubCommands, getUsageShort, getUsageString, hasBeenRegistered, hasPermission, isVariant, matches, putRecursivePermissionGroups, requirePermission, setAllowsExtraArguments, setOwner, setPermissionGroup, setPermissionGroups, setUnavailableInSingleplayer, withDefaultArg, withDefaultArg, withFlagArg, withListDefaultArg, withListOptionalArg, withListRequiredArg, withOptionalArg, withOptionalArg, withRequiredArg, withRequiredArg
+
+
Methods inherited from class Object
+
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait
+
+
+
+
+
+
+
+
+
+
+
+
+
+Method Details
+
+
+
+canGeneratePermission
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/build/docs/javadoc/net/miarma/hystuff/commands/teleport/package-summary.html b/build/docs/javadoc/net/miarma/hystuff/commands/teleport/package-summary.html
new file mode 100644
index 0000000..c88278d
--- /dev/null
+++ b/build/docs/javadoc/net/miarma/hystuff/commands/teleport/package-summary.html
@@ -0,0 +1,90 @@
+
+
+
+
+net.miarma.hystuff.commands.teleport (HyStuff 1.2.0 API)
+
+
+
+
+
+
+
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
diff --git a/build/docs/javadoc/net/miarma/hystuff/commands/teleport/package-tree.html b/build/docs/javadoc/net/miarma/hystuff/commands/teleport/package-tree.html
new file mode 100644
index 0000000..0b66877
--- /dev/null
+++ b/build/docs/javadoc/net/miarma/hystuff/commands/teleport/package-tree.html
@@ -0,0 +1,87 @@
+
+
+
+
+net.miarma.hystuff.commands.teleport Class Hierarchy (HyStuff 1.2.0 API)
+
+
+
+
+
+
+
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+Package Hierarchies:
+
+
+Class Hierarchy
+
+java.lang.Object
+
+com.hypixel.hytale.server.core.command.system.AbstractCommand
+
+com.hypixel.hytale.server.core.command.system.basecommands.AbstractAsyncCommand
+
+com.hypixel.hytale.server.core.command.system.basecommands.AbstractPlayerCommand
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/build/docs/javadoc/net/miarma/hystuff/component/HomeComponent.html b/build/docs/javadoc/net/miarma/hystuff/component/HomeComponent.html
index 9659dc2..e39c360 100644
--- a/build/docs/javadoc/net/miarma/hystuff/component/HomeComponent.html
+++ b/build/docs/javadoc/net/miarma/hystuff/component/HomeComponent.html
@@ -2,7 +2,7 @@
-HomeComponent (HyStuff 1.1.0 API)
+HomeComponent (HyStuff 1.2.0 API)
diff --git a/build/docs/javadoc/net/miarma/hystuff/component/LastPositionComponent.html b/build/docs/javadoc/net/miarma/hystuff/component/LastPositionComponent.html
index ce3cec1..2ac90d6 100644
--- a/build/docs/javadoc/net/miarma/hystuff/component/LastPositionComponent.html
+++ b/build/docs/javadoc/net/miarma/hystuff/component/LastPositionComponent.html
@@ -2,7 +2,7 @@
-LastPositionComponent (HyStuff 1.1.0 API)
+LastPositionComponent (HyStuff 1.2.0 API)
diff --git a/build/docs/javadoc/net/miarma/hystuff/component/PlaytimeComponent.html b/build/docs/javadoc/net/miarma/hystuff/component/PlaytimeComponent.html
new file mode 100644
index 0000000..c6f7873
--- /dev/null
+++ b/build/docs/javadoc/net/miarma/hystuff/component/PlaytimeComponent.html
@@ -0,0 +1,266 @@
+
+
+
+
+PlaytimeComponent (HyStuff 1.2.0 API)
+
+
+
+
+
+
+
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+Description
+Field Summary
+Constructor Summary
+Method Summary
+Field Details
+
+CODEC
+
+
+Constructor Details
+
+PlaytimeComponent()
+PlaytimeComponent(long)
+
+
+Method Details
+
+tick(float)
+getPlaytime()
+setPlaytime(long)
+clone()
+
+
+
+
+
+
+
+
+
+
+All Implemented Interfaces:
+com.hypixel.hytale.component.Component<com.hypixel.hytale.server.core.universe.world.storage.EntityStore>, Cloneable
+
+
+
+
+
+
+
+
+
+Field Summary
+Fields
+
+
+
Fields inherited from interface com.hypixel.hytale.component.Component
+EMPTY_ARRAY
+
+
+
+
+
+Constructor Summary
+Constructors
+
+
+
+
+
+
+Method Summary
+
+
All Methods Instance Methods Concrete Methods
+
+
+
+
+
+
com.hypixel.hytale.component.Component<com.hypixel.hytale.server.core.universe.world.storage.EntityStore>
+
+
+
long
+
+
+
void
+
+
+
void
+
+
+
+
+
+
+
+
Methods inherited from interface com.hypixel.hytale.component.Component
+cloneSerializable
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Method Details
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/build/docs/javadoc/net/miarma/hystuff/component/TpaRequestComponent.RequestType.html b/build/docs/javadoc/net/miarma/hystuff/component/TpaRequestComponent.RequestType.html
new file mode 100644
index 0000000..34c3242
--- /dev/null
+++ b/build/docs/javadoc/net/miarma/hystuff/component/TpaRequestComponent.RequestType.html
@@ -0,0 +1,235 @@
+
+
+
+
+TpaRequestComponent.RequestType (HyStuff 1.2.0 API)
+
+
+
+
+
+
+
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+Description
+Nested Class Summary
+Enum Constant Summary
+Method Summary
+Enum Constant Details
+
+TPA
+TPA_HERE
+
+
+Method Details
+
+values()
+valueOf(String)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Nested Class Summary
+
+
+
+
+
+
+Enum Constant Summary
+Enum Constants
+
+
+
+
+
+
+Method Summary
+
+
All Methods Static Methods Concrete Methods
+
+
+
+
+
+
+
+
+
Returns the enum constant of this class with the specified name.
+
+
+
+
+
Returns an array containing the constants of this enum class, in
+the order they are declared.
+
+
+
+
+
+
Methods inherited from class Enum
+
clone , compareTo , describeConstable , equals , finalize , getDeclaringClass , hashCode , name , ordinal , toString , valueOf
+
+
+
+
+
+
+
+
+
+
+Enum Constant Details
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/build/docs/javadoc/net/miarma/hystuff/component/TpaRequestComponent.html b/build/docs/javadoc/net/miarma/hystuff/component/TpaRequestComponent.html
new file mode 100644
index 0000000..c7eacdd
--- /dev/null
+++ b/build/docs/javadoc/net/miarma/hystuff/component/TpaRequestComponent.html
@@ -0,0 +1,331 @@
+
+
+
+
+TpaRequestComponent (HyStuff 1.2.0 API)
+
+
+
+
+
+
+
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+Description
+Nested Class Summary
+Field Summary
+Constructor Summary
+Method Summary
+Field Details
+
+CODEC
+
+
+Constructor Details
+
+TpaRequestComponent()
+
+
+Method Details
+
+getRequester()
+setRequester(UUID)
+getType()
+setType(TpaRequestComponent.RequestType)
+getCreatedAt()
+setCreatedAt(long)
+getInitialPosition()
+setInitialPosition(Vector3d)
+clone()
+
+
+
+
+
+
+
+
+
+
+All Implemented Interfaces:
+com.hypixel.hytale.component.Component<com.hypixel.hytale.server.core.universe.world.storage.EntityStore>, Cloneable
+
+
+
+
+
+
+
+
+
+Nested Class Summary
+Nested Classes
+
+
+
+
+
+
+Field Summary
+Fields
+
+
+
Fields inherited from interface com.hypixel.hytale.component.Component
+EMPTY_ARRAY
+
+
+
+
+
+Constructor Summary
+Constructors
+
+
+
+
+
+
+Method Summary
+
+
All Methods Instance Methods Concrete Methods
+
+
+
+
+
+
com.hypixel.hytale.component.Component<com.hypixel.hytale.server.core.universe.world.storage.EntityStore>
+
+
+
long
+
+
+
com.hypixel.hytale.math.vector.Vector3d
+
+
+
+
+
+
+
+
+
void
+
+
+
void
+
+
+
void
+
+
+
void
+
+
+
+
+
+
+
+
Methods inherited from interface com.hypixel.hytale.component.Component
+cloneSerializable
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Method Details
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/build/docs/javadoc/net/miarma/hystuff/component/package-summary.html b/build/docs/javadoc/net/miarma/hystuff/component/package-summary.html
index 55642e3..258a32b 100644
--- a/build/docs/javadoc/net/miarma/hystuff/component/package-summary.html
+++ b/build/docs/javadoc/net/miarma/hystuff/component/package-summary.html
@@ -2,7 +2,7 @@
-net.miarma.hystuff.component (HyStuff 1.1.0 API)
+net.miarma.hystuff.component (HyStuff 1.2.0 API)
@@ -74,16 +74,15 @@ loadScripts(document, 'script');
-
+
-
-
-
Classes
+
All Classes and Interfaces Classes Enum Classes
+
@@ -91,6 +90,13 @@ loadScripts(document, 'script');
+
+
+
+
+
+
+
diff --git a/build/docs/javadoc/net/miarma/hystuff/component/package-tree.html b/build/docs/javadoc/net/miarma/hystuff/component/package-tree.html
index 9572b79..1e7e311 100644
--- a/build/docs/javadoc/net/miarma/hystuff/component/package-tree.html
+++ b/build/docs/javadoc/net/miarma/hystuff/component/package-tree.html
@@ -2,7 +2,7 @@
-
net.miarma.hystuff.component Class Hierarchy (HyStuff 1.1.0 API)
+
net.miarma.hystuff.component Class Hierarchy (HyStuff 1.2.0 API)
@@ -63,6 +63,22 @@ loadScripts(document, 'script');
net.miarma.hystuff.component.HomeComponent (implements com.hypixel.hytale.component.Component<ECS_TYPE>)
net.miarma.hystuff.component.LastPositionComponent (implements com.hypixel.hytale.component.Component<ECS_TYPE>)
+net.miarma.hystuff.component.PlaytimeComponent (implements com.hypixel.hytale.component.Component<ECS_TYPE>)
+net.miarma.hystuff.component.TpaRequestComponent (implements com.hypixel.hytale.component.Component<ECS_TYPE>)
+
+
+
+
+
+Enum Class Hierarchy
+
diff --git a/build/docs/javadoc/net/miarma/hystuff/package-summary.html b/build/docs/javadoc/net/miarma/hystuff/package-summary.html
index 94b777c..823d80e 100644
--- a/build/docs/javadoc/net/miarma/hystuff/package-summary.html
+++ b/build/docs/javadoc/net/miarma/hystuff/package-summary.html
@@ -2,7 +2,7 @@
-net.miarma.hystuff (HyStuff 1.1.0 API)
+net.miarma.hystuff (HyStuff 1.2.0 API)
@@ -72,12 +72,10 @@ loadScripts(document, 'script');
diff --git a/build/docs/javadoc/net/miarma/hystuff/package-tree.html b/build/docs/javadoc/net/miarma/hystuff/package-tree.html
index be3ae25..df91abc 100644
--- a/build/docs/javadoc/net/miarma/hystuff/package-tree.html
+++ b/build/docs/javadoc/net/miarma/hystuff/package-tree.html
@@ -2,7 +2,7 @@
-
net.miarma.hystuff Class Hierarchy (HyStuff 1.1.0 API)
+
net.miarma.hystuff Class Hierarchy (HyStuff 1.2.0 API)
diff --git a/build/docs/javadoc/net/miarma/hystuff/events/PlayerDeathListener.html b/build/docs/javadoc/net/miarma/hystuff/system/PlayerDeathSystem.html
similarity index 96%
rename from build/docs/javadoc/net/miarma/hystuff/events/PlayerDeathListener.html
rename to build/docs/javadoc/net/miarma/hystuff/system/PlayerDeathSystem.html
index 74d26b5..7a73a5b 100644
--- a/build/docs/javadoc/net/miarma/hystuff/events/PlayerDeathListener.html
+++ b/build/docs/javadoc/net/miarma/hystuff/system/PlayerDeathSystem.html
@@ -2,10 +2,10 @@
-
PlayerDeathListener (HyStuff 1.1.0 API)
+
PlayerDeathSystem (HyStuff 1.2.0 API)
-
+
@@ -39,8 +39,8 @@ loadScripts(document, 'script');
@@ -58,7 +58,7 @@ loadScripts(document, 'script');
Method Summary
Constructor Details
-PlayerDeathListener()
+PlayerDeathSystem()
Method Details
@@ -75,12 +75,12 @@ loadScripts(document, 'script');
java.lang.Object
com.hypixel.hytale.component.system.System<com.hypixel.hytale.server.core.universe.world.storage.EntityStore>
com.hypixel.hytale.component.system.RefChangeSystem<com.hypixel.hytale.server.core.universe.world.storage.EntityStore, com.hypixel.hytale.server.core.modules.entity.damage.DeathComponent>
-
net.miarma.hystuff.events.PlayerDeathListener
+
net.miarma.hystuff.system.PlayerDeathSystem
@@ -91,7 +91,7 @@ loadScripts(document, 'script');
@@ -87,11 +85,11 @@ loadScripts(document, 'script');
diff --git a/build/docs/javadoc/net/miarma/hystuff/events/package-tree.html b/build/docs/javadoc/net/miarma/hystuff/system/package-tree.html
similarity index 74%
rename from build/docs/javadoc/net/miarma/hystuff/events/package-tree.html
rename to build/docs/javadoc/net/miarma/hystuff/system/package-tree.html
index 950d1cb..fc41fa8 100644
--- a/build/docs/javadoc/net/miarma/hystuff/events/package-tree.html
+++ b/build/docs/javadoc/net/miarma/hystuff/system/package-tree.html
@@ -2,10 +2,10 @@
-
net.miarma.hystuff.events Class Hierarchy (HyStuff 1.1.0 API)
+
net.miarma.hystuff.system Class Hierarchy (HyStuff 1.2.0 API)
-
+
@@ -39,7 +39,7 @@ loadScripts(document, 'script');
@@ -50,7 +50,7 @@ loadScripts(document, 'script');
Package Hierarchies:
@@ -65,7 +65,21 @@ loadScripts(document, 'script');
com.hypixel.hytale.component.system.RefChangeSystem<ECS_TYPE,T> (implements com.hypixel.hytale.component.system.QuerySystem<ECS_TYPE>)
+
+com.hypixel.hytale.component.system.tick.TickingSystem<ECS_TYPE> (implements com.hypixel.hytale.component.system.tick.TickableSystem<ECS_TYPE>)
+
+com.hypixel.hytale.component.system.tick.ArchetypeTickingSystem<ECS_TYPE> (implements com.hypixel.hytale.component.system.QuerySystem<ECS_TYPE>)
+
+com.hypixel.hytale.component.system.tick.EntityTickingSystem<ECS_TYPE>
+
+
+
+
diff --git a/build/docs/javadoc/overview-summary.html b/build/docs/javadoc/overview-summary.html
index 73acf93..b9200ee 100644
--- a/build/docs/javadoc/overview-summary.html
+++ b/build/docs/javadoc/overview-summary.html
@@ -2,7 +2,7 @@
-HyStuff 1.1.0 API
+HyStuff 1.2.0 API
diff --git a/build/docs/javadoc/overview-tree.html b/build/docs/javadoc/overview-tree.html
index fa50f9a..a0b2703 100644
--- a/build/docs/javadoc/overview-tree.html
+++ b/build/docs/javadoc/overview-tree.html
@@ -2,7 +2,7 @@
-Class Hierarchy (HyStuff 1.1.0 API)
+Class Hierarchy (HyStuff 1.2.0 API)
@@ -52,9 +52,10 @@ loadScripts(document, 'script');
Package Hierarchies:
Class Hierarchy
@@ -67,9 +68,14 @@ loadScripts(document, 'script');
com.hypixel.hytale.server.core.command.system.basecommands.AbstractPlayerCommand
@@ -78,6 +84,7 @@ loadScripts(document, 'script');
net.miarma.hystuff.component.HomeComponent (implements com.hypixel.hytale.component.Component<ECS_TYPE>)
net.miarma.hystuff.component.LastPositionComponent (implements com.hypixel.hytale.component.Component<ECS_TYPE>)
+net.miarma.hystuff.component.PlaytimeComponent (implements com.hypixel.hytale.component.Component<ECS_TYPE>)
com.hypixel.hytale.server.core.plugin.PluginBase (implements com.hypixel.hytale.server.core.command.system.CommandOwner)
com.hypixel.hytale.server.core.plugin.JavaPlugin
@@ -91,9 +98,38 @@ loadScripts(document, 'script');
com.hypixel.hytale.component.system.RefChangeSystem<ECS_TYPE,T> (implements com.hypixel.hytale.component.system.QuerySystem<ECS_TYPE>)
+com.hypixel.hytale.component.system.tick.TickingSystem<ECS_TYPE> (implements com.hypixel.hytale.component.system.tick.TickableSystem<ECS_TYPE>)
+
+com.hypixel.hytale.component.system.tick.ArchetypeTickingSystem<ECS_TYPE> (implements com.hypixel.hytale.component.system.QuerySystem<ECS_TYPE>)
+
+com.hypixel.hytale.component.system.tick.EntityTickingSystem<ECS_TYPE>
+
+
+
+
+
+
+
+
+net.miarma.hystuff.component.TpaRequestComponent (implements com.hypixel.hytale.component.Component<ECS_TYPE>)
+
+
+
+
+
+Enum Class Hierarchy
+
+java.lang.Object
+
diff --git a/build/docs/javadoc/package-search-index.js b/build/docs/javadoc/package-search-index.js
index 7f6f512..b4008fe 100644
--- a/build/docs/javadoc/package-search-index.js
+++ b/build/docs/javadoc/package-search-index.js
@@ -1 +1 @@
-packageSearchIndex = [{"l":"All Packages","u":"allpackages-index.html","k":"18"},{"l":"net.miarma.hystuff"},{"l":"net.miarma.hystuff.commands"},{"l":"net.miarma.hystuff.component"},{"l":"net.miarma.hystuff.events"}];updateSearchResults();
\ No newline at end of file
+packageSearchIndex = [{"l":"All Packages","u":"allpackages-index.html","k":"18"},{"l":"net.miarma.hystuff"},{"l":"net.miarma.hystuff.commands.misc"},{"l":"net.miarma.hystuff.commands.teleport"},{"l":"net.miarma.hystuff.component"},{"l":"net.miarma.hystuff.system"}];updateSearchResults();
\ No newline at end of file
diff --git a/build/docs/javadoc/search.html b/build/docs/javadoc/search.html
index ba73b3b..792becc 100644
--- a/build/docs/javadoc/search.html
+++ b/build/docs/javadoc/search.html
@@ -2,7 +2,7 @@
-Search (HyStuff 1.1.0 API)
+Search (HyStuff 1.2.0 API)
diff --git a/build/docs/javadoc/type-search-index.js b/build/docs/javadoc/type-search-index.js
index 2db8cfb..3ad76dc 100644
--- a/build/docs/javadoc/type-search-index.js
+++ b/build/docs/javadoc/type-search-index.js
@@ -1 +1 @@
-typeSearchIndex = [{"l":"All Classes and Interfaces","u":"allclasses-index.html","k":"18"},{"p":"net.miarma.hystuff.commands","l":"BackCommand"},{"p":"net.miarma.hystuff.commands","l":"HomeCommand"},{"p":"net.miarma.hystuff.component","l":"HomeComponent"},{"p":"net.miarma.hystuff","l":"HyStuff"},{"p":"net.miarma.hystuff.component","l":"LastPositionComponent"},{"p":"net.miarma.hystuff.events","l":"PlayerDeathListener"},{"p":"net.miarma.hystuff.commands","l":"SetHomeCommand"}];updateSearchResults();
\ No newline at end of file
+typeSearchIndex = [{"l":"All Classes and Interfaces","u":"allclasses-index.html","k":"18"},{"p":"net.miarma.hystuff.commands.misc","l":"BackCommand"},{"p":"net.miarma.hystuff.commands.misc","l":"HomeCommand"},{"p":"net.miarma.hystuff.component","l":"HomeComponent"},{"p":"net.miarma.hystuff","l":"HyStuff"},{"p":"net.miarma.hystuff.component","l":"LastPositionComponent"},{"p":"net.miarma.hystuff.system","l":"PlayerDeathSystem"},{"p":"net.miarma.hystuff.system","l":"PlayerTickSystem"},{"p":"net.miarma.hystuff.commands.misc","l":"PlaytimeCommand"},{"p":"net.miarma.hystuff.component","l":"PlaytimeComponent"},{"p":"net.miarma.hystuff.component","l":"TpaRequestComponent.RequestType","k":"9"},{"p":"net.miarma.hystuff.commands.misc","l":"SetHomeCommand"},{"p":"net.miarma.hystuff.commands.teleport","l":"TpAcceptCommand"},{"p":"net.miarma.hystuff.system","l":"TpaCleanupSystem"},{"p":"net.miarma.hystuff.commands.teleport","l":"TpaCommand"},{"p":"net.miarma.hystuff.commands.teleport","l":"TpaHereCommand"},{"p":"net.miarma.hystuff.component","l":"TpaRequestComponent"},{"p":"net.miarma.hystuff.commands.teleport","l":"TpDenyCommand"}];updateSearchResults();
\ No newline at end of file
diff --git a/build/resources/main/manifest.json b/build/resources/main/manifest.json
index e245de4..713a215 100644
--- a/build/resources/main/manifest.json
+++ b/build/resources/main/manifest.json
@@ -1,7 +1,7 @@
{
"Group": "Miarma",
"Name": "HyStuff",
- "Version": "1.1.0",
+ "Version": "1.2.0",
"Description": "Various stuff for Hytale",
"Authors": [
{
diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/BackCommand.class.uniqueId0 b/build/tmp/compileJava/compileTransaction/stash-dir/BackCommand.class.uniqueId0
new file mode 100644
index 0000000..2a3a264
Binary files /dev/null and b/build/tmp/compileJava/compileTransaction/stash-dir/BackCommand.class.uniqueId0 differ
diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/HomeCommand.class.uniqueId1 b/build/tmp/compileJava/compileTransaction/stash-dir/HomeCommand.class.uniqueId1
deleted file mode 100644
index 9a135fb..0000000
Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/HomeCommand.class.uniqueId1 and /dev/null differ
diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/HomeCommand.class.uniqueId10 b/build/tmp/compileJava/compileTransaction/stash-dir/HomeCommand.class.uniqueId10
new file mode 100644
index 0000000..f6cad10
Binary files /dev/null and b/build/tmp/compileJava/compileTransaction/stash-dir/HomeCommand.class.uniqueId10 differ
diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/HyStuff.class.uniqueId0 b/build/tmp/compileJava/compileTransaction/stash-dir/HyStuff.class.uniqueId0
deleted file mode 100644
index 198164d..0000000
Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/HyStuff.class.uniqueId0 and /dev/null differ
diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/HyStuff.class.uniqueId6 b/build/tmp/compileJava/compileTransaction/stash-dir/HyStuff.class.uniqueId6
new file mode 100644
index 0000000..d60942d
Binary files /dev/null and b/build/tmp/compileJava/compileTransaction/stash-dir/HyStuff.class.uniqueId6 differ
diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/PlayerDeathSystem.class.uniqueId1 b/build/tmp/compileJava/compileTransaction/stash-dir/PlayerDeathSystem.class.uniqueId1
new file mode 100644
index 0000000..a9050c6
Binary files /dev/null and b/build/tmp/compileJava/compileTransaction/stash-dir/PlayerDeathSystem.class.uniqueId1 differ
diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/PlayerTickSystem.class.uniqueId8 b/build/tmp/compileJava/compileTransaction/stash-dir/PlayerTickSystem.class.uniqueId8
new file mode 100644
index 0000000..ea3cdf6
Binary files /dev/null and b/build/tmp/compileJava/compileTransaction/stash-dir/PlayerTickSystem.class.uniqueId8 differ
diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/PlaytimeComponent.class.uniqueId11 b/build/tmp/compileJava/compileTransaction/stash-dir/PlaytimeComponent.class.uniqueId11
new file mode 100644
index 0000000..5bd1cbd
Binary files /dev/null and b/build/tmp/compileJava/compileTransaction/stash-dir/PlaytimeComponent.class.uniqueId11 differ
diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/PlaytimeHud.class.uniqueId4 b/build/tmp/compileJava/compileTransaction/stash-dir/PlaytimeHud.class.uniqueId4
new file mode 100644
index 0000000..5e274d7
Binary files /dev/null and b/build/tmp/compileJava/compileTransaction/stash-dir/PlaytimeHud.class.uniqueId4 differ
diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/SetHomeCommand.class.uniqueId2 b/build/tmp/compileJava/compileTransaction/stash-dir/SetHomeCommand.class.uniqueId2
new file mode 100644
index 0000000..cfcdac7
Binary files /dev/null and b/build/tmp/compileJava/compileTransaction/stash-dir/SetHomeCommand.class.uniqueId2 differ
diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/TpAcceptCommand.class.uniqueId5 b/build/tmp/compileJava/compileTransaction/stash-dir/TpAcceptCommand.class.uniqueId5
new file mode 100644
index 0000000..58fa5af
Binary files /dev/null and b/build/tmp/compileJava/compileTransaction/stash-dir/TpAcceptCommand.class.uniqueId5 differ
diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/TpDenyCommand.class.uniqueId3 b/build/tmp/compileJava/compileTransaction/stash-dir/TpDenyCommand.class.uniqueId3
new file mode 100644
index 0000000..d4ebac4
Binary files /dev/null and b/build/tmp/compileJava/compileTransaction/stash-dir/TpDenyCommand.class.uniqueId3 differ
diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/TpaCleanupSystem.class.uniqueId9 b/build/tmp/compileJava/compileTransaction/stash-dir/TpaCleanupSystem.class.uniqueId9
new file mode 100644
index 0000000..7725d42
Binary files /dev/null and b/build/tmp/compileJava/compileTransaction/stash-dir/TpaCleanupSystem.class.uniqueId9 differ
diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/TpaCommand.class.uniqueId7 b/build/tmp/compileJava/compileTransaction/stash-dir/TpaCommand.class.uniqueId7
new file mode 100644
index 0000000..53a96af
Binary files /dev/null and b/build/tmp/compileJava/compileTransaction/stash-dir/TpaCommand.class.uniqueId7 differ
diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/TpaHereCommand.class.uniqueId12 b/build/tmp/compileJava/compileTransaction/stash-dir/TpaHereCommand.class.uniqueId12
new file mode 100644
index 0000000..74a680e
Binary files /dev/null and b/build/tmp/compileJava/compileTransaction/stash-dir/TpaHereCommand.class.uniqueId12 differ
diff --git a/build/tmp/compileJava/previous-compilation-data.bin b/build/tmp/compileJava/previous-compilation-data.bin
index c6ea85a..3e2a3ff 100644
Binary files a/build/tmp/compileJava/previous-compilation-data.bin and b/build/tmp/compileJava/previous-compilation-data.bin differ
diff --git a/build/tmp/javadoc/javadoc.options b/build/tmp/javadoc/javadoc.options
index 5ddb70f..a0dd247 100644
--- a/build/tmp/javadoc/javadoc.options
+++ b/build/tmp/javadoc/javadoc.options
@@ -1,14 +1,23 @@
-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/git/hystuff/build/docs/javadoc'
--windowtitle 'HyStuff 1.1.0 API'
--doctitle 'HyStuff 1.1.0 API'
+-windowtitle 'HyStuff 1.2.0 API'
+-doctitle 'HyStuff 1.2.0 API'
-notimestamp
-Xdoclint:-missing '-quiet'
+'/home/jomaa/git/hystuff/src/main/java/net/miarma/hystuff/system/TpaCleanupSystem.java'
+'/home/jomaa/git/hystuff/src/main/java/net/miarma/hystuff/system/PlayerDeathSystem.java'
+'/home/jomaa/git/hystuff/src/main/java/net/miarma/hystuff/system/PlayerTickSystem.java'
'/home/jomaa/git/hystuff/src/main/java/net/miarma/hystuff/component/LastPositionComponent.java'
+'/home/jomaa/git/hystuff/src/main/java/net/miarma/hystuff/component/TpaRequestComponent.java'
+'/home/jomaa/git/hystuff/src/main/java/net/miarma/hystuff/component/PlaytimeComponent.java'
'/home/jomaa/git/hystuff/src/main/java/net/miarma/hystuff/component/HomeComponent.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/teleport/TpAcceptCommand.java'
+'/home/jomaa/git/hystuff/src/main/java/net/miarma/hystuff/commands/teleport/TpDenyCommand.java'
+'/home/jomaa/git/hystuff/src/main/java/net/miarma/hystuff/commands/teleport/TpaCommand.java'
+'/home/jomaa/git/hystuff/src/main/java/net/miarma/hystuff/commands/teleport/TpaHereCommand.java'
+'/home/jomaa/git/hystuff/src/main/java/net/miarma/hystuff/commands/misc/BackCommand.java'
+'/home/jomaa/git/hystuff/src/main/java/net/miarma/hystuff/commands/misc/SetHomeCommand.java'
+'/home/jomaa/git/hystuff/src/main/java/net/miarma/hystuff/commands/misc/HomeCommand.java'
+'/home/jomaa/git/hystuff/src/main/java/net/miarma/hystuff/commands/misc/PlaytimeCommand.java'
diff --git a/gradle.properties b/gradle.properties
index 7505304..c51202c 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,5 +1,5 @@
# The current version of your project. Please use semantic versioning!
-version=1.1.0
+version=1.2.0
# The group ID used for maven publishing. Usually the same as your package name
# but not the same as your plugin group!
diff --git a/src/main/java/net/miarma/hystuff/HyStuff.java b/src/main/java/net/miarma/hystuff/HyStuff.java
index b704f5a..3d5e52f 100644
--- a/src/main/java/net/miarma/hystuff/HyStuff.java
+++ b/src/main/java/net/miarma/hystuff/HyStuff.java
@@ -1,25 +1,24 @@
package net.miarma.hystuff;
import com.hypixel.hytale.component.ComponentType;
-import com.hypixel.hytale.event.EventRegistry;
import com.hypixel.hytale.logger.HytaleLogger;
-import com.hypixel.hytale.math.vector.Vector3d;
-import com.hypixel.hytale.math.vector.Vector3f;
-import com.hypixel.hytale.server.core.event.events.player.AddPlayerToWorldEvent;
-import com.hypixel.hytale.server.core.event.events.player.PlayerConnectEvent;
-import com.hypixel.hytale.server.core.modules.entity.component.HeadRotation;
-import com.hypixel.hytale.server.core.modules.entity.component.TransformComponent;
import com.hypixel.hytale.server.core.plugin.JavaPlugin;
import com.hypixel.hytale.server.core.plugin.JavaPluginInit;
-import com.hypixel.hytale.server.core.universe.PlayerRef;
-import com.hypixel.hytale.server.core.universe.world.World;
import com.hypixel.hytale.server.core.universe.world.storage.EntityStore;
-import net.miarma.hystuff.commands.BackCommand;
-import net.miarma.hystuff.commands.HomeCommand;
-import net.miarma.hystuff.commands.SetHomeCommand;
+import net.miarma.hystuff.commands.misc.BackCommand;
+import net.miarma.hystuff.commands.misc.HomeCommand;
+import net.miarma.hystuff.commands.misc.PlaytimeCommand;
+import net.miarma.hystuff.commands.misc.SetHomeCommand;
+import net.miarma.hystuff.commands.teleport.TpAcceptCommand;
+import net.miarma.hystuff.commands.teleport.TpDenyCommand;
+import net.miarma.hystuff.commands.teleport.TpaCommand;
+import net.miarma.hystuff.commands.teleport.TpaHereCommand;
import net.miarma.hystuff.component.HomeComponent;
import net.miarma.hystuff.component.LastPositionComponent;
-import net.miarma.hystuff.events.PlayerDeathListener;
+import net.miarma.hystuff.component.PlaytimeComponent;
+import net.miarma.hystuff.component.TpaRequestComponent;
+import net.miarma.hystuff.system.PlayerDeathSystem;
+import net.miarma.hystuff.system.TpaCleanupSystem;
import javax.annotation.Nonnull;
@@ -28,10 +27,14 @@ import javax.annotation.Nonnull;
* event listeners.
*/
public class HyStuff extends JavaPlugin {
- private PlayerDeathListener playerDeathListener;
+ private PlayerDeathSystem playerDeathSystem;
+ private TpaCleanupSystem tpaCleanupSystem;
private static final HytaleLogger LOGGER = HytaleLogger.forEnclosingClass();
+
public static ComponentType HOME_COMPONENT_TYPE;
public static ComponentType LAST_POSITION_COMPONENT_TYPE;
+ public static ComponentType TPA_REQUEST_COMPONENT_TYPE;
+ public static ComponentType PLAYTIME_COMPONENT_TYPE;
public HyStuff(@Nonnull JavaPluginInit init) {
super(init);
@@ -40,7 +43,8 @@ public class HyStuff extends JavaPlugin {
@Override
protected void setup() {
LOGGER.atInfo().log("------ HYSTUFF PLUGIN SETUP BEGIN ------");
- this.playerDeathListener = new PlayerDeathListener();
+ this.playerDeathSystem = new PlayerDeathSystem();
+ this.tpaCleanupSystem = new TpaCleanupSystem();
LOGGER.atInfo().log("------- HYSTUFF PLUGIN SETUP END -------");
}
@@ -53,28 +57,48 @@ public class HyStuff extends JavaPlugin {
LAST_POSITION_COMPONENT_TYPE = this.getEntityStoreRegistry()
.registerComponent(LastPositionComponent.class, "hystuff:last_position", LastPositionComponent.CODEC);
+ TPA_REQUEST_COMPONENT_TYPE = this.getEntityStoreRegistry()
+ .registerComponent(TpaRequestComponent.class, "hystuff:tpa_request", TpaRequestComponent.CODEC);
+
+ PLAYTIME_COMPONENT_TYPE = this.getEntityStoreRegistry()
+ .registerComponent(PlaytimeComponent.class, "hystuff:playtime", PlaytimeComponent.CODEC);
+
this.getCommandRegistry().registerCommand(new HomeCommand());
this.getCommandRegistry().registerCommand(new SetHomeCommand());
this.getCommandRegistry().registerCommand(new BackCommand());
+ this.getCommandRegistry().registerCommand(new TpaCommand());
+ this.getCommandRegistry().registerCommand(new TpaHereCommand());
+ this.getCommandRegistry().registerCommand(new TpAcceptCommand());
+ this.getCommandRegistry().registerCommand(new TpDenyCommand());
+ this.getCommandRegistry().registerCommand(new PlaytimeCommand());
- if (this.playerDeathListener != null) {
+ if (this.playerDeathSystem != null) {
try {
- EntityStore.REGISTRY.registerSystem(this.playerDeathListener);
+ EntityStore.REGISTRY.registerSystem(this.playerDeathSystem);
LOGGER.atInfo().log("Death location tracking enabled.");
} catch (Exception e) {
LOGGER.atWarning().log("Could not register death listener: " + e.getMessage());
}
}
+ if (this.tpaCleanupSystem != null) {
+ try {
+ EntityStore.REGISTRY.registerSystem(this.tpaCleanupSystem);
+ LOGGER.atInfo().log("TPA Cleanup system enabled.");
+ } catch (Exception e) {
+ LOGGER.atWarning().log("Could not register TPA Cleanup system: " + e.getMessage());
+ }
+ }
+
LOGGER.atInfo().log("HyStuff plugin started succesfully!");
- LOGGER.atInfo().log("Commands registered: /home, /sethome");
+ LOGGER.atInfo().log("Commands registered: /home, /sethome, /tpa, /tpahere, /tpaccept, /tpdeny");
}
@Override
protected void shutdown() {
LOGGER.atInfo().log("HyStuff plugin is shutting down...");
- if (this.playerDeathListener != null) {
- EntityStore.REGISTRY.unregisterSystem(PlayerDeathListener.class);
+ if (this.playerDeathSystem != null) {
+ EntityStore.REGISTRY.unregisterSystem(PlayerDeathSystem.class);
}
}
}
\ No newline at end of file
diff --git a/src/main/java/net/miarma/hystuff/commands/BackCommand.java b/src/main/java/net/miarma/hystuff/commands/misc/BackCommand.java
similarity index 87%
rename from src/main/java/net/miarma/hystuff/commands/BackCommand.java
rename to src/main/java/net/miarma/hystuff/commands/misc/BackCommand.java
index b6b566e..364ab21 100644
--- a/src/main/java/net/miarma/hystuff/commands/BackCommand.java
+++ b/src/main/java/net/miarma/hystuff/commands/misc/BackCommand.java
@@ -1,4 +1,4 @@
-package net.miarma.hystuff.commands;
+package net.miarma.hystuff.commands.misc;
import com.hypixel.hytale.component.Ref;
import com.hypixel.hytale.component.Store;
@@ -42,7 +42,9 @@ public class BackCommand extends AbstractPlayerCommand {
Teleport teleport = new Teleport(lastLocation.getPosition(), lastLocation.getRotation());
- store.addComponent(ref, Teleport.getComponentType(), teleport);
- store.removeComponent(ref, HyStuff.LAST_POSITION_COMPONENT_TYPE);
+ world.execute(() -> {
+ store.addComponent(ref, Teleport.getComponentType(), teleport);
+ store.removeComponent(ref, HyStuff.LAST_POSITION_COMPONENT_TYPE);
+ });
}
}
diff --git a/src/main/java/net/miarma/hystuff/commands/HomeCommand.java b/src/main/java/net/miarma/hystuff/commands/misc/HomeCommand.java
similarity index 90%
rename from src/main/java/net/miarma/hystuff/commands/HomeCommand.java
rename to src/main/java/net/miarma/hystuff/commands/misc/HomeCommand.java
index 2c46124..e8affbd 100644
--- a/src/main/java/net/miarma/hystuff/commands/HomeCommand.java
+++ b/src/main/java/net/miarma/hystuff/commands/misc/HomeCommand.java
@@ -1,4 +1,4 @@
-package net.miarma.hystuff.commands;
+package net.miarma.hystuff.commands.misc;
import com.hypixel.hytale.component.Ref;
import com.hypixel.hytale.component.Store;
@@ -58,11 +58,17 @@ public class HomeCommand extends AbstractPlayerCommand {
world.getWorldConfig().getUuid()
);
- store.putComponent(ref, HyStuff.LAST_POSITION_COMPONENT_TYPE, last);
+ world.execute(() -> {
+ store.putComponent(ref, HyStuff.LAST_POSITION_COMPONENT_TYPE, last);
+ });
Teleport teleport = new Teleport(homeLocation.getPosition(), homeLocation.getRotation());
World targetWorld = Universe.get().getWorld(homeComp.getWorldUuid());
- store.addComponent(ref, Teleport.getComponentType(), teleport);
+
+ world.execute(() -> {
+ store.addComponent(ref, Teleport.getComponentType(), teleport);
+ });
+
ctx.sendMessage(Message.raw(String.format(
"Teleporting to your home at %.1f, %.1f, %.1f in %s",
homeLocation.getPosition().getX(),
diff --git a/src/main/java/net/miarma/hystuff/commands/misc/PlaytimeCommand.java b/src/main/java/net/miarma/hystuff/commands/misc/PlaytimeCommand.java
new file mode 100644
index 0000000..1d936df
--- /dev/null
+++ b/src/main/java/net/miarma/hystuff/commands/misc/PlaytimeCommand.java
@@ -0,0 +1,38 @@
+package net.miarma.hystuff.commands.misc;
+
+import com.hypixel.hytale.component.Ref;
+import com.hypixel.hytale.component.Store;
+import com.hypixel.hytale.server.core.Message;
+import com.hypixel.hytale.server.core.command.system.CommandContext;
+import com.hypixel.hytale.server.core.command.system.basecommands.AbstractPlayerCommand;
+import com.hypixel.hytale.server.core.universe.PlayerRef;
+import com.hypixel.hytale.server.core.universe.world.World;
+import com.hypixel.hytale.server.core.universe.world.storage.EntityStore;
+import net.miarma.hystuff.HyStuff;
+import net.miarma.hystuff.component.PlaytimeComponent;
+import org.checkerframework.checker.nullness.compatqual.NonNullDecl;
+
+public class PlaytimeCommand extends AbstractPlayerCommand {
+ public PlaytimeCommand() {
+ super("playtime", "Tells you how long you've been playing.");
+ }
+
+ @Override
+ protected void execute(@NonNullDecl CommandContext ctx,
+ @NonNullDecl Store store,
+ @NonNullDecl Ref ref,
+ @NonNullDecl PlayerRef playerRef,
+ @NonNullDecl World world) {
+ PlaytimeComponent playtimeComp = store.getComponent(ref, HyStuff.PLAYTIME_COMPONENT_TYPE);
+
+ long seconds = 0L;
+ if (playtimeComp != null) {
+ seconds = playtimeComp.getPlaytime();
+ }
+
+ long h = seconds / 3600;
+ long m = (seconds % 3600) / 60;
+
+ ctx.sendMessage(Message.raw("Playtime: " + h + "h " + m + "m"));
+ }
+}
diff --git a/src/main/java/net/miarma/hystuff/commands/SetHomeCommand.java b/src/main/java/net/miarma/hystuff/commands/misc/SetHomeCommand.java
similarity index 92%
rename from src/main/java/net/miarma/hystuff/commands/SetHomeCommand.java
rename to src/main/java/net/miarma/hystuff/commands/misc/SetHomeCommand.java
index ecf8b4c..c73cd54 100644
--- a/src/main/java/net/miarma/hystuff/commands/SetHomeCommand.java
+++ b/src/main/java/net/miarma/hystuff/commands/misc/SetHomeCommand.java
@@ -1,4 +1,4 @@
-package net.miarma.hystuff.commands;
+package net.miarma.hystuff.commands.misc;
import com.hypixel.hytale.component.Ref;
import com.hypixel.hytale.component.Store;
@@ -45,7 +45,10 @@ public class SetHomeCommand extends AbstractPlayerCommand {
world.getWorldConfig().getUuid()
);
- store.putComponent(ref, HyStuff.HOME_COMPONENT_TYPE, home);
+ world.execute(() -> {
+ store.putComponent(ref, HyStuff.HOME_COMPONENT_TYPE, home);
+ });
+
ctx.sendMessage(Message.raw(String.format(
"Your home has been set at %.1f, %.1f, %.1f",
transformComp.getPosition().getX(),
diff --git a/src/main/java/net/miarma/hystuff/commands/teleport/TpAcceptCommand.java b/src/main/java/net/miarma/hystuff/commands/teleport/TpAcceptCommand.java
new file mode 100644
index 0000000..2c3e87f
--- /dev/null
+++ b/src/main/java/net/miarma/hystuff/commands/teleport/TpAcceptCommand.java
@@ -0,0 +1,149 @@
+package net.miarma.hystuff.commands.teleport;
+
+import com.hypixel.hytale.component.Ref;
+import com.hypixel.hytale.component.Store;
+import com.hypixel.hytale.math.vector.Transform;
+import com.hypixel.hytale.server.core.Message;
+import com.hypixel.hytale.server.core.command.system.CommandContext;
+import com.hypixel.hytale.server.core.command.system.arguments.system.OptionalArg;
+import com.hypixel.hytale.server.core.command.system.arguments.system.RequiredArg;
+import com.hypixel.hytale.server.core.command.system.arguments.types.ArgTypes;
+import com.hypixel.hytale.server.core.command.system.basecommands.AbstractPlayerCommand;
+import com.hypixel.hytale.server.core.modules.entity.component.TransformComponent;
+import com.hypixel.hytale.server.core.modules.entity.teleport.Teleport;
+import com.hypixel.hytale.server.core.universe.PlayerRef;
+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.HyStuff;
+import net.miarma.hystuff.component.TpaRequestComponent;
+import org.checkerframework.checker.nullness.compatqual.NonNullDecl;
+
+import java.util.UUID;
+
+public class TpAcceptCommand extends AbstractPlayerCommand {
+
+ private final OptionalArg targetPlayerArg;
+
+ public TpAcceptCommand() {
+ super("tpaccept", "Accepts a teleport request");
+ targetPlayerArg = this.withOptionalArg("targetPlayer",
+ "Player you want to accept teleport from", ArgTypes.PLAYER_REF);
+ }
+
+ @Override
+ protected boolean canGeneratePermission() {
+ return false;
+ }
+
+ @Override
+ protected void execute(@NonNullDecl CommandContext ctx,
+ @NonNullDecl Store store,
+ @NonNullDecl Ref ref,
+ @NonNullDecl PlayerRef playerRef,
+ @NonNullDecl World world) {
+
+ PlayerRef targetPlayerRef = this.targetPlayerArg.get(ctx);
+
+ TpaRequestComponent tpaRequestComp = store.getComponent(ref, HyStuff.TPA_REQUEST_COMPONENT_TYPE);
+ if (tpaRequestComp == null) {
+ ctx.sendMessage(Message.raw("You don't have pending teleport requests."));
+ return;
+ }
+
+ UUID requesterUuid = tpaRequestComp.getRequester();
+ if (requesterUuid == null) {
+ ctx.sendMessage(Message.raw("Teleport request is corrupted."));
+ store.removeComponent(ref, HyStuff.TPA_REQUEST_COMPONENT_TYPE);
+ return;
+ }
+
+ if (targetPlayerRef != null && !targetPlayerRef.getUuid().equals(requesterUuid)) {
+ ctx.sendMessage(Message.raw("You don't have a teleport request from that player."));
+ return;
+ }
+
+ PlayerRef requester = Universe.get().getPlayer(requesterUuid);
+ if (requester == null || !requester.isValid()) {
+ ctx.sendMessage(Message.raw("The requester is no longer online."));
+ store.removeComponent(ref, HyStuff.TPA_REQUEST_COMPONENT_TYPE);
+ return;
+ }
+
+ if (tpaRequestComp.getType() == TpaRequestComponent.RequestType.TPA_HERE) {
+ teleportRequesterToReceiver(store, ref, requester, playerRef, world, ctx);
+ } else {
+ teleportReceiverToRequester(store, ref, requester, playerRef, world, ctx);
+ }
+
+ store.removeComponent(ref, HyStuff.TPA_REQUEST_COMPONENT_TYPE);
+ }
+
+ private void teleportReceiverToRequester(Store store,
+ Ref ref,
+ PlayerRef requester,
+ PlayerRef receiver,
+ World world,
+ CommandContext ctx) {
+
+ Ref requesterRef = requester.getReference();
+ if (requesterRef == null || !requesterRef.isValid()) {
+ ctx.sendMessage(Message.raw("The requester is no longer in the world."));
+ return;
+ }
+
+ Store requesterStore = requesterRef.getStore();
+ World requesterWorld = requesterStore.getExternalData().getWorld();
+
+ requesterWorld.execute(() -> {
+ TransformComponent requesterTransform = requesterStore.getComponent(requesterRef,
+ TransformComponent.getComponentType());
+ assert requesterTransform != null;
+
+ Transform targetTransform = new Transform(
+ requesterTransform.getPosition().clone(),
+ requesterTransform.getRotation().clone()
+ );
+
+ world.execute(() -> {
+ Teleport teleportComponent = Teleport.createForPlayer(requesterWorld, targetTransform);
+ store.addComponent(ref, Teleport.getComponentType(), teleportComponent);
+ ctx.sendMessage(Message.raw("Teleport request accepted!"));
+ });
+ });
+ }
+
+ private void teleportRequesterToReceiver(Store store,
+ Ref ref,
+ PlayerRef requester,
+ PlayerRef receiver,
+ World world,
+ CommandContext ctx) {
+
+ Ref receiverRef = receiver.getReference();
+ if (receiverRef == null || !receiverRef.isValid()) {
+ ctx.sendMessage(Message.raw("The receiver is no longer in the world."));
+ return;
+ }
+
+ Store receiverStore = receiverRef.getStore();
+ World receiverWorld = receiverStore.getExternalData().getWorld();
+
+ receiverWorld.execute(() -> {
+ TransformComponent receiverTransform = receiverStore.getComponent(receiverRef,
+ TransformComponent.getComponentType());
+ assert receiverTransform != null;
+
+ Transform targetTransform = new Transform(
+ receiverTransform.getPosition().clone(),
+ receiverTransform.getRotation().clone()
+ );
+
+ world.execute(() -> {
+ Teleport teleportComponent = Teleport.createForPlayer(receiverWorld, targetTransform);
+ store.addComponent(requester.getReference(), Teleport.getComponentType(), teleportComponent);
+ ctx.sendMessage(Message.raw("Teleport request accepted!"));
+ });
+ });
+ }
+}
diff --git a/src/main/java/net/miarma/hystuff/commands/teleport/TpDenyCommand.java b/src/main/java/net/miarma/hystuff/commands/teleport/TpDenyCommand.java
new file mode 100644
index 0000000..6ce0879
--- /dev/null
+++ b/src/main/java/net/miarma/hystuff/commands/teleport/TpDenyCommand.java
@@ -0,0 +1,68 @@
+package net.miarma.hystuff.commands.teleport;
+
+import com.hypixel.hytale.component.Ref;
+import com.hypixel.hytale.component.Store;
+import com.hypixel.hytale.server.core.Message;
+import com.hypixel.hytale.server.core.command.system.CommandContext;
+import com.hypixel.hytale.server.core.command.system.arguments.system.RequiredArg;
+import com.hypixel.hytale.server.core.command.system.arguments.types.ArgTypes;
+import com.hypixel.hytale.server.core.command.system.basecommands.AbstractPlayerCommand;
+import com.hypixel.hytale.server.core.universe.PlayerRef;
+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.HyStuff;
+import net.miarma.hystuff.component.TpaRequestComponent;
+import org.checkerframework.checker.nullness.compatqual.NonNullDecl;
+
+public class TpDenyCommand extends AbstractPlayerCommand {
+
+ private final RequiredArg targetPlayerArg;
+
+ public TpDenyCommand() {
+ super("tpdeny", "Denies a teleport request");
+ targetPlayerArg = this.withRequiredArg("targetPlayer",
+ "Player you want to teleport to", ArgTypes.PLAYER_REF);
+ }
+
+ @Override
+ protected boolean canGeneratePermission() {
+ return false;
+ }
+
+ @Override
+ protected void execute(@NonNullDecl CommandContext ctx,
+ @NonNullDecl Store store,
+ @NonNullDecl Ref ref,
+ @NonNullDecl PlayerRef playerRef,
+ @NonNullDecl World world) {
+ PlayerRef targetPlayerRef = this.targetPlayerArg.get(ctx);
+ Ref targetRef = targetPlayerRef.getReference();
+ if (targetRef == null || !targetRef.isValid()) {
+ ctx.sendMessage(Message.translation("The target is no longer in the world."));
+ return;
+ }
+
+ TpaRequestComponent tpa = store.getComponent(ref, HyStuff.TPA_REQUEST_COMPONENT_TYPE);
+ if (tpa == null) {
+ ctx.sendMessage(Message.raw(
+ "You don't have pending teleport requests."
+ ));
+ return;
+ }
+
+ targetPlayerRef.sendMessage(Message.raw(String.format(
+ "%s has denied your teleport request.",
+ playerRef.getUsername()
+ )));
+
+ world.execute(() -> {
+ store.removeComponent(ref, HyStuff.TPA_REQUEST_COMPONENT_TYPE);
+ });
+
+ ctx.sendMessage(Message.raw(String.format(
+ "Teleport request from %s has been denied.",
+ targetPlayerRef.getUsername()
+ )));
+ }
+}
diff --git a/src/main/java/net/miarma/hystuff/commands/teleport/TpaCommand.java b/src/main/java/net/miarma/hystuff/commands/teleport/TpaCommand.java
new file mode 100644
index 0000000..7dc73f6
--- /dev/null
+++ b/src/main/java/net/miarma/hystuff/commands/teleport/TpaCommand.java
@@ -0,0 +1,75 @@
+package net.miarma.hystuff.commands.teleport;
+
+import com.hypixel.hytale.component.Ref;
+import com.hypixel.hytale.component.Store;
+import com.hypixel.hytale.server.core.Message;
+import com.hypixel.hytale.server.core.command.system.CommandContext;
+import com.hypixel.hytale.server.core.command.system.arguments.system.RequiredArg;
+import com.hypixel.hytale.server.core.command.system.arguments.types.ArgTypes;
+import com.hypixel.hytale.server.core.command.system.basecommands.AbstractPlayerCommand;
+import com.hypixel.hytale.server.core.universe.PlayerRef;
+import com.hypixel.hytale.server.core.universe.world.World;
+import com.hypixel.hytale.server.core.universe.world.storage.EntityStore;
+import net.miarma.hystuff.HyStuff;
+import net.miarma.hystuff.component.TpaRequestComponent;
+import org.checkerframework.checker.nullness.compatqual.NonNullDecl;
+
+import javax.annotation.Nonnull;
+
+public class TpaCommand extends AbstractPlayerCommand {
+
+ @Nonnull
+ private final RequiredArg targetPlayerArg;
+
+ public TpaCommand() {
+ super("tpa", "Asks another player to teleport you to them");
+ this.targetPlayerArg = this.withRequiredArg("targetPlayer",
+ "Player you want to teleport to", ArgTypes.PLAYER_REF);
+ }
+
+ @Override
+ protected boolean canGeneratePermission() {
+ return false;
+ }
+
+ @Override
+ protected void execute(@NonNullDecl CommandContext ctx,
+ @NonNullDecl Store store,
+ @NonNullDecl Ref ref,
+ @NonNullDecl PlayerRef requester,
+ @NonNullDecl World world) {
+ PlayerRef targetPlayerRef = this.targetPlayerArg.get(ctx);
+
+ if (targetPlayerRef.getUuid().equals(requester.getUuid())) {
+ requester.sendMessage(Message.raw("You can't teleport to yourself!"));
+ return;
+ }
+
+ Ref targetRef = targetPlayerRef.getReference();
+ if (targetRef == null || !targetRef.isValid()) {
+ requester.sendMessage(Message.raw("Player not found!"));
+ return;
+ }
+
+ TpaRequestComponent tpaRequestComp = new TpaRequestComponent();
+ tpaRequestComp.setRequester(requester.getUuid());
+ tpaRequestComp.setType(TpaRequestComponent.RequestType.TPA);
+ tpaRequestComp.setCreatedAt(System.currentTimeMillis());
+
+ world.execute(() -> {
+ store.addComponent(targetRef, HyStuff.TPA_REQUEST_COMPONENT_TYPE, tpaRequestComp);
+ });
+
+ targetPlayerRef.sendMessage(Message.raw(String.format(
+ "[%s -> %s] %s has sent you a teleport request",
+ requester.getUsername(),
+ targetPlayerRef.getUsername(),
+ requester.getUsername()
+ )));
+
+ requester.sendMessage(Message.raw(String.format(
+ "Teleport request to %s sent successfully",
+ targetPlayerRef.getUsername()
+ )));
+ }
+}
diff --git a/src/main/java/net/miarma/hystuff/commands/teleport/TpaHereCommand.java b/src/main/java/net/miarma/hystuff/commands/teleport/TpaHereCommand.java
new file mode 100644
index 0000000..73b9f31
--- /dev/null
+++ b/src/main/java/net/miarma/hystuff/commands/teleport/TpaHereCommand.java
@@ -0,0 +1,75 @@
+package net.miarma.hystuff.commands.teleport;
+
+import com.hypixel.hytale.component.Ref;
+import com.hypixel.hytale.component.Store;
+import com.hypixel.hytale.server.core.Message;
+import com.hypixel.hytale.server.core.command.system.CommandContext;
+import com.hypixel.hytale.server.core.command.system.arguments.system.RequiredArg;
+import com.hypixel.hytale.server.core.command.system.arguments.types.ArgTypes;
+import com.hypixel.hytale.server.core.command.system.basecommands.AbstractPlayerCommand;
+import com.hypixel.hytale.server.core.universe.PlayerRef;
+import com.hypixel.hytale.server.core.universe.world.World;
+import com.hypixel.hytale.server.core.universe.world.storage.EntityStore;
+import net.miarma.hystuff.HyStuff;
+import net.miarma.hystuff.component.TpaRequestComponent;
+import org.checkerframework.checker.nullness.compatqual.NonNullDecl;
+
+import javax.annotation.Nonnull;
+
+public class TpaHereCommand extends AbstractPlayerCommand {
+
+ @Nonnull
+ private final RequiredArg targetPlayerArg;
+
+ public TpaHereCommand() {
+ super("tpahere", "Asks another player to teleport them to you");
+ this.targetPlayerArg = this.withRequiredArg("targetPlayer",
+ "Player you want to teleport to you", ArgTypes.PLAYER_REF);
+ }
+
+ @Override
+ protected boolean canGeneratePermission() {
+ return false;
+ }
+
+ @Override
+ protected void execute(@NonNullDecl CommandContext ctx,
+ @NonNullDecl Store store,
+ @NonNullDecl Ref ref,
+ @NonNullDecl PlayerRef requester,
+ @NonNullDecl World world) {
+ PlayerRef targetPlayerRef = this.targetPlayerArg.get(ctx);
+
+ if (targetPlayerRef.getUuid().equals(requester.getUuid())) {
+ requester.sendMessage(Message.raw("You can't teleport to yourself!"));
+ return;
+ }
+
+ Ref targetRef = targetPlayerRef.getReference();
+ if (targetRef == null || !targetRef.isValid()) {
+ requester.sendMessage(Message.raw("Player not found!"));
+ return;
+ }
+
+ TpaRequestComponent tpaRequestComp = new TpaRequestComponent();
+ tpaRequestComp.setRequester(requester.getUuid());
+ tpaRequestComp.setType(TpaRequestComponent.RequestType.TPA_HERE);
+ tpaRequestComp.setCreatedAt(System.currentTimeMillis());
+
+ world.execute(() -> {
+ store.addComponent(targetRef, HyStuff.TPA_REQUEST_COMPONENT_TYPE, tpaRequestComp);
+ });
+
+ targetPlayerRef.sendMessage(Message.raw(String.format(
+ "[%s -> %s] %s has sent you a teleport request",
+ targetPlayerRef.getUsername(),
+ requester.getUsername(),
+ requester.getUsername()
+ )));
+
+ requester.sendMessage(Message.raw(String.format(
+ "Teleport request to %s sent successfully",
+ targetPlayerRef.getUsername()
+ )));
+ }
+}
diff --git a/src/main/java/net/miarma/hystuff/component/PlaytimeComponent.java b/src/main/java/net/miarma/hystuff/component/PlaytimeComponent.java
new file mode 100644
index 0000000..cc22db1
--- /dev/null
+++ b/src/main/java/net/miarma/hystuff/component/PlaytimeComponent.java
@@ -0,0 +1,50 @@
+package net.miarma.hystuff.component;
+
+import com.hypixel.hytale.codec.Codec;
+import com.hypixel.hytale.codec.KeyedCodec;
+import com.hypixel.hytale.codec.builder.BuilderCodec;
+import com.hypixel.hytale.component.Component;
+import com.hypixel.hytale.server.core.universe.world.storage.EntityStore;
+import org.checkerframework.checker.nullness.compatqual.NullableDecl;
+
+public class PlaytimeComponent implements Component {
+ public static final BuilderCodec CODEC;
+
+ private long playtime;
+
+ public PlaytimeComponent() {
+ this.playtime = 0L;
+ }
+
+ public PlaytimeComponent(long playtime) {
+ this.playtime = playtime;
+ }
+
+ public void tick(float dt) {
+ playtime += dt;
+ }
+
+ public long getPlaytime() {
+ return playtime;
+ }
+
+ public void setPlaytime(long playtime) {
+ this.playtime = playtime;
+ }
+
+ @NullableDecl
+ @Override
+ public Component clone() {
+ return new PlaytimeComponent(this.getPlaytime());
+ }
+
+ static {
+ CODEC = BuilderCodec.builder(PlaytimeComponent.class, PlaytimeComponent::new)
+ .append(
+ new KeyedCodec<>("Playtime", Codec.LONG),
+ PlaytimeComponent::setPlaytime,
+ PlaytimeComponent::getPlaytime
+ ).add()
+ .build();
+ }
+}
diff --git a/src/main/java/net/miarma/hystuff/component/TpaRequestComponent.java b/src/main/java/net/miarma/hystuff/component/TpaRequestComponent.java
new file mode 100644
index 0000000..f07d47a
--- /dev/null
+++ b/src/main/java/net/miarma/hystuff/component/TpaRequestComponent.java
@@ -0,0 +1,99 @@
+package net.miarma.hystuff.component;
+
+import com.hypixel.hytale.codec.Codec;
+import com.hypixel.hytale.codec.KeyedCodec;
+import com.hypixel.hytale.codec.builder.BuilderCodec;
+import com.hypixel.hytale.component.Component;
+import com.hypixel.hytale.math.vector.Transform;
+import com.hypixel.hytale.math.vector.Vector3d;
+import com.hypixel.hytale.server.core.universe.world.storage.EntityStore;
+import org.checkerframework.checker.nullness.compatqual.NullableDecl;
+
+import java.util.UUID;
+
+public class TpaRequestComponent implements Component {
+ public static final BuilderCodec CODEC;
+
+ private UUID requester;
+ private RequestType type;
+ private long createdAt;
+ private Vector3d initialPosition;
+
+ public TpaRequestComponent() {
+ this.type = RequestType.TPA;
+ this.createdAt = System.currentTimeMillis();
+ }
+
+ public UUID getRequester() {
+ return requester;
+ }
+
+ public void setRequester(UUID requester) {
+ this.requester = requester;
+ }
+
+ public RequestType getType() {
+ return type;
+ }
+
+ public void setType(RequestType type) {
+ this.type = type;
+ }
+
+ public long getCreatedAt() {
+ return createdAt;
+ }
+
+ public void setCreatedAt(long createdAt) {
+ this.createdAt = createdAt;
+ }
+
+ public Vector3d getInitialPosition() {
+ return initialPosition;
+ }
+
+ public void setInitialPosition(Vector3d initialPosition) {
+ this.initialPosition = initialPosition;
+ }
+
+ @NullableDecl
+ @Override
+ public Component clone() {
+ TpaRequestComponent copy = new TpaRequestComponent();
+ copy.requester = this.requester;
+ copy.type = this.type;
+ copy.createdAt = this.createdAt;
+ copy.initialPosition = this.initialPosition != null ? this.initialPosition.clone() : null;
+ return copy;
+ }
+
+ public enum RequestType {
+ TPA, TPA_HERE
+ }
+
+ static {
+ CODEC = BuilderCodec.builder(TpaRequestComponent.class, TpaRequestComponent::new)
+ .append(
+ new KeyedCodec<>("Requester", Codec.UUID_BINARY),
+ TpaRequestComponent::setRequester,
+ TpaRequestComponent::getRequester
+ ).add()
+ .append(
+ new KeyedCodec<>("Type", Codec.STRING),
+ (comp, value) -> comp.setType(RequestType.valueOf(value)),
+ comp -> comp.getType().name()
+ ).add()
+ .append(
+ new KeyedCodec<>("CreatedAt", Codec.LONG),
+ TpaRequestComponent::setCreatedAt,
+ TpaRequestComponent::getCreatedAt
+ ).add()
+ .append(
+ new KeyedCodec<>("InitialPosition", Vector3d.CODEC),
+ TpaRequestComponent::setInitialPosition,
+ TpaRequestComponent::getInitialPosition
+ ).add()
+ .build();
+ }
+
+}
diff --git a/src/main/java/net/miarma/hystuff/events/PlayerDeathListener.java b/src/main/java/net/miarma/hystuff/system/PlayerDeathSystem.java
similarity index 82%
rename from src/main/java/net/miarma/hystuff/events/PlayerDeathListener.java
rename to src/main/java/net/miarma/hystuff/system/PlayerDeathSystem.java
index 24d5cb9..666f029 100644
--- a/src/main/java/net/miarma/hystuff/events/PlayerDeathListener.java
+++ b/src/main/java/net/miarma/hystuff/system/PlayerDeathSystem.java
@@ -1,4 +1,4 @@
-package net.miarma.hystuff.events;
+package net.miarma.hystuff.system;
import com.hypixel.hytale.component.CommandBuffer;
import com.hypixel.hytale.component.ComponentType;
@@ -6,14 +6,9 @@ import com.hypixel.hytale.component.Ref;
import com.hypixel.hytale.component.Store;
import com.hypixel.hytale.component.query.Query;
import com.hypixel.hytale.component.system.RefChangeSystem;
-import com.hypixel.hytale.logger.HytaleLogger;
-import com.hypixel.hytale.math.vector.Vector3d;
-import com.hypixel.hytale.math.vector.Vector3f;
-import com.hypixel.hytale.server.core.modules.entity.component.HeadRotation;
import com.hypixel.hytale.server.core.modules.entity.component.TransformComponent;
import com.hypixel.hytale.server.core.modules.entity.damage.DeathComponent;
import com.hypixel.hytale.server.core.universe.PlayerRef;
-import com.hypixel.hytale.server.core.universe.Universe;
import com.hypixel.hytale.server.core.universe.world.storage.EntityStore;
import net.miarma.hystuff.HyStuff;
import net.miarma.hystuff.component.LastPositionComponent;
@@ -22,8 +17,8 @@ import org.checkerframework.checker.nullness.compatqual.NullableDecl;
import java.util.UUID;
-public class PlayerDeathListener extends RefChangeSystem {
- public PlayerDeathListener() { }
+public class PlayerDeathSystem extends RefChangeSystem {
+ public PlayerDeathSystem() { }
@NonNullDecl
@Override
@@ -62,5 +57,7 @@ public class PlayerDeathListener extends RefChangeSystem getQuery() { return Query.any(); }
+ public Query getQuery() {
+ return PlayerRef.getComponentType();
+ }
}
diff --git a/src/main/java/net/miarma/hystuff/system/PlayerTickSystem.java b/src/main/java/net/miarma/hystuff/system/PlayerTickSystem.java
new file mode 100644
index 0000000..8275748
--- /dev/null
+++ b/src/main/java/net/miarma/hystuff/system/PlayerTickSystem.java
@@ -0,0 +1,41 @@
+package net.miarma.hystuff.system;
+
+import com.hypixel.hytale.component.*;
+import com.hypixel.hytale.component.query.Query;
+import com.hypixel.hytale.component.system.tick.EntityTickingSystem;
+import com.hypixel.hytale.server.core.entity.EntityUtils;
+import com.hypixel.hytale.server.core.entity.entities.Player;
+import com.hypixel.hytale.server.core.universe.PlayerRef;
+import com.hypixel.hytale.server.core.universe.world.storage.EntityStore;
+import net.miarma.hystuff.HyStuff;
+import net.miarma.hystuff.component.PlaytimeComponent;
+import org.checkerframework.checker.nullness.compatqual.NonNullDecl;
+import org.checkerframework.checker.nullness.compatqual.NullableDecl;
+
+public class PlayerTickSystem extends EntityTickingSystem {
+
+ @NullableDecl
+ @Override
+ public Query getQuery() {
+ return PlayerRef.getComponentType();
+ }
+
+ @Override public void tick(float dt, int i,
+ @NonNullDecl ArchetypeChunk chunk,
+ @NonNullDecl Store store,
+ @NonNullDecl CommandBuffer buffer) {
+
+ Ref entityRef = chunk.getReferenceTo(i);
+ PlayerRef playerRef = store.getComponent(entityRef, PlayerRef.getComponentType());
+
+ if (playerRef == null) return;
+
+ PlaytimeComponent playTimeComp = store.getComponent(entityRef, HyStuff.PLAYTIME_COMPONENT_TYPE);
+ if (playTimeComp == null) {
+ playTimeComp = new PlaytimeComponent(0L);
+ store.addComponent(entityRef, HyStuff.PLAYTIME_COMPONENT_TYPE, playTimeComp);
+ }
+
+ playTimeComp.tick(dt);
+ }
+}
diff --git a/src/main/java/net/miarma/hystuff/system/TpaCleanupSystem.java b/src/main/java/net/miarma/hystuff/system/TpaCleanupSystem.java
new file mode 100644
index 0000000..8ab08a5
--- /dev/null
+++ b/src/main/java/net/miarma/hystuff/system/TpaCleanupSystem.java
@@ -0,0 +1,38 @@
+package net.miarma.hystuff.system;
+
+import com.hypixel.hytale.component.ArchetypeChunk;
+import com.hypixel.hytale.component.CommandBuffer;
+import com.hypixel.hytale.component.Ref;
+import com.hypixel.hytale.component.Store;
+import com.hypixel.hytale.component.query.Query;
+import com.hypixel.hytale.component.system.tick.EntityTickingSystem;
+import com.hypixel.hytale.server.core.event.events.player.PlayerChatEvent;
+import com.hypixel.hytale.server.core.universe.world.storage.EntityStore;
+import net.miarma.hystuff.HyStuff;
+import net.miarma.hystuff.component.TpaRequestComponent;
+import org.checkerframework.checker.nullness.compatqual.NonNullDecl;
+import org.checkerframework.checker.nullness.compatqual.NullableDecl;
+
+public class TpaCleanupSystem extends EntityTickingSystem {
+ private static final long TPA_TIMEOUT_MS = 30_000;
+
+ @NullableDecl
+ @Override
+ public Query getQuery() {
+ return HyStuff.TPA_REQUEST_COMPONENT_TYPE;
+ }
+
+ @Override
+ public void tick(float dt, int i,
+ @NonNullDecl ArchetypeChunk chunk,
+ @NonNullDecl Store store,
+ @NonNullDecl CommandBuffer commandBuffer) {
+ long now = System.currentTimeMillis();
+ TpaRequestComponent tpa = chunk.getComponent(i, HyStuff.TPA_REQUEST_COMPONENT_TYPE);
+
+ if (tpa != null && now - tpa.getCreatedAt() >= TPA_TIMEOUT_MS) {
+ Ref entityRef = chunk.getReferenceTo(i);
+ commandBuffer.removeComponent(entityRef, HyStuff.TPA_REQUEST_COMPONENT_TYPE);
+ }
+ }
+}
diff --git a/src/main/resources/manifest.json b/src/main/resources/manifest.json
index e245de4..713a215 100644
--- a/src/main/resources/manifest.json
+++ b/src/main/resources/manifest.json
@@ -1,7 +1,7 @@
{
"Group": "Miarma",
"Name": "HyStuff",
- "Version": "1.1.0",
+ "Version": "1.2.0",
"Description": "Various stuff for Hytale",
"Authors": [
{