Merge pull request #6 from N0tMyFaultOG/master

Minor fixes
Dieser Commit ist enthalten in:
Jesse Boyd 2018-10-05 01:46:42 +10:00 committet von GitHub
Commit 75c111e67a
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23
4 geänderte Dateien mit 9 neuen und 9 gelöschten Zeilen

Datei anzeigen

@ -46,7 +46,7 @@ public class Updater {
Fawe.debug("Updated FAWE to " + versionString + " @ " + pendingFile); Fawe.debug("Updated FAWE to " + versionString + " @ " + pendingFile);
String url = "https://empcraft.com/fawe/cl?" + Integer.toHexString(Fawe.get().getVersion().hash); String url = "https://empcraft.com/fawe/cl?" + Integer.toHexString(Fawe.get().getVersion().hash);
new Message().prefix().text("A FAWE update is available:") new Message().prefix().text("A FAWE update is available:")
.text("\n&8 - &a/fawe update &8 - &7Update the plugin") .text("\n&8 - &a/fawe update &8 - &7Updates the plugin and restarts the server to apply the changes")
.cmdTip("fawe update") .cmdTip("fawe update")
.text("\n&8 - &a/fawe changelog") .text("\n&8 - &a/fawe changelog")
.cmdTip("fawe changelog") .cmdTip("fawe changelog")

Datei anzeigen

@ -264,7 +264,7 @@ public class OptionsCommands {
ItemType type = ItemTypes.get(query); ItemType type = ItemTypes.get(query);
if (type != null) { if (type != null) {
actor.print(type.getId() + " (" + type.getName() + ")"); actor.print(BBC.getPrefix() + "#" + type.getId() + " (" + type.getName() + ")");
} else { } else {
if (query.length() <= 2) { if (query.length() <= 2) {
actor.printError("Enter a longer search string (len > 2)."); actor.printError("Enter a longer search string (len > 2).");
@ -272,21 +272,21 @@ public class OptionsCommands {
} }
if (!blocksOnly && !itemsOnly) { if (!blocksOnly && !itemsOnly) {
actor.print("Searching for: " + query); actor.print(BBC.getPrefix() + "Searching for: " + query);
} else if (blocksOnly && itemsOnly) { } else if (blocksOnly && itemsOnly) {
actor.printError("You cannot use both the 'b' and 'i' flags simultaneously."); actor.printError("You cannot use both the 'b' and 'i' flags simultaneously.");
return; return;
} else if (blocksOnly) { } else if (blocksOnly) {
actor.print("Searching for blocks: " + query); actor.print(BBC.getPrefix() + "Searching for blocks: " + query);
} else { } else {
actor.print("Searching for items: " + query); actor.print(BBC.getPrefix() + "Searching for items: " + query);
} }
int found = 0; int found = 0;
for (ItemType searchType : ItemTypes.values) { for (ItemType searchType : ItemTypes.values) {
if (found >= 15) { if (found >= 15) {
actor.print("Too many results!"); actor.print(BBC.getPrefix() + "Too many results!");
break; break;
} }
@ -300,7 +300,7 @@ public class OptionsCommands {
for (String alias : Sets.newHashSet(searchType.getId(), searchType.getName())) { for (String alias : Sets.newHashSet(searchType.getId(), searchType.getName())) {
if (alias.contains(query)) { if (alias.contains(query)) {
actor.print(searchType.getId() + " (" + searchType.getName() + ")"); actor.print(BBC.getPrefix() + "#" + type.getId() + " (" + type.getName() + ")");
++found; ++found;
break; break;
} }

Datei anzeigen

@ -108,7 +108,7 @@ public abstract class BlockState implements BlockStateHolder<BlockState> {
type = BlockTypes.get(key); type = BlockTypes.get(key);
if (type == null) { if (type == null) {
String input = key.toString(); String input = key.toString();
throw new SuggestInputParseException("Unkown block for " + input, input, () -> Stream.of(BlockTypes.values) throw new SuggestInputParseException("Does not match a valid block type: " + input, input, () -> Stream.of(BlockTypes.values)
.filter(b -> b.getId().contains(input)) .filter(b -> b.getId().contains(input))
.map(e1 -> e1.getId()) .map(e1 -> e1.getId())
.collect(Collectors.toList()) .collect(Collectors.toList())

Datei anzeigen

@ -1055,7 +1055,7 @@ public enum BlockTypes implements BlockType {
} catch (NumberFormatException e) { } catch (NumberFormatException e) {
} catch (IndexOutOfBoundsException e) {} } catch (IndexOutOfBoundsException e) {}
throw new SuggestInputParseException("Unkown block for " + inputLower, inputLower, () -> Stream.of(BlockTypes.values) throw new SuggestInputParseException("Does not match a valid block type: " + inputLower, inputLower, () -> Stream.of(BlockTypes.values)
.filter(b -> b.getId().contains(inputLower)) .filter(b -> b.getId().contains(inputLower))
.map(e1 -> e1.getId()) .map(e1 -> e1.getId())
.collect(Collectors.toList()) .collect(Collectors.toList())