Update
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package lnmpro.Commands;
|
||||
|
||||
import lnmpro.Main;
|
||||
import lnmpro.Utils.Kits;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
@@ -24,6 +25,7 @@ public class AcceptDuelCommand implements CommandExecutor, TabCompleter {
|
||||
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String s, @NotNull String[] args) {
|
||||
if (sender instanceof Player player) {
|
||||
if (player.hasMetadata("DueledBy")) {
|
||||
Kits kitManager = new Kits(plugin);
|
||||
UUID targetUUID = UUID.fromString(player.getMetadata("DueledBy").get(0).asString());
|
||||
Player enemy = Bukkit.getPlayer(targetUUID);
|
||||
String gamemode = player.getMetadata("DueledWithGamemode").get(0).asString();
|
||||
@@ -31,6 +33,7 @@ public class AcceptDuelCommand implements CommandExecutor, TabCompleter {
|
||||
player.sendMessage("cica " + gamemode);
|
||||
player.removeMetadata("DueledBy", plugin);
|
||||
player.removeMetadata("DueledWithGamemode", plugin);
|
||||
player.getInventory().setContents(kitManager.getMaceKit(player).getContents());
|
||||
}
|
||||
} else {
|
||||
sender.sendMessage("nem vagy player nem fog sikerulni");
|
||||
|
||||
Reference in New Issue
Block a user