Small update to refine Discord features and narrow down searches.

This commit is contained in:
sigonasr2 2017-10-03 18:56:43 -05:00
parent 88d3e8ccff
commit c60070a6ad
3 changed files with 13 additions and 8 deletions

Binary file not shown.

View File

@ -5773,7 +5773,7 @@ public class GenericFunctions {
boolean found=false; boolean found=false;
ItemContainer currentItem = items.get(i); ItemContainer currentItem = items.get(i);
boolean matchesAll=true; boolean matchesAll=true;
String displayName = GenericFunctions.UserFriendlyMaterialName(currentItem.getItem()); String displayName = GenericFunctions.UserFriendlyMaterialName(currentItem.getItem())+(TwosideKeeperAPI.isSetItem(currentItem.getItem())?" (T"+TwosideKeeperAPI.getItemTier(currentItem.getItem())+")":"")+(currentItem.getAmount()>1?ChatColor.YELLOW+" x"+currentItem.getAmount():"");
for (String s : filters) { for (String s : filters) {
if (!displayName.toLowerCase().contains(s.toLowerCase())) { if (!displayName.toLowerCase().contains(s.toLowerCase())) {
//TwosideKeeper.log("Cannot find "+s+" in "+displayName, 1); //TwosideKeeper.log("Cannot find "+s+" in "+displayName, 1);

View File

@ -1386,7 +1386,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
/*MonsterTemplate newtemp = new MonsterTemplate(new File(filesave+"/monsterdata/KingSlime.md")); /*MonsterTemplate newtemp = new MonsterTemplate(new File(filesave+"/monsterdata/KingSlime.md"));
int newint = (int)newtemp.getValue("timeToLive"); int newint = (int)newtemp.getValue("timeToLive");
log(Integer.toString(newint),0);*/ log(Integer.toString(newint),0);*/
log(" lolol. This is here to change the file size if necessary Kappa Kappa Kappa No Copy-pasterino Kappachino Lulu c: Please update version number. lololol cy@ storm is boosted. This is nice.",5); log(" lolol. This is here to change the file size if necessary Kappa Kappa Kappa No Copy-pasterino Kappachino Lulu c: Please update version number. lololol cy@ storm is boosted. This is nice. Hey look! It's my favorite streamer! The one and only >>Legendary<<, yes LEGENDARY Captain_Marrow aka Storm! We break ultimate plates, alchemize Artifacts, miss skillshots, break Master Swords, collect food because we cannot dodge the Ganon, deny our combat-buddies from keeping their legendary equipment, jump off boats right before they leave ( cy@ VoHiYo ), craft expensive male costumes when every guildie's a female xD, and make new daddy memes for his Dad! Come join the fun! Kappa",5);
} }
private static void InitializeBotCommands() { private static void InitializeBotCommands() {
@ -1428,20 +1428,25 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
},"roll"); },"roll");
aPlugin.API.addCommand(args->{ aPlugin.API.addCommand(args->{
List<ItemStack> recyclingCenterItems = populateRecyclingCenterItems(); List<ItemStack> recyclingCenterItems = populateRecyclingCenterItems();
if (args.length==0) { if (args.length==1) {
//Get a master list of all Recycling Center items. //Get a master list of all Recycling Center items.
aPlugin.API.discordSendRaw("'''\n"+ aPlugin.API.discordSendRaw("```\n"+
GenericFunctions.generateItemList( GenericFunctions.generateItemList(
GenericFunctions.getItemList(recyclingCenterItems) GenericFunctions.getItemList(recyclingCenterItems)
)+"\n'''" )+"\n```"
); );
} else { } else {
//Try to use the search phrase given. //Try to use the search phrase given.
aPlugin.API.discordSendRaw("'''\n"+ String[] newargs = new String[args.length-1];
for (int i=1;i<args.length;i++) {
newargs[i-1]=args[i];
}
args = newargs;
aPlugin.API.discordSendRaw("```\n"+
GenericFunctions.generateItemList( GenericFunctions.generateItemList(
GenericFunctions.getItemList(recyclingCenterItems) GenericFunctions.getItemList(recyclingCenterItems)
,args ,args
)+"\n'''" )+"\n```"
); );
} }
},"search"); },"search");
@ -1753,7 +1758,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
) )
); );
} else { } else {
//Try to use the search phrase given. //Try to use the search phrase given. abc
sender.sendMessage(GenericFunctions.generateItemList( sender.sendMessage(GenericFunctions.generateItemList(
GenericFunctions.getItemList(recyclingCenterItems) GenericFunctions.getItemList(recyclingCenterItems)
,args ,args