changes on drone + some command not finished

This commit is contained in:
unurled 2022-11-21 10:22:43 +01:00
parent e2ba50feb8
commit 25dcd2f02e
3 changed files with 88 additions and 3 deletions

View file

@ -19,7 +19,8 @@ steps:
- name: build
commands:
- ls -a
- gradle assemble --stacktrace
- chmod +x gradlew
- ./gradlew assemble --stacktrace
- ls -a
- name: gitea_release

View file

@ -1,2 +1,40 @@
package me.unurled.raxen.commands.admin;public class EntitiyCommand {
package me.unurled.raxen.commands.admin;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.command.TabExecutor;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.List;
public class EntitiyCommand implements TabExecutor {
/**
* Get the egg spawn of a custom entity :)
* @param sender Source of the command
* @param command Command which was executed
* @param label Alias of the command which was used
* @param args Passed command arguments
* @return
*/
@Override
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
return false;
}
/**
* @param sender Source of the command. For players tab-completing a
* command inside a command block, this will be the player, not
* the command block.
* @param command Command which was executed
* @param label Alias of the command which was used
* @param args The arguments passed to the command, including final
* partial argument to be completed
* @return
*/
@Override
public @Nullable List<String> onTabComplete(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
return null;
}
}

View file

@ -1,2 +1,48 @@
package me.unurled.raxen.commands.admin;public class ItemTo64 {
package me.unurled.raxen.commands.admin;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.command.TabExecutor;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.List;
import static me.unurled.raxen.utils.Utils.*;
import static me.unurled.raxen.utils.Items.itemTo64;
public class ItemTo64Command implements TabExecutor {
/**
* @param sender Source of the command
* @param command Command which was executed
* @param label Alias of the command which was used
* @param args Passed command arguments
* @return
*/
@Override
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
if (sender instanceof Player p) {
msgPlayer(p, itemTo64(p.getInventory().getItemInMainHand()));
} else {
errorConsoleSender(sender);
return true;
}
return false;
}
/**
* @param sender Source of the command. For players tab-completing a
* command inside of a command block, this will be the player, not
* the command block.
* @param command Command which was executed
* @param label Alias of the command which was used
* @param args The arguments passed to the command, including final
* partial argument to be completed
* @return
*/
@Override
public @Nullable List<String> onTabComplete(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
return null;
}
}