Essentials/EssentialsSpawn/src/main/java/com/earth2me/essentials/spawn/Commandsetspawn.java
Josh Roy 388d571da9
We're going on an Adventure! (#4717)
https://user-images.githubusercontent.com/10731363/147530817-f9adc58e-18a5-49ed-84c6-106e51d6948f.mp4
Add support for chat components throughout EssentialsX using the Adventure library.  
Translations have been converted to the MiniMessage format, and custom message files will be migrated on startup.  
This also introduces new options to allow players to see messages in their own language and for server owners to change the main message colours without editing message files.

Closes #2029
Closes #2391

---------

Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>
Co-authored-by: pop4959 <pop4959@gmail.com>
2024-02-03 20:38:14 +00:00

28 lines
914 B
Java

package com.earth2me.essentials.spawn;
import com.earth2me.essentials.CommandSource;
import com.earth2me.essentials.User;
import com.earth2me.essentials.commands.EssentialsCommand;
import org.bukkit.Server;
import java.util.Collections;
import java.util.List;
public class Commandsetspawn extends EssentialsCommand {
public Commandsetspawn() {
super("setspawn");
}
@Override
public void run(final Server server, final User user, final String commandLabel, final String[] args) {
final String group = args.length > 0 ? getFinalArg(args, 0) : "default";
((SpawnStorage) module).setSpawn(user.getLocation(), group);
user.sendTl("spawnSet", group);
}
@Override
protected List<String> getTabCompleteOptions(final Server server, final CommandSource sender, final String commandLabel, final String[] args) {
return Collections.emptyList();
}
}