Code Patterns

Copy-paste examples for common plugin tasks. Commands, events, ECS, GUI, and more.

← Back to Patterns
command

Spawn Command

/spawn command using AbstractCommand

Example Code

java
package dev.myplugin.example;

import com.hypixel.hytale.server.core.command.system.basecommands.AbstractCommandCollection;

public class ExampleCommand extends AbstractCommandCollection {

	public ExampleCommand() {
		super("spawn", "Commands to manage loot in the world.");
		this.addSubCommand(new AddSpawnPointCommand());
		this.addSubCommand(new ShowSpawnPoints());
	}
}