mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 02:37:27 +00:00
Added configurable dialog image limit to IDialog.addImage(id,image)
This commit is contained in:
1 parent
40a210ce8f
commit
4cae85e50b
1 file changed
+5
@@ -7,6 +7,7 @@ import java.util.List;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import noppes.npcs.CustomNpcs;
|
||||
import noppes.npcs.ICompatibilty;
|
||||
import noppes.npcs.VersionCompatibility;
|
||||
import noppes.npcs.constants.EnumOptionType;
|
||||
@@ -529,6 +530,10 @@ public class Dialog implements ICompatibilty, IDialog {
|
||||
}
|
||||
|
||||
public void addImage(int id, IDialogImage image) {
|
||||
if (dialogImages.size() >= CustomNpcs.DialogImageLimit) {
|
||||
return;
|
||||
}
|
||||
|
||||
((DialogImage) image).id = id;
|
||||
dialogImages.put(id, image);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user