Add motd
bug fixe around serelization of items (armor and off hand slots, nbt tags error) created command class, Class.java and ClassCommand.java for future of add of classes ig.
This commit is contained in:
parent
168eb600bc
commit
54f6377c10
29 changed files with 196 additions and 112 deletions
|
@ -2,7 +2,7 @@ package gq.unurled.raxen.commands.admin;
|
|||
|
||||
import de.tr7zw.nbtapi.NBTItem;
|
||||
import gq.unurled.raxen.Raxen;
|
||||
import gq.unurled.raxen.components.player.Attributes.Attributes;
|
||||
import gq.unurled.raxen.components.player.attributes.Attributes;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.command.Command;
|
||||
|
|
|
@ -42,6 +42,8 @@ public class SpawnEntity implements TabExecutor {
|
|||
EntityType type = EntityType.valueOf(args[0]);
|
||||
Entity e = player.getWorld().spawnEntity(player.getLocation(), type, false);
|
||||
setNameSpacedKeys(e, "&cName", 100, 100,0,50,0,100,0,100,0);
|
||||
e.setCustomName(color(args[1]));
|
||||
e.setCustomNameVisible(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
package gq.unurled.raxen.commands.player;
|
||||
|
||||
import gq.unurled.raxen.Raxen;
|
||||
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 gq.unurled.raxen.utils.Utils.error;
|
||||
|
||||
public class ClassCommand implements TabExecutor {
|
||||
|
||||
private Raxen main;
|
||||
|
||||
public ClassCommand(Raxen main) {
|
||||
this.main = main;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
|
||||
if(!(sender instanceof Player)) {
|
||||
error("The console can't execute this Command!");
|
||||
return true;
|
||||
}
|
||||
Player player = (Player) sender;
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable List<String> onTabComplete(@NotNull CommandSender sender, @NotNull Command command, @NotNull String alias, @NotNull String[] args) {
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
package gq.unurled.raxen.commands.player;
|
||||
|
||||
import gq.unurled.raxen.Raxen;
|
||||
import gq.unurled.raxen.components.player.Attributes.Attributes;
|
||||
import gq.unurled.raxen.components.player.attributes.Attributes;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue