mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-09-27 15:22:37 +02:00
388d571da9
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>
28 lines
914 B
Java
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();
|
|
}
|
|
}
|