Fixes some incorrect class casts
All checks were successful
KnarCraft/DynmapCitizens/pipeline/head This commit looks good
All checks were successful
KnarCraft/DynmapCitizens/pipeline/head This commit looks good
This commit is contained in:
parent
2ca73252cc
commit
459c25c5cd
@ -8,6 +8,7 @@ import net.citizensnpcs.api.npc.NPCRegistry;
|
|||||||
import net.knarcraft.dynmapcitizens.util.QuestsHelper;
|
import net.knarcraft.dynmapcitizens.util.QuestsHelper;
|
||||||
import org.bukkit.DyeColor;
|
import org.bukkit.DyeColor;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
|
import org.bukkit.entity.EntityType;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
@ -70,7 +71,7 @@ public class QuestStagesInfoGenerator {
|
|||||||
StringBuilder questInfo = new StringBuilder();
|
StringBuilder questInfo = new StringBuilder();
|
||||||
int mobTypes = stage.getMobsToKill().size();
|
int mobTypes = stage.getMobsToKill().size();
|
||||||
for (int i = 0; i < mobTypes; i++) {
|
for (int i = 0; i < mobTypes; i++) {
|
||||||
questInfo.append("<li>Kill ").append(QuestsHelper.normalizeName(((DyeColor) stage.getMobsToKill().get(i)).name()));
|
questInfo.append("<li>Kill ").append(QuestsHelper.normalizeName(((EntityType) stage.getMobsToKill().get(i)).name()));
|
||||||
questInfo.append(" x ").append(stage.getMobNumToKill().get(i));
|
questInfo.append(" x ").append(stage.getMobNumToKill().get(i));
|
||||||
if (stage.getKillNames().size() > i) {
|
if (stage.getKillNames().size() > i) {
|
||||||
questInfo.append(" at ").append(stage.getKillNames().get(i));
|
questInfo.append(" at ").append(stage.getKillNames().get(i));
|
||||||
@ -124,7 +125,7 @@ public class QuestStagesInfoGenerator {
|
|||||||
int mobTamingEntries = stage.getMobsToTame().size();
|
int mobTamingEntries = stage.getMobsToTame().size();
|
||||||
for (int i = 0; i < mobTamingEntries; i++) {
|
for (int i = 0; i < mobTamingEntries; i++) {
|
||||||
questInfo.append("<li>Tame ").append(stage.getMobNumToTame().get(i)).append(" ").append(
|
questInfo.append("<li>Tame ").append(stage.getMobNumToTame().get(i)).append(" ").append(
|
||||||
QuestsHelper.normalizeName(((DyeColor) stage.getMobsToTame().get(i)).name())).append("</li>");
|
QuestsHelper.normalizeName(((EntityType) stage.getMobsToTame().get(i)).name())).append("</li>");
|
||||||
}
|
}
|
||||||
|
|
||||||
return questInfo.toString();
|
return questInfo.toString();
|
||||||
|
Loading…
Reference in New Issue
Block a user