Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
Ursprung
3ef7812aa7
Commit
3e2b22be02
@ -61,7 +61,7 @@ public class MultiReplaceCommand extends SWCommand {
|
|||||||
|
|
||||||
Map<String, String> stringReplacements = new HashMap<>();
|
Map<String, String> stringReplacements = new HashMap<>();
|
||||||
for (Replacement replacement : replacements) {
|
for (Replacement replacement : replacements) {
|
||||||
stringReplacements.put(replacement.from.name(), replacement.to.name());
|
stringReplacements.put("minecraft:" + replacement.from.name().toLowerCase(), "minecraft:" + replacement.to.name().toLowerCase());
|
||||||
}
|
}
|
||||||
|
|
||||||
Region region = WorldEditUtils.getRegion(player);
|
Region region = WorldEditUtils.getRegion(player);
|
||||||
@ -96,7 +96,7 @@ public class MultiReplaceCommand extends SWCommand {
|
|||||||
public Collection<String> tabCompletes(CommandSender commandSender, String[] strings, String s) {
|
public Collection<String> tabCompletes(CommandSender commandSender, String[] strings, String s) {
|
||||||
int index = s.indexOf(":");
|
int index = s.indexOf(":");
|
||||||
if (index != -1 && index == s.lastIndexOf(":")) {
|
if (index != -1 && index == s.lastIndexOf(":")) {
|
||||||
return materials.stream().map(Material::name).map(t -> s + t).collect(Collectors.toList());
|
return materials.stream().map(Material::name).map(t -> s.substring(0, index + 1) + t).collect(Collectors.toList());
|
||||||
} else if (index == -1) {
|
} else if (index == -1) {
|
||||||
return materials.stream().map(Material::name).collect(Collectors.toList());
|
return materials.stream().map(Material::name).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
@ -30,8 +30,6 @@ import org.bukkit.Bukkit;
|
|||||||
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
|
||||||
import java.util.function.Function;
|
|
||||||
|
|
||||||
public class SpecialReplace implements Mask, Pattern {
|
public class SpecialReplace implements Mask, Pattern {
|
||||||
|
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren