tptoffa sword mostmar teleportal

This commit is contained in:
2025-02-16 18:47:05 +01:00
parent c3799fa3b9
commit 5e03040b1b
9 changed files with 28 additions and 1 deletions

View File

@@ -1,7 +1,9 @@
package hu.jgj52.wolfFFA.Commands;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
@@ -26,6 +28,7 @@ public class WolfFfaCommand implements CommandExecutor, TabCompleter {
if (args.length > 1) {
Player target = Bukkit.getPlayer(args[1]);
if (target instanceof Player player) {
player.getInventory().clear();
ItemStack helmet = new ItemStack(Material.DIAMOND_HELMET);
ItemStack chestplate = new ItemStack(Material.DIAMOND_CHESTPLATE);
ItemStack leggings = new ItemStack(Material.DIAMOND_LEGGINGS);
@@ -39,7 +42,16 @@ public class WolfFfaCommand implements CommandExecutor, TabCompleter {
sword.addEnchantment(Enchantment.UNBREAKING, 3);
player.getInventory().setArmorContents(new ItemStack[]{boots, leggings, chestplate, helmet});
player.getInventory().addItem(sword);
player.getInventory().setItem(0, sword);
World world = Bukkit.getWorld("world");
double x = 0;
double y = 1;
double z = 1000;
float yaw = (float) 0;
float pitch = (float) 0;
Location loc = new Location(world, x, y, z, yaw, pitch);
player.teleport(loc);
}
}
break;

BIN
target/WolfFFA-1.0.jar Normal file

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,8 @@
name: WolfFFA
version: '1.0'
main: hu.jgj52.wolfFFA.WolfFFA
api-version: '1.21'
commands:
tptoffa:
permission: wolfffa.admin.tptoffa
usage: /tptoffa <ffa> <player>

View File

@@ -0,0 +1,3 @@
artifactId=WolfFFA
groupId=hu.jgj52
version=1.0

View File

@@ -0,0 +1,2 @@
hu/jgj52/wolfFFA/WolfFFA.class
hu/jgj52/wolfFFA/Commands/WolfFfaCommand.class

View File

@@ -0,0 +1,2 @@
/home/jgj52/IdeaProjects/WolfFFA/src/main/java/hu/jgj52/wolfFFA/Commands/WolfFfaCommand.java
/home/jgj52/IdeaProjects/WolfFFA/src/main/java/hu/jgj52/wolfFFA/WolfFFA.java

Binary file not shown.