Skip to content

Commit

Permalink
Update docs & Add switch server action
Browse files Browse the repository at this point in the history
  • Loading branch information
gabber235 committed Mar 31, 2024
1 parent f6afa33 commit adb555d
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import me.gabber235.typewriter.entry.entries.ActionEntry
import me.gabber235.typewriter.plugin
import org.bukkit.entity.Player

@Entry("switch_server_action", "Switches the player to another server", Colors.RED, "teenyicons:google-streetview-solid")
@Entry("switch_server_action", "Switches the player to another server", Colors.RED, "fluent:server-link-16-filled")
/**
* The `Switch Server Action` is an action that switches the player to another server.
*
Expand Down Expand Up @@ -41,4 +41,4 @@ class SwitchServerActionEntry(

plugin.server.messenger.unregisterOutgoingPluginChannel(plugin, "BungeeCord")
}
}
}
2 changes: 2 additions & 0 deletions documentation/docs/adapters/BasicAdapter/BasicAdapter.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ first.
| [Simple Action](./entries/action/simple_action.mdx) | Simple action to modify facts |
| [Spawn Particle Action](./entries/action/spawn_particles.mdx) | Spawn particles at location |
| [Stop Sound Action](./entries/action/stop_sound.mdx) | Stop a or all sounds for a player |
| [Switch Server Action](./entries/action/switch_server_action.mdx) | Switches the player to another server |
| [Teleport Action](./entries/action/teleport.mdx) | Teleport a player |

### Audiences
Expand All @@ -45,6 +46,7 @@ first.
| [Location Objectives Path Stream](./entries/audience/location_objectives_path_stream.mdx) | A Path Stream to tracked Location Objectives |
| [Simple Lines](./entries/audience/simple_lines.mdx) | Statically determined lines of text |
| [Simple Sidebar](./entries/audience/sidebar.mdx) | Display a sidebar for players |
| [Tab List Header Footer](./entries/audience/tab_list_header_footer.mdx) | Set the header and footer of the tab list |

### Cinematics

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ This action can be useful in a variety of situations. You can use it to provide
<fields.EntryField name='Potion Effect' required>
The potion effect to add.
</fields.EntryField>
<fields.EntryField name='Duration' required>
The duration of the potion effect in ticks.
<fields.EntryField name='Duration' required duration>
The duration of the potion effect.
</fields.EntryField>
<fields.EntryField name='Amplifier' required>
The amplifier of the potion effect.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import * as fields from '@site/src/components/EntryField';
import Admonition from '@theme/Admonition';
import Link from '@docusaurus/Link';

# Switch Server Action

The `Switch Server Action` is an action that switches the player to another server.

## How could this be used?

This could be used to switch a player from one server to another when interacting with an entity, maybe clicking a button.


## Fields

<fields.CriteriaField />
<fields.ModifiersField />
<fields.EntryField name='Triggers' required multiple>
</fields.EntryField>
<fields.EntryField name='Server' required>
The server the player has switched to
</fields.EntryField>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import * as fields from '@site/src/components/EntryField';
import Admonition from '@theme/Admonition';
import Link from '@docusaurus/Link';

# Tab List Header Footer

The `TabListHeaderFooterEntry` is an entry that sets the header and footer of the tab list.
It takes in lines for the header and footer.
And shows them to the players in the tab list.


## Fields

<fields.EntryField name='Header' required multiple>
The lines to display in the header of the tab list
</fields.EntryField>
<fields.EntryField name='Footer' required multiple>
The lines to display in the footer of the tab list
</fields.EntryField>
<fields.EntryField name='Priority Override' optional>
</fields.EntryField>
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ This action can be useful in a variety of situations, such as presenting the pla
<fields.EntryField name='Options' required multiple>
The options for the player to choose from.
</fields.EntryField>
<fields.EntryField name='Duration' required duration>
The duration it takes to type out the message. If the duration is zero, the message will be displayed instantly.
</fields.EntryField>

0 comments on commit adb555d

Please sign in to comment.