mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 09:47:38 +00:00
Searchitem use fawe prefix
This commit is contained in:
parent
1d6f2e4274
commit
8de18566c0
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
package com.sk89q.worldedit.command;
|
package com.sk89q.worldedit.command;
|
||||||
|
|
||||||
|
import com.boydti.fawe.config.BBC;
|
||||||
import com.google.common.collect.Sets;
|
import com.google.common.collect.Sets;
|
||||||
import com.sk89q.minecraft.util.commands.Command;
|
import com.sk89q.minecraft.util.commands.Command;
|
||||||
import com.sk89q.minecraft.util.commands.CommandContext;
|
import com.sk89q.minecraft.util.commands.CommandContext;
|
||||||
@ -169,26 +170,26 @@ public class GeneralCommands {
|
|||||||
actor.print(type.getId() + " (" + type.getName() + ")");
|
actor.print(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(BBC.getPrefix() + "Enter a longer search string (len > 2).");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
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(BBC.getPrefix() + "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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -210,7 +211,7 @@ public class GeneralCommands {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (found == 0) {
|
if (found == 0) {
|
||||||
actor.printError("No items found.");
|
actor.printError(BBC.getPrefix() + "No items found.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user