mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2026-02-07 02:26:43 +01:00
Run IntelliJ IDEA code formatter
This commit is contained in:
@@ -20,6 +20,7 @@ public final class PlayerHook {
|
||||
|
||||
/**
|
||||
* Hooks into the player.
|
||||
*
|
||||
* @param player The player to hook into.
|
||||
*/
|
||||
public PlayerHook(Player player) {
|
||||
@@ -36,6 +37,7 @@ public final class PlayerHook {
|
||||
|
||||
/**
|
||||
* Sends a player to another scene.
|
||||
*
|
||||
* @param sceneId The scene to send the player to.
|
||||
*/
|
||||
public void changeScenes(int sceneId) {
|
||||
@@ -44,6 +46,7 @@ public final class PlayerHook {
|
||||
|
||||
/**
|
||||
* Broadcasts an avatar property notify to all world players.
|
||||
*
|
||||
* @param property The property that was updated.
|
||||
*/
|
||||
public void updateFightProperty(FightProperty property) {
|
||||
@@ -52,6 +55,7 @@ public final class PlayerHook {
|
||||
|
||||
/**
|
||||
* Broadcasts the packet sent to all world players.
|
||||
*
|
||||
* @param packet The packet to send.
|
||||
*/
|
||||
public void broadcastPacketToWorld(BasePacket packet) {
|
||||
@@ -60,6 +64,7 @@ public final class PlayerHook {
|
||||
|
||||
/**
|
||||
* Set the currently equipped avatar's health.
|
||||
*
|
||||
* @param health The health to set the avatar to.
|
||||
*/
|
||||
public void setHealth(float health) {
|
||||
@@ -69,6 +74,7 @@ public final class PlayerHook {
|
||||
|
||||
/**
|
||||
* Revives the specified avatar.
|
||||
*
|
||||
* @param avatar The avatar to revive.
|
||||
*/
|
||||
public void reviveAvatar(Avatar avatar) {
|
||||
@@ -78,18 +84,20 @@ public final class PlayerHook {
|
||||
/**
|
||||
* Teleports a player to a position.
|
||||
* This will **not** transfer the player to another scene.
|
||||
*
|
||||
* @param position The position to teleport the player to.
|
||||
*/
|
||||
public void teleport(Position position) {
|
||||
this.player.getPosition().set(position);
|
||||
this.player.sendPacket(new PacketPlayerEnterSceneNotify(this.player,
|
||||
EnterType.ENTER_TYPE_JUMP, EnterReason.TransPoint,
|
||||
this.player.getSceneId(), position
|
||||
EnterType.ENTER_TYPE_JUMP, EnterReason.TransPoint,
|
||||
this.player.getSceneId(), position
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the currently selected avatar's max health.
|
||||
*
|
||||
* @return The max health as a float.
|
||||
*/
|
||||
public float getMaxHealth() {
|
||||
@@ -98,6 +106,7 @@ public final class PlayerHook {
|
||||
|
||||
/**
|
||||
* Gets the currently selected avatar in entity form.
|
||||
*
|
||||
* @return The avatar as an {@link EntityAvatar}.
|
||||
*/
|
||||
public EntityAvatar getCurrentAvatarEntity() {
|
||||
@@ -106,6 +115,7 @@ public final class PlayerHook {
|
||||
|
||||
/**
|
||||
* Gets the currently selected avatar.
|
||||
*
|
||||
* @return The avatar as an {@link Avatar}.
|
||||
*/
|
||||
public Avatar getCurrentAvatar() {
|
||||
|
||||
Reference in New Issue
Block a user