7 Commits

Author SHA1 Message Date
dependabot[bot] 5b48dd671d deps: bump com.github.spotbugs:spotbugs-annotations from 4.9.3 to 4.9.8
Bumps [com.github.spotbugs:spotbugs-annotations](https://github.com/spotbugs/spotbugs) from 4.9.3 to 4.9.8.
- [Release notes](https://github.com/spotbugs/spotbugs/releases)
- [Changelog](https://github.com/spotbugs/spotbugs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/spotbugs/spotbugs/compare/4.9.3...4.9.8)

---
updated-dependencies:
- dependency-name: com.github.spotbugs:spotbugs-annotations
  dependency-version: 4.9.8
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-20 04:33:10 +00:00
BabyMsp2k d5bb520e5e Merge pull request #10 from BabyMsp2k/dependabot/gradle/main/com.github.spotbugs-6.2.2
deps: bump com.github.spotbugs from 6.2.1 to 6.2.2
2025-07-19 13:43:47 +02:00
dependabot[bot] 2ebdb733c0 deps: bump com.github.spotbugs from 6.2.1 to 6.2.2
Bumps com.github.spotbugs from 6.2.1 to 6.2.2.

---
updated-dependencies:
- dependency-name: com.github.spotbugs
  dependency-version: 6.2.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-14 05:08:59 +00:00
BabyMsp2k 6fffb62fba Merge pull request #8 from BabyMsp2k/dependabot/gradle/main/org.junit.platform-junit-platform-launcher-1.13.3
deps: bump org.junit.platform:junit-platform-launcher from 1.13.1 to 1.13.3
2025-07-12 12:58:54 +02:00
babymsp2k 74849724ec fix 2025-07-09 19:08:20 +02:00
babymsp2k c077231c6b event se připravuje příkaz 2025-07-09 19:05:06 +02:00
dependabot[bot] 741494eb70 deps: bump org.junit.platform:junit-platform-launcher
---
updated-dependencies:
- dependency-name: org.junit.platform:junit-platform-launcher
  dependency-version: 1.13.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-07 06:46:48 +00:00
3 changed files with 45 additions and 9 deletions
+4 -4
View File
@@ -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'
}
@@ -71,16 +71,16 @@ repositories {
dependencies {
compileOnly 'io.papermc.paper:paper-api:1.21.4-R0.1-SNAPSHOT'
compileOnly 'com.github.spotbugs:spotbugs-annotations:4.9.3'
compileOnly 'com.github.spotbugs:spotbugs-annotations:4.9.8'
implementation 'io.papermc:paperlib:1.0.8'
compileOnly 'com.sk89q.worldguard:worldguard-bukkit:7.0.9'
compileOnly 'com.sk89q.worldedit:worldedit-bukkit:7.2.15'
compileOnly 'me.clip:placeholderapi:2.11.6'
spotbugsPlugins 'com.h3xstream.findsecbugs:findsecbugs-plugin:1.14.0'
testCompileOnly 'com.github.spotbugs:spotbugs-annotations:4.9.3'
testCompileOnly 'com.github.spotbugs:spotbugs-annotations:4.9.8'
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");