-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from efrei-craft/development
Some fixes
- Loading branch information
Showing
9 changed files
with
116 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name-template: 'v$RESOLVED_VERSION' | ||
tag-template: 'v$RESOLVED_VERSION' | ||
|
||
categories: | ||
- title: '🚀 Features' | ||
label: 'feature' | ||
- title: '🐛 Bug Fixes' | ||
labels: | ||
- 'fix' | ||
- 'bugfix' | ||
- 'bug' | ||
|
||
autolabeler: | ||
- label: 'chore' | ||
files: | ||
- '*.md' | ||
branch: | ||
- '/docs{0,1}\/.+/' | ||
- label: 'bug' | ||
branch: | ||
- '/fix\/.+/' | ||
title: | ||
- '/fix/i' | ||
- label: 'enhancement' | ||
branch: | ||
- '/feature\/.+/' | ||
body: | ||
- '/JIRA-[0-9]{1,4}/' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Release Drafter | ||
|
||
on: | ||
push: | ||
# branches to consider in the event; optional, defaults to all | ||
branches: [ "*" ] | ||
# pull_request event is required only for autolabeler | ||
pull_request: | ||
# Only following types are handled by the action, but one can default to all as well | ||
types: [opened, reopened, synchronize] | ||
# pull_request_target event is required for autolabeler to support PRs from forks | ||
pull_request_target: | ||
types: [opened, reopened, synchronize] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
update_release_draft: | ||
permissions: | ||
# write permission is required to create a github release | ||
contents: write | ||
# write permission is required for autolabeler | ||
# otherwise, read permission is required at least | ||
pull-requests: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
# (Optional) GitHub Enterprise requires GHE_HOST variable set | ||
#- name: Set GHE_HOST | ||
# run: | | ||
# echo "GHE_HOST=${GITHUB_SERVER_URL##https:\/\/}" >> $GITHUB_ENV | ||
|
||
# Drafts your next Release notes as Pull Requests are merged into "master" | ||
- uses: release-drafter/release-drafter@v5 | ||
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml | ||
# with: | ||
# config-name: my-config.yml | ||
# disable-autolabeler: true | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,36 @@ | ||
# ECATUP | ||
# ECATUP (_Efrei Craft's Awesome Tools and Utilities Plugin_) | ||
|
||
--- | ||
[![Java CI with Gradle](https://github.com/efrei-craft/ECATUP/actions/workflows/gradle.yml/badge.svg)](https://github.com/efrei-craft/ECATUP/actions/workflows/gradle.yml) | ||
|
||
Efrei Craft's Awesome Tools and Utilities Plugin | ||
## Les commandes et fonctions utiles d'Efrei Craft | ||
|
||
--- | ||
### Permissions | ||
|
||
Les commandes et fonctions utiles d'Efrei Craft | ||
| Permission | Description | | ||
|-------------------------|------------------------------------------------------------------| | ||
| `ecatup.lobby` | Permet au joueur d'utiliser la commande `/lobby`. | | ||
| `ecatup.gamemode` | Permet au joueur d'utiliser la commande `/gm` et ses dérivées. | | ||
| `ecatup.give.skull` | Permet au joueur d'utiliser la commande `/skull`. | | ||
| `ecatup.whois` | Permet au joueur d'utiliser la commande `/whois`. | | ||
| `ecatup.chat.color` | Permet au joueur d'envoyer des messages en couleur dans le chat. | | ||
| `ecatup.channel.use` | Permet au joueur d'utiliser la commande `/channel`. | | ||
| `ecatup.channel.global` | Permet au joueur d'envoyer des messages dans le canal GLOBAL. | | ||
| `ecatup.channel.server` | Permet au joueur d'envoyer des messages dans le canal SERVER. | | ||
| `ecatup.channel.team` | Permet au joueur d'envoyer des messages dans le canal TEAM. | | ||
| `server.<server_name>` | Permet au joueur de se connecter au serveur `<server_name>`. | | ||
|
||
## Permissions | ||
### Commandes | ||
| Commande | Description | Alias | | ||
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------| | ||
| <code>/gm <0|1|2|3> [player]</code><br/><code>/gm <s|c|a|sp> [player]</code><br/><code>/gm <survival|creative|adventure|spectator> [player]</code> | Change le gamemode de `player`, ou le sien. | `/gms` `/gmc` `/gma` `/gmsp` | | ||
| `/lobby` | Se ramène au lobby (c'est-à-dire, le serveur s'appelant "lobby"). | `/hub` `/spawn` | | ||
| `/skull [player]` | Obtient son propre crâne, ou celui de `player`. | | | ||
| `/whois [player]` | Obtient des informations sur soi-même, ou `player`. De plus, chaque information est copiable en cliquant dessus. | | | ||
| <code>/channel [GLOBAL|SERVER|TEAM]</code> | Bascule sur un canal de chat, ou retourne son canal actuel. | `/chat` `/c` | | ||
| `/slap <player> [-a]` | Donne une claque à `player` dans une direction aléatoire (mais vers le haut).</br>Avec -a, `player` sera repoussé dans la direction opposée, à soi-même. | `/bitchslap` | | ||
|
||
| Permission | Description | | ||
|------------------------|------------------------------------------------------------------| | ||
| `ecatup.lobby` | Permet au joueur d'utiliser la commande `/lobby`. | | ||
| `ecatup.gamemode` | Permet au joueur d'utiliser la commande `/gm` et ses dérivées. | | ||
| `ecatup.give.skull` | Permet au joueur d'utiliser la commande `/skull`. | | ||
| `ecatup.whois` | Permet au joueur d'utiliser la commande `/whois`. | | ||
| `ecatup.chat.color` | Permet au joueur d'envoyer des messages en couleur dans le chat. | | ||
| `ecatup.channel` | Permet au joueur d'utiliser la commande `/channel`. | | ||
| `ecatup.channel.global`| Permet au joueur d'envoyer des messages dans le canal GLOBAL. | | ||
| `server.<server_name>` | Permet au joueur de se connecter au serveur `<server_name>`. | | ||
\ | ||
\ | ||
Chaque message du chat est **copiable**, et ajoutera le **canal** sur lequel il a été dit, ainsi que le **timestamp**. | ||
![Exemple](exemple1.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,22 @@ | ||
package fr.efreicraft.ecatup.utils; | ||
|
||
import net.kyori.adventure.text.TextComponent; | ||
import org.bukkit.Bukkit; | ||
import org.bukkit.ChatColor; | ||
|
||
import java.util.Objects; | ||
|
||
public class Msg { | ||
public static String colorize(String message) { | ||
return ChatColor.translateAlternateColorCodes('&', message); | ||
return ChatColor.translateAlternateColorCodes('&', Objects.requireNonNullElse(message, "null")); | ||
} | ||
|
||
public static String colorize(TextComponent message) { | ||
return ChatColor.translateAlternateColorCodes('&', message.content()); | ||
return ChatColor.translateAlternateColorCodes('&', Objects.requireNonNullElse(message.content(), nullText())); | ||
} | ||
|
||
private static String nullText() { | ||
Bukkit.getLogger().warning("Tried to colorize a null text (LuckPerms is at it again...)"); | ||
return "null"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters