Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9b5d44c2f6 | |||
| d4a43eae41 | |||
| 2ce35d19c8 | |||
| 1139b1767f | |||
| d5bb520e5e | |||
| 2ebdb733c0 | |||
| 6fffb62fba | |||
| 74849724ec | |||
| c077231c6b | |||
| 741494eb70 |
@@ -28,7 +28,7 @@ jobs:
|
||||
contents: write
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Common Setup
|
||||
uses: ./.github/actions/common-setup
|
||||
@@ -39,14 +39,14 @@ jobs:
|
||||
run: ./gradlew clean shadowJar -x test -x checkstyleMain -x checkstyleTest -x spotbugsMain --info
|
||||
|
||||
- name: Upload build results
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: ${{ matrix.os }} Java ${{ matrix.java }} build results
|
||||
path: ${{ github.workspace }}/build/libs/
|
||||
|
||||
- name: Upload test results
|
||||
if: ${{ always() }}
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: ${{ matrix.os }} Java ${{ matrix.java }} test results
|
||||
path: ${{ github.workspace }}/build/reports/
|
||||
@@ -59,7 +59,7 @@ jobs:
|
||||
- test
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Common Setup
|
||||
uses: ./.github/actions/common-setup
|
||||
@@ -70,7 +70,7 @@ jobs:
|
||||
run: ./gradlew -Pver="0.0.0-RC-1" clean shadowJar -x test -x checkstyleMain -x checkstyleTest -x spotbugsMain
|
||||
|
||||
- name: Upload build results
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: Release Build
|
||||
path: ${{ github.workspace }}/build/libs/
|
||||
@@ -84,7 +84,7 @@ jobs:
|
||||
if: always() && vars.DISCORD_WEBHOOK_ID
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Common Setup
|
||||
uses: ./.github/actions/common-setup
|
||||
|
||||
@@ -27,7 +27,7 @@ jobs:
|
||||
contents: write
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Common Setup
|
||||
uses: ./.github/actions/common-setup
|
||||
@@ -38,14 +38,14 @@ jobs:
|
||||
run: ./gradlew clean shadowJar -x test -x checkstyleMain -x checkstyleTest -x spotbugsMain --info
|
||||
|
||||
- name: Upload build results
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: ${{ matrix.os }} Java ${{ matrix.java }} build results
|
||||
path: ${{ github.workspace }}/build/libs/
|
||||
|
||||
- name: Upload test results
|
||||
if: ${{ always() }}
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: ${{ matrix.os }} Java ${{ matrix.java }} test results
|
||||
path: ${{ github.workspace }}/build/reports/
|
||||
|
||||
@@ -15,7 +15,7 @@ jobs:
|
||||
if: vars.DISCORD_RELEASE_WEBHOOK_ID || vars.DISCORD_WEBHOOK_ID
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Common Setup
|
||||
uses: ./.github/actions/common-setup
|
||||
|
||||
@@ -19,7 +19,7 @@ jobs:
|
||||
contents: write
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Common Setup
|
||||
uses: ./.github/actions/common-setup
|
||||
@@ -28,7 +28,7 @@ jobs:
|
||||
run: ./gradlew -Pver=${{ github.ref_name }} clean shadowJar -x test -x checkstyleMain -x checkstyleTest -x spotbugsMain
|
||||
|
||||
- name: Upload build results
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: Release Build
|
||||
path: ${{ github.workspace }}/build/libs/
|
||||
@@ -54,7 +54,7 @@ jobs:
|
||||
if: always() && vars.DISCORD_WEBHOOK_ID
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Common Setup
|
||||
uses: ./.github/actions/common-setup
|
||||
|
||||
@@ -1,224 +1,95 @@
|
||||
# PaperMC/Spigot Minecraft Server Plugin Template
|
||||
A template for building PaperMC/Spigot Minecraft server plugins!
|
||||
# ⚡ Trixinity-Event Plugin
|
||||
|
||||
<!-- TODO: CHANGE ME -->
|
||||
[](https://github.com/CrimsonWarpedcraft/plugin-template/actions/workflows/main.yml)
|
||||
**Trixinity-Event** je specializovaný plugin pro správu herních eventů na Minecraft serverech, který nabízí přehledné příkazy, automatizované úkony a integraci s klíčovými serverovými pluginy.
|
||||
|
||||
<!-- TODO: CHANGE ME -->
|
||||
[](https://discord.gg/5XMmeV6EtJ)
|
||||
|
||||
## Features
|
||||
### Github Actions 🎬
|
||||
* Automated builds, testing, and release drafting
|
||||
* [Discord notifcations](https://github.com/marketplace/actions/discord-message-notify) for snapshots and releases
|
||||
|
||||
### Bots 🤖
|
||||
* **Probot: Stale**
|
||||
* Mark issues stale after 30 days
|
||||
* **Dependabot**
|
||||
* Update GitHub Actions workflows
|
||||
* Update Gradle dependencies
|
||||
|
||||
### Issue Templates 📋
|
||||
* Bug report template
|
||||
* Feature request template
|
||||
|
||||
### Gradle Builds 🏗
|
||||
* Shadowed [PaperLib](https://github.com/PaperMC/PaperLib) build
|
||||
* [Checkstyle](https://checkstyle.org/) Google standard style check
|
||||
* [SpotBugs](https://spotbugs.github.io/) code analysis
|
||||
* [JUnit](https://junit.org/) testing
|
||||
|
||||
### Config Files 📁
|
||||
* Sample plugin.yml with autofill name, version, and main class.
|
||||
* Empty config.yml (just to make life \*that\* much easier)
|
||||
* Gradle build config
|
||||
* Simple .gitignore for common Gradle files
|
||||
|
||||
## Usage
|
||||
In order to use this template for yourself, there are a few things that you will need to keep in mind.
|
||||
|
||||
### Release Info
|
||||
#### PaperMC Version Mapping
|
||||
Here's a list of the PaperMC versions and the versions of this latest compatible version.
|
||||
|
||||
| PaperMC | ExamplePlugin |
|
||||
|---------|---------------|
|
||||
| 1.21.6 | 4.0.13+ |
|
||||
| 1.21.5 | 4.0.12 |
|
||||
| 1.21.4 | 4.0.7 |
|
||||
| 1.21.3 | 4.0.3 |
|
||||
| 1.21.1 | 4.0.2 |
|
||||
| 1.21 | 3.12.1 |
|
||||
| 1.20.6 | 3.11.0 |
|
||||
| 1.19.4 | 3.2.1 |
|
||||
| 1.18.2 | 3.0.2 |
|
||||
| 1.17.1 | 2.2.0 |
|
||||
| 1.16.5 | 2.1.2 |
|
||||
|
||||
This chart would make more sense if this plugin actually did anything and people would have a reason
|
||||
to be looking for older releases to run on older servers.
|
||||
|
||||
To use this as a template, just use the latest version of this project and update the PaperMC
|
||||
version as needed. See more info on release stability below.
|
||||
|
||||
#### Release and Versioning Strategy
|
||||
Stable versions of this repo are tagged `vX.Y.Z` and have an associated [release](https://github.com/CrimsonWarpedcraft/plugin-template/releases).
|
||||
|
||||
Testing versions of this repo are tagged `vX.Y.Z-RC-N` and have an associated [pre-release](https://github.com/CrimsonWarpedcraft/plugin-template/releases).
|
||||
|
||||
Development versions of this repo are pushed to the master branch and are **not** tagged.
|
||||
|
||||
| Event | Plugin Version Format | CI Action | GitHub Release Draft? |
|
||||
|-------------------|-----------------------|----------------------------------|-----------------------|
|
||||
| PR | yyMMdd-HHmm-SNAPSHOT | Build and test | No |
|
||||
| Cron | yyMMdd-HHmm-SNAPSHOT | Build, test, and notify | No |
|
||||
| Push to `main` | 0.0.0-SNAPSHOT | Build, test, release, and notify | No |
|
||||
| Tag `vX.Y.Z-RC-N` | X.Y.Z-SNAPSHOT | Build, test, release, and notify | Pre-release |
|
||||
| Tag `vX.Y.Z` | X.Y.Z | Build, test, release, and notify | Release |
|
||||
|
||||
### Discord Notifications
|
||||
In order to use Discord notifications, you will need to create two GitHub secrets. `DISCORD_WEBHOOK_ID`
|
||||
should be set to the id of your Discord webhook. `DISCORD_WEBHOOK_TOKEN` will be the token for the webhook.
|
||||
|
||||
You can find these values by copying the Discord Webhook URL:
|
||||
`https://discord.com/api/webhooks/<DISCORD_WEBHOOK_ID>/<DISCORD_WEBHOOK_TOKEN>`
|
||||
|
||||
Optionally, you can also configure `DISCORD_RELEASE_WEBHOOK_ID` and `DISCORD_RELEASE_WEBHOOK_TOKEN`
|
||||
to send release announcements to a separate channel.
|
||||
|
||||
For more information, see [Discord Message Notify](https://github.com/marketplace/actions/discord-message-notify).
|
||||
| Status | Hodnota | Zdroj |
|
||||
| :--- | :--- | :--- |
|
||||
| **Verze** | v1.0.0 | |
|
||||
| **API Verze** | 1.21 | |
|
||||
| **Autor** | BabyMsp2k | |
|
||||
|
||||
---
|
||||
|
||||
**I've broken the rest of the changes up by their files to make things a bit easier to find.**
|
||||
## 🧩 Požadované pluginy
|
||||
|
||||
### Povinné závislosti
|
||||
* **WorldGuard**: Používá se pro přepínání flagů (build, pvp) v regionu `EVENT`.
|
||||
|
||||
### Doporučené / Soft Dependencies
|
||||
* **PlaceholderAPI**: Umožňuje zobrazení aktuálního statusu eventu a jména Eventera.
|
||||
* **LuckPerms**: Plugin využívá příkazy `/lp user...` pro nastavení role Eventer.
|
||||
* **WorldEdit**: Zmiňován v nápovědě pro administrátory pro úpravy event arén.
|
||||
|
||||
---
|
||||
|
||||
### settings.gradle
|
||||
Update the line below with the name of your plugin.
|
||||
## ⚙️ Příkazy
|
||||
|
||||
```groovy
|
||||
rootProject.name = 'ExamplePlugin'
|
||||
```
|
||||
Všechny příkazy pro správu eventů vyžadují oprávnění **`trixinity.event.admin`** nebo **`op`**.
|
||||
|
||||
### build.gradle
|
||||
Make sure to update the `group` to your package's name in the following section.
|
||||
| Příkaz | Popis | Oprávnění |
|
||||
| :--- | :--- | :--- |
|
||||
| **`/trixinity`** | Zobrazí základní informace o pluginu (verze, autor). | `trixinity.admin` (op) |
|
||||
| **`/event`** (alias: `/e`) | Hlavní příkaz pro správu eventů. | `trixinity.event.admin` (op) |
|
||||
| **`/eventer <nick>`** | Nastaví hráče jako Eventera (pomocí LuckPerms role `eventer`) a uloží do konfigurace. | `*` (pouze pro administrátory) |
|
||||
| **`/cleareventer`** | Vymaže současného Eventera a vrátí jeho LuckPerms roli na `default`. | `*` (pouze pro administrátory) |
|
||||
|
||||
```groovy
|
||||
group = "com.crimsonwarpedcraft.exampleplugin"
|
||||
```
|
||||
### Sub-příkazy `/event`
|
||||
|
||||
Add any required repositories for your dependencies in the following section.
|
||||
|
||||
```groovy
|
||||
repositories {
|
||||
maven {
|
||||
name 'papermc'
|
||||
url 'https://papermc.io/repo/repository/maven-public/'
|
||||
content {
|
||||
includeModule("io.papermc.paper", "paper-api")
|
||||
includeModule("io.papermc", "paperlib")
|
||||
includeModule("net.md-5", "bungeecord-chat")
|
||||
}
|
||||
}
|
||||
|
||||
mavenCentral()
|
||||
}
|
||||
```
|
||||
|
||||
Also, update your dependencies as needed (of course).
|
||||
|
||||
```groovy
|
||||
dependencies {
|
||||
compileOnly 'io.papermc.paper:paper-api:1.21.6-R0.1-SNAPSHOT'
|
||||
compileOnly 'com.github.spotbugs:spotbugs-annotations:4.9.3'
|
||||
implementation 'io.papermc:paperlib:1.0.8'
|
||||
spotbugsPlugins 'com.h3xstream.findsecbugs:findsecbugs-plugin:1.14.0'
|
||||
testCompileOnly 'com.github.spotbugs:spotbugs-annotations:4.9.3'
|
||||
testImplementation 'io.papermc.paper:paper-api:1.21.6-R0.1-SNAPSHOT'
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter:5.13.1'
|
||||
testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.13.1'
|
||||
}
|
||||
```
|
||||
|
||||
### src/main/resources/plugin.yml
|
||||
First, update the following with your information.
|
||||
|
||||
```yaml
|
||||
author: AUTHOR
|
||||
description: DESCRIPTION
|
||||
```
|
||||
|
||||
Next, the `commands` and `permissions` sections below should be updated as needed.
|
||||
|
||||
```yaml
|
||||
commands:
|
||||
ex:
|
||||
description: Base command for EXAMPLE
|
||||
usage: "For a list of commands, type /ex help"
|
||||
aliases: example
|
||||
permissions:
|
||||
example.test:
|
||||
description: DESCRIPTION
|
||||
default: true
|
||||
example.*:
|
||||
description: Grants all other permissions
|
||||
default: false
|
||||
children:
|
||||
example.test: true
|
||||
```
|
||||
|
||||
### .github/dependabot.yml
|
||||
You will need to replace all instances of `leviem1`, such as the one below, with your GitHub
|
||||
username.
|
||||
|
||||
```yaml
|
||||
reviewers:
|
||||
- "leviem1"
|
||||
```
|
||||
|
||||
### .github/CODEOWNERS
|
||||
You will need to replace `leviem1`, with your GitHub username.
|
||||
|
||||
```text
|
||||
* @leviem1
|
||||
```
|
||||
|
||||
### .github/FUNDING.yml
|
||||
Update or delete this file, whatever applies to you.
|
||||
|
||||
```yaml
|
||||
github: leviem1
|
||||
```
|
||||
|
||||
For more information see: [Displaying a sponsor button in your repository](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/displaying-a-sponsor-button-in-your-repository)
|
||||
|
||||
### CODE_OF_CONDUCT.md
|
||||
If you chose to adopt a Code of Conduct for your project, please update line 63 with your preferred
|
||||
contact method.
|
||||
|
||||
## Creating a Release
|
||||
Below are the steps you should follow to create a release.
|
||||
|
||||
1. Create a tag on `main` using semantic versioning (e.g. v0.1.0)
|
||||
2. Push the tag and get some coffee while the workflows run
|
||||
3. Publish the release draft once it's been automatically created
|
||||
|
||||
## Building locally
|
||||
Thanks to [Gradle](https://gradle.org/), building locally is easy no matter what platform you're on. Simply run the following command:
|
||||
|
||||
```text
|
||||
./gradlew build
|
||||
```
|
||||
|
||||
This build step will also run all checks and tests, making sure your code is clean.
|
||||
|
||||
JARs can be found in `build/libs/`.
|
||||
|
||||
## Contributing
|
||||
See [CONTRIBUTING.md](https://github.com/CrimsonWarpedcraft/plugin-template/blob/main/CONTRIBUTING.md).
|
||||
| Sub-příkaz | Popis | Klíčové akce |
|
||||
| :--- | :--- | :--- |
|
||||
| **`pripravuje`** | Nastaví status eventu na "Připravuje se" a vypne whitelist. | `whitelist off` |
|
||||
| **`start`** | Nastaví status na "Začal", zapne whitelist a zaplní oblast železnými mřížemi. | `whitelist on`, `/fill ... iron_bars` |
|
||||
| **`end`** | Nastaví status na "Skončil" a resetuje oblast bloků. | `/fill ... air`, `/fill ... iron_bars` |
|
||||
| **`event spleef`** | Spustí Spleef event: naplní arénu sněhovými bloky a dá hráčům zlatou lopatu s **Efficiency III**. | Připraví Spleef arénu. |
|
||||
| **`build <on/off>`** | Povolí/zakáže stavění v regionu WorldGuardu s názvem **`__global__`** ve světě **`EVENT`**. | WorldGuard flag `build` |
|
||||
| **`pvp <on/off>`** | Povolí/zakáže PvP v regionu WorldGuardu s názvem **`__global__`** ve světě **`EVENT`**. | WorldGuard flag `pvp` |
|
||||
|
||||
---
|
||||
|
||||
I think that's all... phew! Oh, and update this README! ;)
|
||||
## 🏗️ Struktura projektu
|
||||
|
||||
Projekt používá standardní Gradle strukturu pro Minecraft pluginy s využitím Wrapperu a GitHub Actions pro CI.
|
||||
|
||||
.
|
||||
├── .github/ # Konfigurace pro GitHub, CI/CD, Issues a Bots
|
||||
│ ├── actions/
|
||||
│ │ └── common-setup/ # Společné nastavení Javy pro Workflows
|
||||
│ ├── CODEOWNERS
|
||||
│ ├── CONTRIBUTING.md # Pokyny pro přispívání
|
||||
│ ├── dependabot.yml # Konfigurace pro automatické aktualizace závislostí
|
||||
│ ├── ISSUE_TEMPLATE/
|
||||
│ ├── stale.yml # Konfigurace pro Probot: Stale
|
||||
│ └── workflows/ # Workflows pro Testy, Releasy a Notifikace
|
||||
├── build.gradle # Hlavní konfigurační soubor Gradle (závislosti, ShadowJar, Checkstyle)
|
||||
├── config/
|
||||
│ └── checkstyle/
|
||||
│ └── checkstyle.xml # Konfigurace pro kontrolu stylu (Google Java Style)
|
||||
├── CODE_OF_CONDUCT.md # Kodex chování pro přispěvatele
|
||||
├── gradle/
|
||||
│ └── wrapper/
|
||||
│ ├── gradle-wrapper.jar
|
||||
│ └── gradle-wrapper.properties
|
||||
├── gradlew # Skript pro spuštění Gradle na Linuxu/macOS
|
||||
├── gradlew.bat # Skript pro spuštění Gradle na Windows
|
||||
├── LICENSE # Licence projektu (GNU GPL v3)
|
||||
├── README.md # Tento soubor
|
||||
├── settings.gradle # Nastavení názvu projektu (Trixinity-Event)
|
||||
└── src/
|
||||
├── main/
|
||||
│ ├── java/
|
||||
│ │ └── dev/trixinity/event/
|
||||
│ │ ├── commands/ # Logika pro /event, /eventer, /cleareventer
|
||||
│ │ ├── placeholders/ # Implementace PlaceholderAPI
|
||||
│ │ └── TrixinityEvent.java # Hlavní třída pluginu
|
||||
│ └── resources/
|
||||
│ ├── config.yml # Výchozí konfigurační soubor
|
||||
│ └── plugin.yml # Metadata pluginu a definice příkazů
|
||||
└── test/
|
||||
└── java/ # Testy (aktuálně obsahuje pouze prázdný testovací soubor)
|
||||
|
||||
|
||||
---
|
||||
|
||||
## 💖 Credits
|
||||
|
||||
Plugin Trixinity-Event vytvořil s ❤️ **BabyMsp2k**.
|
||||
|
||||
+2
-2
@@ -3,7 +3,7 @@ import java.text.SimpleDateFormat
|
||||
|
||||
plugins {
|
||||
id 'checkstyle'
|
||||
id "com.github.spotbugs" version "6.2.1"
|
||||
id "com.github.spotbugs" version "6.2.2"
|
||||
id 'com.gradleup.shadow' version '8.3.8'
|
||||
id 'java'
|
||||
}
|
||||
@@ -80,7 +80,7 @@ dependencies {
|
||||
testCompileOnly 'com.github.spotbugs:spotbugs-annotations:4.9.3'
|
||||
testImplementation 'io.papermc.paper:paper-api:1.21.4-R0.1-SNAPSHOT'
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter:5.13.1'
|
||||
testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.13.1'
|
||||
testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.13.3'
|
||||
}
|
||||
|
||||
test {
|
||||
|
||||
@@ -33,6 +33,14 @@ public class EventCommand implements CommandExecutor, TabCompleter {
|
||||
String subCommand = args[0].toLowerCase();
|
||||
|
||||
switch (subCommand) {
|
||||
case "pripravuje":
|
||||
if (!sender.hasPermission("trixinity.event.admin")) {
|
||||
sender.sendMessage(ChatColor.RED + "Nemáš oprávnění k použití tohoto příkazu!");
|
||||
return true;
|
||||
}
|
||||
handleEventPripravuje(sender);
|
||||
break;
|
||||
|
||||
case "starting":
|
||||
if (!sender.hasPermission("trixinity.event.admin")) {
|
||||
sender.sendMessage(ChatColor.RED + "Nemáš oprávnění k použití tohoto příkazu!");
|
||||
@@ -118,7 +126,7 @@ public class EventCommand implements CommandExecutor, TabCompleter {
|
||||
List<String> completions = new ArrayList<>();
|
||||
|
||||
if (args.length == 1) {
|
||||
List<String> subCommands = Arrays.asList("starting", "start", "end", "build", "pvp", "kick", "event");
|
||||
List<String> subCommands = Arrays.asList("pripravuje", "starting", "start", "end", "build", "pvp", "kick", "event");
|
||||
for (String subCommand : subCommands) {
|
||||
if (subCommand.toLowerCase().startsWith(args[0].toLowerCase())) {
|
||||
completions.add(subCommand);
|
||||
@@ -206,11 +214,26 @@ public class EventCommand implements CommandExecutor, TabCompleter {
|
||||
Bukkit.broadcastMessage(ChatColor.RED + ChatColor.BOLD.toString() + "SPLEEF EVENT SKONČIL!");
|
||||
}
|
||||
|
||||
private void handleEventPripravuje(CommandSender sender) {
|
||||
TrixinityEvent plugin = TrixinityEvent.getInstance();
|
||||
|
||||
// Nastavení stavu v paměti
|
||||
plugin.setEventStatus("Připravuje se");
|
||||
|
||||
// Vypnutí whitelistu
|
||||
Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "whitelist off");
|
||||
|
||||
sender.sendMessage(ChatColor.BLUE + "Event se připravuje");
|
||||
|
||||
// Oznámení všem hráčům
|
||||
Bukkit.broadcastMessage(ChatColor.BLUE + ChatColor.BOLD.toString() + "EVENT SE PŘIPRAVUJE!");
|
||||
}
|
||||
|
||||
private void handleEventStarting(CommandSender sender) {
|
||||
TrixinityEvent plugin = TrixinityEvent.getInstance();
|
||||
|
||||
// Nastavenie stavu len v pamäti
|
||||
plugin.setEventStatus("Začíná"); // Už je správně
|
||||
plugin.setEventStatus("Začíná");
|
||||
|
||||
// Vyplnění oblasti vzduchem
|
||||
Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "fill 47 62 42 39 60 42 air");
|
||||
@@ -225,7 +248,7 @@ public class EventCommand implements CommandExecutor, TabCompleter {
|
||||
TrixinityEvent plugin = TrixinityEvent.getInstance();
|
||||
|
||||
// Nastavenie stavu len v pamäti
|
||||
plugin.setEventStatus("Začal"); // Změněno z "začal" na "Začal"
|
||||
plugin.setEventStatus("Začal");
|
||||
|
||||
// Zapnutie whitelistu
|
||||
Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "whitelist on");
|
||||
|
||||
@@ -41,8 +41,21 @@ public class TrixinityPlaceholderExpansion extends PlaceholderExpansion {
|
||||
public @Nullable String onRequest(OfflinePlayer player, @NotNull String params) {
|
||||
// Zpracování různých placeholderů
|
||||
switch (params.toLowerCase()) {
|
||||
case "status": // Změněno z "trixinity_status"
|
||||
return plugin.getEventStatus();
|
||||
case "status":
|
||||
case "event_status":
|
||||
String eventStatus = plugin.getEventStatus();
|
||||
switch (eventStatus.toLowerCase()) {
|
||||
case "připravuje se":
|
||||
return "Připravuje se";
|
||||
case "začíná":
|
||||
return "Začíná";
|
||||
case "začal":
|
||||
return "Začal";
|
||||
case "skončil":
|
||||
return "Skončil";
|
||||
default:
|
||||
return eventStatus;
|
||||
}
|
||||
case "eventer":
|
||||
case "current_eventer":
|
||||
String eventer = plugin.getConfig().getString("current_eventer");
|
||||
|
||||
Reference in New Issue
Block a user