# RyanMood Docs

Here you will find the documentation for:

* Gamemode Change
* PrivateChats


# Installation

1. Download Gamemode Change from SpigotMC, Mc-Market, Polymart or Songoda.
2. Put it into your `/plugins/` folder.
3. Restart your server!
4. Configure the config files to your need. These are located at `/plugins/Gamemode-Change/`

{% hint style="danger" %}
Do not reload. Always restart.
{% endhint %}

{% hint style="success" %}
Congrats, you've now added Gamemode Change to your server.

If you need any support please join my support discord @ <https://discord.gg/6QNEGPK3Fb>
{% endhint %}


# Configuration Files

{% tabs %}
{% tab title="config.yml" %}
{% code title="config.yml" %}

```yaml
# Configuration file for Gamemode Change.
# For support, please join my discord @ https://discord.gg/6QNEGPK3Fb

# Should your gamemode get updated on join to the server?
joinChange:
  enabled: false
  # 0 = Survival | 1 = Creative | 2 = Adventure | 3 = Spectator
  gamemode: 0

antiCreative:
  # Do you want to make it so people can't access gamemode creative unless they have the bypass permission?
  enabled: false
  # Do you want to block OP'ed players from changing to gamemode creative?
  blockOp: false

notify:
  # Do you want the notification feature of a gamemode change to enabled or disabled?
  enabled: false
  # Should you get sent notifications for the different gamemodes?
  gamemodes:
    creative: true
    survival: true
    adventure: true
    spectator: true

deathChange:
  # Toggle if your gamemode gets changed when you/a player dies.
  enabled: false
  # The gamemode you want players to change into if a player dies.
  # deathToggle must be set to true.
  # 0 = Survival | 1 = Creative | 2 = Adventure | 3 = Spectator
  gamemode: 2

# Do you want you can also do this to other players to be enabled or disabled?
hasOtherPermsMSG: false

```

{% endcode %}
{% endtab %}

{% tab title="messages.yml" %}
{% code title="messages.yml" %}

```yaml
# Gamemode Change Messages File
# All messages can use colour codes.
# All messages support PlaceholderAPI.

# This is the message that comes up when you haven't got permission to do what you are trying to do.
# Use %perm% to get the permission for the action they are attempting to do.
noPerm: "&c[!] You do not have permissions to do that. You need &b%perm%&c."

# This message comes up when you have changed your gamemode.
# Use %gamemode% for the new gamemode.
changedGM: "&a[!] Your gamemode has been changed to &b%gamemode%&a!"

# This is the message that comes up when you have changed someone else's gamemode.
# Use %gamemode% for the new gamemode.
# Use %target% to show the targets name.
changedOther: "&a[!] You have changed &b%target%&a's gamemode to &b%gamemode%&a."

# You can change what the %gamemode% results could be.
creative: "CREATIVE"
survival: "SURVIVAL"
adventure: "ADVENTURE"
spectator: "SPECTATOR"

# This is the error message that will be displayed when a player isn't found.
invalidPlayer: "&c[!] The player provided is not found."

# This is the error message that will be displayed when a command is used incorrectly.
# Use %usage% to display the command and arguments.
invalidUsage: "&c[!] Valid usage: &b%usage%"

# This is the error message that will be displayed when an invalid gamemode is provided.
invalidGM: "&c[!] Invalid gamemode. Gamemodes: Creative, Survival, Adventure or Spectator."

# This is the message that is displayed if hasOtherPermsMSG is enabled.
othersMSG: "&7[!] You can change other players gamemodes."

# This is the error message that will be displayed when someoene tries to go into creative mode
# without the bypass anti-creative permission. (MUST BE ENABLED IN config.yml)
# Use %perm% for the anti-creative bypass permission.
antiCreativeError: "&c[!] You do not have permission to go into creative mode. You need the bypass permission (&b%perm%&c)."

# This is the message that will be sent when you have gamemode change's notification feature enabled.
# Use %player% to display the player name.
# Use %gamemode% to display the new gamemode.
notify:
  main: "&c[!] &b%player% &chas just changed there gamemode to &b%gamemode%&c."
  antiCreative: "&c[!] &b%player% &chas been blocked from going into creative. They have been kept as %gamemode%."


```

{% endcode %}
{% endtab %}

{% tab title="perms.yml" %}
{% code title="perms.yml" %}

```yaml
# Permissions configuration file for Gamemode Change.
# For support, please join my discord @ https://discord.gg/6QNEGPK3Fb
# To give player's permissions, you need a permission handler.

# Permission to be able to do the commands.
gamemode: 'gmchange.gamemode'

# Creative gamemode permission
creative: 'gmchange.creative'

# Survival gamemode permission
survival: 'gmchange.survival'

# Adventure gamemode permission
adventure: 'gmchange.adventure'

# Spectator gamemode permission
spectator: 'gmchange.spectator'

# Change other player's gamemode permission
others: 'gmchange.others'

# Permission to bypass features.
bypass:
  antiCreative: "gmchange.bypass.anticreative"
  death: "gmchange.bypass.death"
  notify: "gmchange.bypass.notify"
  joinChange: "gmchange.bypass.join"

# Permission to receive gamemode change notifications.
notify:
  main: "gmchange.notify"
  antiCreative: "gmchange.notify.antiCreative"

```

{% endcode %}
{% endtab %}
{% endtabs %}


# Commands & Permissions

{% hint style="info" %}
<> = Required | () = Optional\
\<gamemode> = Creative (1, c), Survival (0, s), Adventure (2, a) or Spectator (3, sp)
{% endhint %}

<table><thead><tr><th width="200">Command</th><th width="205">Usage</th><th width="127">Aliases</th><th>Default Permission</th></tr></thead><tbody><tr><td>/gamemode</td><td>&#x3C;gamemode> (Player)</td><td>/gm</td><td>gmchange.gamemode</td></tr><tr><td>/creative</td><td>(Player)</td><td>/c, /gmc</td><td>gmchange.creative</td></tr><tr><td>/survival</td><td>(Player)</td><td>/s, /gms</td><td>gmchange.survival</td></tr><tr><td>/adventure</td><td>(Player)</td><td>/a, /gma</td><td>gmchange.adventure</td></tr><tr><td>/spectator</td><td>(Player)</td><td>/sp, /gmsp</td><td>gmchange.spectator</td></tr><tr><td>/gamemodechange</td><td>(reload)</td><td>/gmchange</td><td>gmchange.reload</td></tr></tbody></table>

| Default Permission           | What happens                                                                                                             |
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| gmchange.others              | Allows players to change other player's gamemodes.                                                                       |
| gmchange.bypass.anticreative | Allows players to go into creative mode if anti-creative is enabled.                                                     |
| gmchange.bypass.death        | Allows players to bypass the death gamemode change, if death gamemode change is enabled.                                 |
| gmchange.bypass.notify       | Doesn't show the gamemode change notifications for the player, if notify is enabled.                                     |
| gmchange.bypass.join         | Stops the player from changing gamemode when they connect, if join gamemode change is enabled.                           |
| gmchange.notify              | Shows the notification in chat when a player changes gamemode, if notify is enabled.                                     |
| gmchange.notify.antiCreative | Shows a notification in chat if the player is blocked from entering creative mode, if notify & anti-creative is enabled. |


# Installation

* Download PrivateChats from BuiltByBit.
* Put it into your `/plugins/` folder.
* Restart your server!
* Configure the config files to your need. These are located at `/plugins/PrivateChats/`

{% hint style="danger" %}
Do not reload, always restart!
{% endhint %}

{% hint style="success" %}
Congrats, you've now added PrivateChats to your server.

If you need any support please join my support discord @ <https://discord.gg/6QNEGPK3Fb>
{% endhint %}


# Configuration Files

{% content-ref url="/pages/b8oJef7cLu1oaVA6gIiM" %}
[Default Configs](/privatechats/config-files/default-configs)
{% endcontent-ref %}

{% content-ref url="/pages/nFN3HOgKwL4DBFkWoxFD" %}
[chats.yml](/privatechats/config-files/chats.yml)
{% endcontent-ref %}

{% content-ref url="/pages/rcJ3ZcUxe9KU8vpnnozL" %}
[events.yml](/privatechats/config-files/events.yml)
{% endcontent-ref %}


# Default Configs

{% tabs %}
{% tab title="config.yml" %}
{% code lineNumbers="true" %}

```yaml
# PrivateChats Configuration by RyanMood
# PlaceholderAPI is supported in all messages.

# This will disable chats on the spigot server & will forward triggered events to bungeecord.
bungeecord: false

messages:
  no_permission: "&7[&cError&7] &cYou do not have permission to do this."
  error_prefix: "&7[&cError&7] &c"
  usage_prefix: "&7[&cUsage&7] &c"
  sent: "&7[&aDelivered&7] &aYour message has been sent."
```

{% endcode %}
{% endtab %}

{% tab title="chats.yml" %}
{% code lineNumbers="true" %}

```yaml
# Chats config file for PrivateChats by RyanMood
# PlaceholderAPI is supported in all messages & formats.
# %player% = Player Name | %message% = Player Message / Event Message
# %status% = The status of the setting.

chats:
  helpop:
    name: "HelpOP"
    commands:
      - "helpop"
    send_perm: "privatechats.helpop.send"
    read_perm: "privatechats.helpop.read"
    format:
      message: "&7[&aHelpOP&7] &3%player%: %message%"
    sent_message: true
  staffchat:
    name: "StaffChat"
    commands:
      - "staffchat"
      - "sc"
    chat_prefix: "#"
    send_perm: "privatechats.staffchat.send"
    read_perm: "privatechats.staffchat.read"
    format:
      message: "&7[&bStaffChat&7] &3%player%: %message%"
      event: "&7[&bStaffChat&7] &3%message%"
    event_message: true
    sent_message: false
    toggle:
      enabled: true
      message: "&aYou have toggled StaffChat (%status%)!"
      commands:
        - "togglesc"
        - "togglestaffchat"
    hide:
      enabled: true
      message: "&aYou have %status% StaffChat!"
      commands:
        - "hidesc"
        - "hidestaffchat"
  adminchat:
    name: "AdminChat"
    commands:
      - "adminchat"
      - "ac"
    chat_prefix: "!"
    send_perm: "privatechats.adminchat.send"
    read_perm: "privatechats.adminchat.read"
    format:
      message: "&7[&cAdminChat&7] &3%player%: %message%"
      event: "&7&o[&c&oADMIN: %message%&7&o]"
    event_message: true
    sent_message: false
    toggle:
      enabled: true
      message: "&aYou have toggled AdminChat (%status%)!"
      commands:
        - "toggleac"
        - "toggleadminchat"
  developerchat:
    name: "DeveloperChat"
    commands:
      - "developerchat"
      - "devchat"
      - "dc"
    chat_prefix: "!"
    send_perm: "privatechats.devchat.send"
    read_perm: "privatechats.devchat.read"
    format:
      message: "&7[&aDevChat&7] &3%player%: %message%"
      event: "&7[&aDevChat&7] &b%event_message%"
    event_message: true
    sent_message: false
    toggle:
      enabled: true
      message: "&aYou have toggled Developer Chat (%status%)!"
      commands:
        - "toggledc"
        - "toggledeveloperchat"
        - "toggledevchat"
```

{% endcode %}
{% endtab %}

{% tab title="events.yml" %}
{% code lineNumbers="true" %}

```yaml
# Events config file for PrivateChats by RyanMood
# PlaceholderAPI placeholders can be used in all messages.
# Message will appear in between the chat event format.
# %player% = Player Name | %result% = Event Result (only some events support this)

toggled: true

events:
  join:
    event: "PlayerJoinEvent"
    message: "&b%player% has joined the server."
  leave:
    event: "PlayerQuitEvent"
    message: "&b%player% has left the server."
  flight:
    event: "PlayerToggleFlightEvent"
    message: "&b%player% has enabled flight."
  gamemode:
    event: "PlayerGameModeChangeEvent"
    message: "&b%player% has changed their gamemode to %result%."
  exp_change:
    event: "PlayerExpChangeEvent"
    message: "&B%player%'s exp has changed to %result%."
```

{% endcode %}
{% endtab %}
{% endtabs %}


# chats.yml

{% hint style="warning" %}
Your server must be restarted to properly register all commands.
{% endhint %}

### Required Settings

In all chats you are required to have the following:

`name: "Chat Name"` - The name of the chat.

`commands:`- The commands that will activate the chat. Must be in formatted in a list (see example below).

`send_perm: "send.permission"` - The permission required to send a message or send event to the chat.

`read_perm: "read.permission"` - The permission required to receive the sent message / event message.

#### Example:

<pre class="language-yaml"><code class="lang-yaml"><strong>section_name:
</strong>  name: "Chat Name"
  commands:
   - "commandOne"
   - "commandTwo"
  send_perm: "send.permission"
  read_perm: "read.permission"
</code></pre>

### Optional Settings

<details>

<summary>Format Section</summary>

Placeholders: %player% - Player Name | %message% - Message&#x20;

`message: "Message Format` - The format used when a player sends a message in the chat.

`event: "Event Format"` - The format used when a player triggers an event.&#x20;

#### Example:

```yaml
  format:
    message: "&7[&bMessage Format&7] &3%player%: %message%"
    event: "&7[&bStaffChat&7] &3%message%"
```

</details>

`event_message: false` - Should a message be sent to the chat if an event is triggered. Must be true/false.

`sent_message: false` - Should a message be sent to tell a player that their message was sent.

`console: false` - Should console be able to see and use the chat.&#x20;

<details>

<summary>Toggle Section</summary>

`enabled: true` - Should the toggle feature be enabled.

`message: "Toggled Message"` - The message that is shown when you toggle a chat on/off.

`commands:` - The commands that will toggle the chat. Must be in formatted in a list (see example below).

```yaml
  toggle:    
    enabled: true
    message: "&aYou have toggled StaffChat (%status%)!"
    commands:
     - "togglesc"
     - "togglestaffchat"
```

</details>

<details>

<summary>Hide Section</summary>

`enabled: true` - Should the hide feature be enabled.&#x20;

`message: "&aYou have %status% StaffChat!` - The message that is shown when you hide/unhide a chat.

`commands:` - The commands that will toggle the chat. Must be in formatted in a list (see example below).

```yaml
  hide:
    enabled: true
    message: "&aYou have %status% StaffChat!"
    commands:
     - "hidesc"
     - "hidestaffchat"
```

</details>

### Config Placeholders

All PlaceholderAPI placeholders are valid.

`%player%` -  Player Name

`%message%` - Staff Message / Event Message

`%status%` - Shows the status of toggle/hide chat.


# events.yml

### Required Settings

In all events you must have the following:

`event: "Event"` - The event that is been triggered.

`message: "Event Message"` - The event message that will be sent.&#x20;

#### Example:

```yaml
  section_name:
    event: "EventName"
    message: "Event Message"
```

Placeholders

`%player%` - Player Name

`%result%` - Event Result (only certain events support this)

`%target%` - Target's name (only certain events support this)

{% content-ref url="/pages/R4uTWQ9ebYTzUoCbX3uV" %}
[Supported Events](/privatechats/supported-events)
{% endcontent-ref %}


# Supported Events

{% hint style="info" %}
If you wish for an event to be added, feel free to open a ticket.

*This includes specific plugin events.*
{% endhint %}

{% tabs %}
{% tab title="Spigot" %}

```java
PlayerJoinEvent
PlayerQuitEvent
AsyncPlayerChatEvent
PlayerAdvancementDoneEvent* (1.12+)
PlayerBedEnterEvent
PlayerBedLeaveEvent
PlayerBucketEmptyEvent
PlayerBucketFillEvent
PlayerCommandPreprocessEvent*
PlayerDropItemEvent
PlayerEggThrowEvent
PlayerEditBookEvent
PlayerExpChangeEvent*
PlayerFishEvent
PlayerGamemodeChangeEvent*
PlayerKickEvent*
PlayerPortalEvent
PlayerRespawnEvent
PlayerTeleportEvent
PlayerToggleFlightEvent
PlayerToggleSprintEvent
PlayerToggleSneakEvent
PlayerVelocityEvent
```

{% endtab %}

{% tab title="Bungee" %}

```java
ChatEvent* // Result returns the message.
ServerConnectEvent* // Result returns the server the player has joined.
PostLoginEvent
PlayerDisconnectEvent
ServerKickEvent* // Result returns the kick reason.
ServerSwitchEvent* // Result returns the new server's name. Use %oldserver% for the previous server name.
```

{% endtab %}

{% tab title="Velocity" %}

```java
PlayerChatEvent* // Result sends the message
ServerConnectedEvent* // Result sends the name of the server.
KickedFromServerEvent* // Results sends the kick reason if there is one.
```

{% endtab %}

{% tab title="wStaff" %}

```java
StaffmodeStateChangeEvent
StaffmodeFreezeEvent* // Result returns username of whos been frozen
StaffmodeSlowChatEvent* // Result returns new chat delay
StaffmodeLockChatEvent* // Result returns "locked" or "unlocked"
```

{% endtab %}

{% tab title="GrantX" %}

```java
GrantActivateEvent*** // Result returns rank name.
GrantRevokeEvent*** // Result returns rank name.
```

{% endtab %}

{% tab title="AquaCore" %}

```java
VanishUpdateEvent
PlayerDisguiseEvent* // Result returns disguised name
PlayerGrantEvent* // Result returns rank name
PlayerOpChangeEvent* // Result returns true/false
PlayerReportEvent*** // Result returns report reason.
PlayerUnDisguiseEvent* // Result returns disguised name
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
\* = Supports %result% placeholder.\
\*\* = Supports %target% placeholder.\
\*\*\* = Supports both placeholders.
{% endhint %}


# Commands & Permissions

{% hint style="info" %}
<> = Required | () = Optional
{% endhint %}

<table><thead><tr><th>Command</th><th width="128">Usage</th><th width="102">Aliases</th><th>Default Permission</th></tr></thead><tbody><tr><td>/privatechats</td><td></td><td></td><td></td></tr><tr><td>/privatechats</td><td>(reload)</td><td></td><td>privatechats.reload</td></tr></tbody></table>

{% hint style="info" %}
Commands and permissions for chats are set in `chats.yml`!

Chat commands won't be available until the server has been restarted.
{% endhint %}


# Placeholders

{% hint style="danger" %}
[PlaceholderAPI ](https://www.spigotmc.org/resources/placeholderapi.6245/)is required to use these placeholders.
{% endhint %}

* `%privatechats_current_toggled%` - Will return the chats the player has toggled.
* `%privatechats_current_hidden%` - Will return the chats the player has hidden.
* `%privatechats_toggled_<chat>%` - Will return if a player has the given chat toggled.
* `%privatechats_hidden_<chat>%` - Will return if a player has the given chat hidden.

*Think a placeholder could be added? Suggest it on Discord.*


# API

The PrivateChats API is a work-in-progress.&#x20;

### Setup

{% tabs %}
{% tab title="Manual Setup" %}
1\. Download the latest API release from [the repo](https://repo.ryanmood.me/#/releases/me/ryanmood/PrivateChatsAPI/).

2\. Add the API jar as a dependency in your projects.

3\. Don't package or shade the API into your plugin jar, it must remain seperate. PrivateChats includes the API.

4\. Add PrivateChats as a depend or softdepend in your plugin. For example for Bukkit/Spigot `plugin.yml`: `softdepend: [PrivateChats]`.

5\. The API is now ready to be used in your project.
{% endtab %}

{% tab title="Maven Setup" %}

1. Add the repository to your pom.xml

```xml
<repository>
  <id>ryanmood-repo</id>
  <url>https://repo.ryanmood.me/releases</url>
</repository>
```

2. Add the dependency to your pom.xml, ensuring that `<scope>` is always `provided`.

```xml
<dependency>
  <groupId>me.ryanmood</groupId>
  <artifactId>PrivateChatsAPI</artifactId>
  <version>BETA-0.1</version>
  <scope>provided</scope>
</dependency>
```

3. Add PrivateChats as a depend or softdepend in your plugin. For example for Bukkit/Spigot `plugin.yml`: `softdepend: [PrivateChats]`.
4. The API is now ready to be used.
   {% endtab %}

{% tab title="Gradle Setup" %}

1. Add the repository:

```gradle
repositories {
    mavenCentral()
    maven("https://repo.ryanmood.me/releases/")
}
```

2. Add the dependency (compileOnly is required to ensure that the API isn't packaged into your plugin):

```gradle
dependencies {
    implementation("me.ryanmood", "PrivateChatsAPI", "BETA-0.1", "compileOnly")
}
```

3. Add PrivateChats as a depend or softdepend in your plugin. For example for Bukkit/Spigot `plugin.yml`: `softdepend: [PrivateChats]`.
4. Ensure that PrivateChat's package is excluded from any shading plugins.
5. The API is now ready to be used.
   {% endtab %}
   {% endtabs %}

{% embed url="<https://repo.ryanmood.me/javadoc/releases/me/ryanmood/PrivateChatsAPI/BETA-0.1>" %}
Java Docs for the API.
{% endembed %}

{% embed url="<https://github.com/RyanMoodGAMING/PrivateChatsAPI>" %}
GitHub Repository for the API
{% endembed %}

{% embed url="<https://repo.ryanmood.me/#/releases/me/ryanmood/PrivateChatsAPI>" %}
The Repo for the API.
{% endembed %}


# PrivateDiscord

### Installation

* Download PrivateDiscord from discord.
* Put it into your `/plugins/` folder.
* Restart your server!
* Go to `/plugins/PrivateDiscord/` and inside of `secrets.yml` insert your bot token into `discord.token`.
* Configure the config files to your need. These are located at `/plugins/PrivateDiscord/`

{% hint style="danger" %}
Do not reload, always restart!
{% endhint %}

{% hint style="success" %}
Congrats, you've now added PrivateDiscord to your server.

If you need any support please join my support discord @ <https://discord.gg/6QNEGPK3Fb>
{% endhint %}

{% content-ref url="/pages/MDWEAvrNW23bvFRtWrK1" %}
[Setup Discord Channels](/privatechats/privatediscord/setup-discord-channels)
{% endcontent-ref %}


# Configuration Files

{% content-ref url="/pages/oxvgbvRwhm4HoZpI8rFg" %}
[Default Configs](/privatechats/privatediscord/config-files/default-configs)
{% endcontent-ref %}


# Default Configs

{% tabs %}
{% tab title="config.yml" %}

```yaml
# Config file for PrivateDiscord

debug: false
```

{% endtab %}

{% tab title="secret.yml" %}

```yaml
# Secrets config for PrivateDiscord
# Never share this file with anyone, if you do redact all information.

discord:
  token: "TOKEN HERE"
```

{% endtab %}
{% endtabs %}


# Setup Discord Channels

* Navigate to your `/plugins/PrivateChats/chats.yml`
* Under the chats you wish to intergrate discord into you need to add the following:

```yaml
    discord: 
      id: CHANNEL ID
      embed:
        author: "%name%: %message%"
        authorIcon: "https://crafatar.com/avatars/%uuid%/?overlay=1"
        title: "%name%: %message%"
        description: "%name%: %message%"
        footer: "%name%"
        footerIcon: "https://crafatar.com/avatars/%uuid%/?overlay=1"
        timeStamp: true
        colour: "#ff0d00"
```

If you don't a feature of the embed, you can remove it, for example:

```yaml
    discord: 
      id: CHANNEL ID
      embed:
        description: "%name%: %message%"
        colour: "#ff0d00"
```

### Full Example:

```yaml
  staffchat:
    name: "StaffChat"
    commands:
      - "staffchat"
      - "sc"
    chat_prefix: "#"
    send_perm: "privatechats.staffchat.send"
    read_perm: "privatechats.staffchat.read"
    format:
      message: "&7[&bStaffChat&7] &3%player%: %message%"
      event: "&7[&bStaffChat&7] &3%message%"
    event_message: true
    sent_message: false
    console: true
    toggle:
      enabled: true
      message: "&aYou have toggled StaffChat (%status%)!"
      commands:
        - "togglesc"
        - "togglestaffchat"
    hide:
      enabled: true
      message: "&aYou have %status% StaffChat!"
      commands:
        - "hidesc"
        - "hidestaffchat"
    discord: 
      id: CHANNEL ID
      embed:
        author: "%name%: %message%"
        authorIcon: "https://crafatar.com/avatars/%uuid%/?overlay=1"
        title: "%name%: %message%"
        description: "%name%: %message%"
        footer: "%name%"
        footerIcon: "https://crafatar.com/avatars/%uuid%/?overlay=1"
        timeStamp: true
        colour: "#ff0d00"
```


