tak funguj

This commit is contained in:
babymsp2k
2025-07-05 00:00:45 +02:00
parent 64f0086758
commit 6a694e4809
2 changed files with 48 additions and 7 deletions
@@ -21,28 +21,47 @@ public class EventCommand implements CommandExecutor {
return true; return true;
} }
if (!sender.hasPermission("trixinity.event.*")) {
sender.sendMessage(ChatColor.RED + "Nemáte oprávnění k použití tohoto příkazu!");
return true;
}
switch (args[0].toLowerCase()) { switch (args[0].toLowerCase()) {
case "build": case "build":
if (!sender.hasPermission("trixinity.event.build")) {
sender.sendMessage(ChatColor.RED + "Nemáte oprávnění k použití tohoto příkazu!");
return true;
}
handleBuild(sender, args); handleBuild(sender, args);
break; break;
case "pvp": case "pvp":
if (!sender.hasPermission("trixinity.event.pvp")) {
sender.sendMessage(ChatColor.RED + "Nemáte oprávnění k použití tohoto příkazu!");
return true;
}
handlePvP(sender, args); handlePvP(sender, args);
break; break;
case "spawn": case "spawn":
if (!sender.hasPermission("trixinity.event.spawn")) {
sender.sendMessage(ChatColor.RED + "Nemáte oprávnění k použití tohoto příkazu!");
return true;
}
handleSpawn(sender, args); handleSpawn(sender, args);
break; break;
case "gmc": case "gmc":
if (!sender.hasPermission("trixinity.event.gamemode")) {
sender.sendMessage(ChatColor.RED + "Nemáte oprávnění k použití tohoto příkazu!");
return true;
}
handleGamemode(sender); handleGamemode(sender);
break; break;
case "heal": case "heal":
if (!sender.hasPermission("trixinity.event.heal")) {
sender.sendMessage(ChatColor.RED + "Nemáte oprávnění k použití tohoto příkazu!");
return true;
}
handleHeal(sender, args); handleHeal(sender, args);
break; break;
case "teleport": case "teleport":
if (!sender.hasPermission("trixinity.event.teleport")) {
sender.sendMessage(ChatColor.RED + "Nemáte oprávnění k použití tohoto příkazu!");
return true;
}
handleTeleport(sender, args); handleTeleport(sender, args);
break; break;
default: default:
+24 -2
View File
@@ -9,6 +9,7 @@ commands:
trixinity: trixinity:
description: Zobrazí základní informace o pluginu description: Zobrazí základní informace o pluginu
usage: "/trixinity" usage: "/trixinity"
permission: trixinity.admin
event: event:
description: Správa event systému description: Správa event systému
usage: | usage: |
@@ -23,11 +24,14 @@ commands:
§c§l- §cWorldEdit příkazy §c§l- §cWorldEdit příkazy
§c§m--------------------------------- §c§m---------------------------------
aliases: [e] aliases: [e]
permission: trixinity.event.admin
permissions: permissions:
trixinity.admin: trixinity.admin:
description: Přístup ke všem příkazům pluginu description: Přístup ke všem příkazům pluginu
default: op default: op
trixinity.event.*: children:
trixinity.event.admin: true
trixinity.event.admin:
description: Přístup ke všem event příkazům description: Přístup ke všem event příkazům
default: op default: op
children: children:
@@ -36,4 +40,22 @@ permissions:
trixinity.event.spawn: true trixinity.event.spawn: true
trixinity.event.gamemode: true trixinity.event.gamemode: true
trixinity.event.heal: true trixinity.event.heal: true
trixinity.event.teleport: true trixinity.event.teleport: true
trixinity.event.build:
description: Povolení pro build příkazy
default: op
trixinity.event.pvp:
description: Povolení pro pvp příkazy
default: op
trixinity.event.spawn:
description: Povolení pro spawn příkazy
default: op
trixinity.event.gamemode:
description: Povolení pro gamemode příkazy
default: op
trixinity.event.heal:
description: Povolení pro heal příkazy
default: op
trixinity.event.teleport:
description: Povolení pro teleport příkazy
default: op