Skip to content

Commit

Permalink
move builders inside API tab, add nametag, nickhider & notification e…
Browse files Browse the repository at this point in the history
…xamples
  • Loading branch information
ItsNature committed Sep 13, 2024
1 parent eea210e commit 2dc65ae
Show file tree
Hide file tree
Showing 10 changed files with 498 additions and 231 deletions.
172 changes: 86 additions & 86 deletions docs/developers/modules/border.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,92 @@ public void resetBordersExample(Player viewer) {
}
```

### `Border` Options

`.id(String)` should include a unique identifier for the border. It's important when you have multiple borders in a single world.

```java
.id("pvp-tagged-spawn")
```

`.world(String)` is the world, by name, that you wish to add the border to.

```java
.world("world")
```

`.cancelEntry(boolean)` is a boolean option to prevent players from entering the border, if they're outside the border bounds.

```java
.cancelEntry(true)
```

`.cancelExit(boolean)` is a boolean option to prevent players from exiting the border, if they're currently inside the border bounds.

```java
.cancelExit(true)
```

`.canShrinkOrExpand(boolean)` is a boolean option to control if the border has the ability to expand or shrink.

```java
.canShrinkOrExpand(false)
```

`.color(java.awt.Color)` is how you dictate the color of the border. See the [colors page](/apollo/developers/utilities/colors) for more.

**Color Types**

<Tabs items={['Java Presets', 'Minecraft Presets', 'Hex & RGB']}>
<Tab>

The `java.awt.Color` class statically exposes some colors, although they do not correspond to any existing colors used in Minecraft.

```java
.color(Color.CYAN)
```

</Tab>

<Tab>

The `ApolloColors` class statically exposes colors that correspond to Bukkit/Spigot's `ChatColor` enum.

```java
.color(ApolloColors.LIGHT_PURPLE)
```

</Tab>

<Tab>

Custom colors can be created from any RGB values using `new Color(int red, int green, int blue)`, or from any hex color using `Color.decode(String hex)`.

```java
.color(Color.decode("#FF00FF"))
```

</Tab>
</Tabs>

`.bounds(Cuboid2D)` is used to determine the bounds of the border, using a 2D cuboid. See the [cuboids page](/apollo/developers/utilities/cuboids) for more.

```java
.bounds(Cuboid2D.builder()
.minX(-50)
.minZ(-50)
.maxX(50)
.maxZ(50)
.build()
)
```

`.durationTicks(Integer)` is used to determine the speed of expansion or shrinkage.

```java
.durationTicks(0)
```

</Tab>

<Tab>
Expand Down Expand Up @@ -167,89 +253,3 @@ public void resetBordersExample(Player viewer) {
</Tab>

</Tabs>

### `Border` Options

`.id(String)` should include a unique identifier for the border. It's important when you have multiple borders in a single world.

```java
.id("pvp-tagged-spawn")
```

`.world(String)` is the world, by name, that you wish to add the border to.

```java
.world("world")
```

`.cancelEntry(boolean)` is a boolean option to prevent players from entering the border, if they're outside the border bounds.

```java
.cancelEntry(true)
```

`.cancelExit(boolean)` is a boolean option to prevent players from exiting the border, if they're currently inside the border bounds.

```java
.cancelExit(true)
```

`.canShrinkOrExpand(boolean)` is a boolean option to control if the border has the ability to expand or shrink.

```java
.canShrinkOrExpand(false)
```

`.color(java.awt.Color)` is how you dictate the color of the border. See the [colors page](/apollo/developers/utilities/colors) for more.

**Color Types**

<Tabs items={['Java Presets', 'Minecraft Presets', 'Hex & RGB']}>
<Tab>

The `java.awt.Color` class statically exposes some colors, although they do not correspond to any existing colors used in Minecraft.

```java
.color(Color.CYAN)
```

</Tab>

<Tab>

The `ApolloColors` class statically exposes colors that correspond to Bukkit/Spigot's `ChatColor` enum.

```java
.color(ApolloColors.LIGHT_PURPLE)
```

</Tab>

<Tab>

Custom colors can be created from any RGB values using `new Color(int red, int green, int blue)`, or from any hex color using `Color.decode(String hex)`.

```java
.color(Color.decode("#FF00FF"))
```

</Tab>
</Tabs>

`.bounds(Cuboid2D)` is used to determine the bounds of the border, using a 2D cuboid. See the [cuboids page](/apollo/developers/utilities/cuboids) for more.

```java
.bounds(Cuboid2D.builder()
.minX(-50)
.minZ(-50)
.maxX(50)
.maxZ(50)
.build()
)
```

`.durationTicks(Integer)` is used to determine the speed of expansion or shrinkage.

```java
.durationTicks(0)
```
18 changes: 9 additions & 9 deletions docs/developers/modules/coloredfire.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,15 @@ public void resetColoredFiresExample(Player viewer) {
}
```

### `overrideColoredFire` Parameters

1. `Recipients recipients`
- A list of all the player(s) you want to be able to see the updated fire color.
2. `UUID target`
- The player or living entity you want to display the updated fire color on.
3. `Color flameColor`
- How you'll dictate the color of the fire, see the [colors page](/apollo/developers/utilities/colors) for more.

</Tab>

<Tab>
Expand Down Expand Up @@ -130,12 +139,3 @@ public void resetColoredFiresExample(Player viewer) {
</Tab>

</Tabs>

### `overrideColoredFire` Parameters

1. `Recipients recipients`
- A list of all the player(s) you want to be able to see the updated fire color.
2. `UUID target`
- The player or living entity you want to display the updated fire color on.
3. `Color flameColor`
- How you'll dictate the color of the fire, see the [colors page](/apollo/developers/utilities/colors) for more.
44 changes: 22 additions & 22 deletions docs/developers/modules/cooldown.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,28 @@ public void resetCooldownsExample(Player viewer) {
}
```

### `Cooldown` Options

`.name(String)` should include a unique identifier for the each cooldown.
```java
.name("enderpearl-cooldown")
```

`.duration(java.time.Duration)` the duration the cooldown should last for. See the [java.time.Duration Javadocs](https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html) for more.
```java
.duration(Duration.ofSeconds(15))
```

`.icon(itemStackIcon)` is how you display a custom item icon. Read the [icons utilities page](/apollo/developers/utilities/icons) to learn more about icons.
```java
.icon(ItemStackIcon.builder().itemId("ENDER_PEARL").build())
```

`.icon(SimpleResourceLocationIcon)` is how you display a custom texture icon. Read the [icons utilities page](/apollo/developers/utilities/icons) to learn more about icons.
```java
.icon(SimpleResourceLocationIcon.builder().resourceLocation("lunar:logo/logo-200x182.svg").size(12).build())
```

</Tab>

<Tab>
Expand Down Expand Up @@ -213,25 +235,3 @@ public void resetCooldownsExample(Player viewer) {
</Tab>

</Tabs>

### `Cooldown` Options

`.name(String)` should include a unique identifier for the each cooldown.
```java
.name("enderpearl-cooldown")
```

`.duration(java.time.Duration)` the duration the cooldown should last for. See the [java.time.Duration Javadocs](https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html) for more.
```java
.duration(Duration.ofSeconds(15))
```

`.icon(itemStackIcon)` is how you display a custom item icon. Read the [icons utilities page](/apollo/developers/utilities/icons) to learn more about icons.
```java
.icon(ItemStackIcon.builder().itemId("ENDER_PEARL").build())
```

`.icon(SimpleResourceLocationIcon)` is how you display a custom texture icon. Read the [icons utilities page](/apollo/developers/utilities/icons) to learn more about icons.
```java
.icon(SimpleResourceLocationIcon.builder().resourceLocation("lunar:logo/logo-200x182.svg").size(12).build())
```
14 changes: 7 additions & 7 deletions docs/developers/modules/entity.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,13 @@ public void resetFlippedEntityExample(Player viewer) {
}
```

#### `Entity` Parameters

1. `Recipients recipients`
- A list of all the player(s) you want to be able to see the updated fire color.
2. `List<ApolloEntity> entities`
- A list of all entities you want to reset the flip state from.

</Tab>

<Tab>
Expand Down Expand Up @@ -236,10 +243,3 @@ public void resetFlippedEntityExample(Player viewer) {
</Tab>

</Tabs>

#### `Entity` Parameters

1. `Recipients recipients`
- A list of all the player(s) you want to be able to see the updated fire color.
2. `List<ApolloEntity> entities`
- A list of all entities you want to reset the flip state from.
18 changes: 9 additions & 9 deletions docs/developers/modules/glow.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,15 @@ public void resetGlowEffectsExample(Player viewer) {
}
```

### `overrideGlowEffectExample` Parameters

1. `Recipients recipients`
- A list of all the player(s) you want to be able to see the updated glow effect.
2. `UUID target`
- The player or living entity you want to display the glow effect on.
3. `Color glowColor`
- How you'll dictate the color of the glow effect, see the [colors page](/apollo/developers/utilities/colors) for more.

</Tab>

<Tab>
Expand Down Expand Up @@ -134,12 +143,3 @@ public void resetGlowEffectsExample(Player viewer) {
</Tab>

</Tabs>

### `overrideGlowEffectExample` Parameters

1. `Recipients recipients`
- A list of all the player(s) you want to be able to see the updated glow effect.
2. `UUID target`
- The player or living entity you want to display the glow effect on.
3. `Color glowColor`
- How you'll dictate the color of the glow effect, see the [colors page](/apollo/developers/utilities/colors) for more.
Loading

1 comment on commit 2dc65ae

@LunarClientBot
Copy link
Collaborator

@LunarClientBot LunarClientBot commented on 2dc65ae Sep 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📄 Documentation Deployment

Status:✅ Completed
Environment:preview
URL:https://1bb79019.lunarclient-dev.pages.dev

Please sign in to comment.