13
0

Add Overwrite Warning #144

Zusammengeführt
Chaoscaot hat 2 Commits von overwrite_warning nach master 2023-02-20 12:19:24 +01:00 zusammengeführt
Nur Änderungen aus Commit f6bba7eaea werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -161,7 +161,7 @@ public class SchematicCommand extends SWCommand {
@Register("save") @Register("save")
@Register("s") @Register("s")
public void saveSchem(Player player, @Mapper("stringMapper") String name, @OptionalValue("false") boolean overwrite) { public void saveSchem(Player player, @Mapper("stringMapper") String name, @StaticValue(value = {"", "-f"}, allowISE=true) @OptionalValue("") boolean overwrite) {
SteamwarUser user = getUser(player); SteamwarUser user = getUser(player);
if(BauServerInfo.isBauServer() && BauServerInfo.getOwnerId() != user.getId() && if(BauServerInfo.isBauServer() && BauServerInfo.getOwnerId() != user.getId() &&
(Punishment.isPunished(user, Punishment.PunishmentType.NoSchemReceiving, punishment -> (Punishment.isPunished(user, Punishment.PunishmentType.NoSchemReceiving, punishment ->
@ -767,7 +767,9 @@ public class SchematicCommand extends SWCommand {
return new TypeMapper<String>() { return new TypeMapper<String>() {
@Override @Override
public List<String> tabCompletes(CommandSender commandSender, String[] strings, String s) { public List<String> tabCompletes(CommandSender commandSender, String[] strings, String s) {
return SchematicNode.getNodeTabcomplete(getUser((Player) commandSender), s); List<String> list = SchematicNode.getNodeTabcomplete(getUser((Player) commandSender), s);
list.add(s);
return list;
} }
@Override @Override