Refactored Generation and class structure
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package eu.mhsl.minenet.minigames.command.anonymous;
|
||||
|
||||
import net.minestom.server.command.builder.Command;
|
||||
import net.minestom.server.command.builder.arguments.ArgumentType;
|
||||
import net.minestom.server.entity.Player;
|
||||
import net.minestom.server.entity.PlayerSkin;
|
||||
|
||||
public class SkinCommand extends Command {
|
||||
public SkinCommand() {
|
||||
super("skin");
|
||||
|
||||
addSyntax((sender, context) -> {
|
||||
if(sender instanceof Player p) {
|
||||
p.setSkin(PlayerSkin.fromUsername(context.getRaw("target")));
|
||||
}
|
||||
}, ArgumentType.Entity("target").onlyPlayers(true).onlyPlayers(true));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user