tptoffa sword mostmar teleportal
This commit is contained in:
@@ -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
BIN
target/WolfFFA-1.0.jar
Normal file
Binary file not shown.
BIN
target/classes/hu/jgj52/wolfFFA/Commands/WolfFfaCommand.class
Normal file
BIN
target/classes/hu/jgj52/wolfFFA/Commands/WolfFfaCommand.class
Normal file
Binary file not shown.
BIN
target/classes/hu/jgj52/wolfFFA/WolfFFA.class
Normal file
BIN
target/classes/hu/jgj52/wolfFFA/WolfFFA.class
Normal file
Binary file not shown.
8
target/classes/plugin.yml
Normal file
8
target/classes/plugin.yml
Normal 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>
|
||||
3
target/maven-archiver/pom.properties
Normal file
3
target/maven-archiver/pom.properties
Normal file
@@ -0,0 +1,3 @@
|
||||
artifactId=WolfFFA
|
||||
groupId=hu.jgj52
|
||||
version=1.0
|
||||
@@ -0,0 +1,2 @@
|
||||
hu/jgj52/wolfFFA/WolfFFA.class
|
||||
hu/jgj52/wolfFFA/Commands/WolfFfaCommand.class
|
||||
@@ -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
|
||||
BIN
target/original-WolfFFA-1.0.jar
Normal file
BIN
target/original-WolfFFA-1.0.jar
Normal file
Binary file not shown.
Reference in New Issue
Block a user