Minor changes.
This commit is contained in:
parent
e258644a20
commit
2b9d6c0160
|
|
@ -70,8 +70,8 @@ public final class AQuest extends JavaPlugin {
|
|||
getServer().getPluginManager().registerEvents(new DonNotMessWithNPC(), this);
|
||||
getServer().getPluginManager().registerEvents(new DataLock(), this);
|
||||
getServer().getPluginManager().registerEvents(new ItemCaught(), this);
|
||||
getServer().getPluginManager().registerEvents(new PotionBrewingStarted(), this);
|
||||
getServer().getPluginManager().registerEvents(new PotionBrewingFinished(), this);
|
||||
// getServer().getPluginManager().registerEvents(new PotionBrewingStarted(), this);
|
||||
// getServer().getPluginManager().registerEvents(new PotionBrewingFinished(), this);
|
||||
getServer().getPluginManager().registerEvents(new FinishedRaid(), this);
|
||||
|
||||
// getServer().getMessenger().registerOutgoingPluginChannel(this, "aquest:player-data");
|
||||
|
|
|
|||
|
|
@ -172,12 +172,8 @@ public class QuestsConfig extends AbstractConfig {
|
|||
Set<String> keys = configurationSection.getKeys(false);
|
||||
for (String key : keys) {
|
||||
try {
|
||||
if (configurationSection.getString(key + ".item") == null) {
|
||||
item = null;
|
||||
}
|
||||
else {
|
||||
item = Material.valueOf(configurationSection.getString(key + ".item"));
|
||||
}
|
||||
|
||||
if (configurationSection.getString(key + ".mob") == null) {
|
||||
entityType = null;
|
||||
}
|
||||
|
|
@ -203,8 +199,6 @@ public class QuestsConfig extends AbstractConfig {
|
|||
}
|
||||
}
|
||||
OTHER_QUEST_NAME = config.getString("other.name", OTHER_QUEST_NAME);
|
||||
//OTHER_STEP_1 = config.getString("other.step-1", OTHER_STEP_1);
|
||||
//OTHER_STEP_2 = config.getString("other.step-2", OTHER_STEP_2);
|
||||
OTHER_TURN_IN = config.getString("other.turn-in", OTHER_TURN_IN);
|
||||
OTHER_COMMANDS = config.getStringList("other.commands", OTHER_COMMANDS);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ public class FinishedRaid implements Listener {
|
|||
if (dailyQuest == null || dailyQuest.isDone()) {
|
||||
return;
|
||||
}
|
||||
if (dailyQuest instanceof OtherQuest otherQuest) { // check if dailyQuest.getVariant().getName()) == Raidquest
|
||||
if (dailyQuest instanceof OtherQuest otherQuest) {
|
||||
otherQuest.raid();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ import net.kyori.adventure.text.minimessage.MiniMessage;
|
|||
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
||||
import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver;
|
||||
import org.bukkit.DyeColor;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
|
|
@ -150,7 +149,6 @@ public class OtherQuest extends Quest {
|
|||
@Override
|
||||
public Component getDisplayName() {
|
||||
return MiniMessage.miniMessage().deserialize("<green>%s</green>".formatted( otherQuestObject.getCategory()));
|
||||
//return MiniMessage.miniMessage().deserialize("%s<green>: </green>%s".formatted(QuestsConfig.OTHER_QUEST_NAME, otherQuestObject.getCategory()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -190,20 +188,20 @@ public class OtherQuest extends Quest {
|
|||
}
|
||||
|
||||
public void raid(){
|
||||
if (isDone() || getAmount() == getStep1() || otherQuestObject.getCategory() != "Raid") {
|
||||
if (isDone() || getAmount() == getStep1() || !Objects.equals(otherQuestObject.getCategory(), "Raid")) { //without checking the category, other players who have otherQuests active will also have a step added
|
||||
return;
|
||||
}
|
||||
addStep1(1);
|
||||
checkDone();
|
||||
}
|
||||
|
||||
public void brewingStarted(ItemStack ingredient, Location brewingStandLocation){
|
||||
Logger.warning("Brewing Started");
|
||||
}
|
||||
//public void brewingStarted(ItemStack ingredient, Location brewingStandLocation){
|
||||
// Logger.warning("Brewing Started");
|
||||
//}
|
||||
|
||||
public void brewingFinished(List <ItemStack> results, Location brewingStandLocation) {
|
||||
Logger.warning("Brewing Finished");
|
||||
}
|
||||
//public void brewingFinished(List <ItemStack> results, Location brewingStandLocation) {
|
||||
// Logger.warning("Brewing Finished");
|
||||
//}
|
||||
|
||||
public static List<String> getSubTypes() {
|
||||
return QuestsConfig.OTHER_QUEST.stream().map(Variant::getInternalName).collect(Collectors.toList());
|
||||
|
|
@ -215,7 +213,6 @@ public class OtherQuest extends Quest {
|
|||
try {
|
||||
return DyeColor.valueOf(colorName);
|
||||
} catch (IllegalArgumentException ignored) {
|
||||
// This will be thrown if the color name doesn't match the enum
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
|
|
|||
|
|
@ -41,10 +41,6 @@ public class ProgressBookOpener {
|
|||
dailyQuest.getTagResolvers()
|
||||
);
|
||||
List<String> pages = new ArrayList<>();
|
||||
// if (dailyQuest.isDone())
|
||||
// pages.addAll(dailyQuest.getDonePages());
|
||||
// else
|
||||
// pages.addAll(dailyQuest.getQuestPages());
|
||||
pages.addAll(Config.PROGRESS_PAGES);
|
||||
return (pages.stream()
|
||||
.map(page -> miniMessage.deserialize(page, tagResolver))
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user