|
RuneHive-Game
|
Represents a factory class that contains important functions for building dialogues. More...
Public Member Functions | |
| void | clear () |
Clears the current dialogue chain. | |
| DialogueFactory (Player player) | |
Creates a new DialogueFactory. | |
| final DialogueFactory | execute () |
| Retrieves the next dialogue in the chain and executes it. | |
| final DialogueFactory | executeOption (int type, Optional< OptionDialogue > result) |
Executes an result for a player. | |
| final Queue< Chainable > | getChain () |
| Gets the current chain. | |
| Optional< Runnable > | getNextAction () |
Gets the Optional describing the next action in the dialogue chain. | |
| Player | getPlayer () |
| The player that owns this factory. | |
| boolean | isActive () |
| boolean | isOption () |
| Gets if the dialogue is option. | |
| void | lock (boolean lock) |
| final DialogueFactory | onAction (Runnable action) |
Sets an action so this action can be executed after dialogues are done. | |
| DialogueFactory | onNext () |
| Accepts the next dialogue in the chain. | |
| final DialogueFactory | sendDialogue (Dialogue dialogue) |
| Sends a player a dialogue. | |
| final DialogueFactory | sendInformationBox (String title, String...lines) |
| final DialogueFactory | sendItem (String title, String text, int item) |
| final DialogueFactory | sendItem (String title, String text, Item item) |
| final DialogueFactory | sendNpcChat (int id, Expression expression, String... lines) |
Appends an NpcDialogue to the current dialogue chain. | |
| final DialogueFactory | sendNpcChat (int id, String... lines) |
Appends an NpcDialogue to the current dialogue chain. | |
| final DialogueFactory | sendOption (String option1, Runnable action1, String option2, Runnable action2) |
Appends the OptionDialogue onto the current dialogue chain. | |
| final DialogueFactory | sendOption (String option1, Runnable action1, String option2, Runnable action2, String option3, Runnable action3) |
Appends the OptionDialogue onto the current dialogue chain. | |
| final DialogueFactory | sendOption (String option1, Runnable action1, String option2, Runnable action2, String option3, Runnable action3, String option4, Runnable action4) |
Appends the OptionDialogue onto the current dialogue chain. | |
| final DialogueFactory | sendOption (String option1, Runnable action1, String option2, Runnable action2, String option3, Runnable action3, String option4, Runnable action4, String option5, Runnable action5) |
Appends the OptionDialogue onto the current dialogue chain. | |
| final DialogueFactory | sendPlayerChat (Expression expression, String... lines) |
Appends a PlayerDialogue to the current dialogue chain. | |
| final DialogueFactory | sendPlayerChat (String... lines) |
Appends a PlayerDialogue to the current dialogue chain. | |
| final DialogueFactory | sendStatement (String... lines) |
Appends a StatementDialogue to the current dialogue chain. | |
| void | setActive (boolean active) |
| void | setNextAction (Optional< Runnable > nextAction) |
| Sets the next action in the dialogue chain. | |
Package Functions | |
| final DialogueFactory | sendInformationBox (InformationDialogue dialogue) |
| final DialogueFactory | sendItem (ItemDialogue dialogue) |
| final DialogueFactory | sendNpcChat (NpcDialogue dialogue) |
| Sends a dialogue with a npc talking. | |
| final DialogueFactory | sendOption (OptionDialogue dialogue) |
| Sends a dialogue with options. | |
| final DialogueFactory | sendPlayerChat (PlayerDialogue dialogue) |
| Sends a dialogue with a player talking. | |
| final DialogueFactory | sendStatement (StatementDialogue dialogue) |
| Sends a player a statement dialogue. | |
Private Member Functions | |
| final DialogueFactory | append (Chainable chain) |
Appends a chain to this factory. | |
| final String | appendKeywords (String line) |
| Appends keywords to an existing dialogue text. | |
| final void | validateLength (String... text) |
The method that validates the length of text. | |
Private Attributes | |
| boolean | active |
| The flag that denotes dialogue is active. | |
| final Queue< Chainable > | CHAIN = new ArrayDeque<>() |
| The queue of dialogues in this factory. | |
| boolean | locked |
| Optional< Runnable > | nextAction = Optional.empty() |
| The next action in the dialogue chain. | |
| final Player | player |
| The player who owns this factory. | |
Static Private Attributes | |
| static final Logger | logger = LogManager.getLogger(DialogueFactory.class) |
| static final int | MAXIMUM_LENGTH = 500 |
| The maximum length of a single line of dialogue. | |
Represents a factory class that contains important functions for building dialogues.
Definition at line 19 of file DialogueFactory.java.
| com.runehive.content.dialogue.DialogueFactory.DialogueFactory | ( | Player | player | ) |
Creates a new DialogueFactory.
| player | The player who owns this factory. |
Definition at line 44 of file DialogueFactory.java.
References player.
Referenced by append(), execute(), executeOption(), onAction(), onNext(), sendDialogue(), sendInformationBox(), sendInformationBox(), sendItem(), sendItem(), sendItem(), sendNpcChat(), sendNpcChat(), sendNpcChat(), sendOption(), sendOption(), sendOption(), sendOption(), sendOption(), sendPlayerChat(), sendPlayerChat(), sendPlayerChat(), sendStatement(), and sendStatement().
|
private |
Appends a chain to this factory.
Definition at line 132 of file DialogueFactory.java.
References DialogueFactory().
Referenced by sendInformationBox(), sendItem(), sendItem(), sendNpcChat(), sendNpcChat(), sendOption(), sendOption(), sendOption(), sendOption(), sendPlayerChat(), sendPlayerChat(), and sendStatement().
|
private |
Appends keywords to an existing dialogue text.
| line | The line to check for a keyword. |
Definition at line 208 of file DialogueFactory.java.
References com.runehive.util.Utility.formatName(), and player.
Referenced by sendNpcChat(), and sendPlayerChat().
| void com.runehive.content.dialogue.DialogueFactory.clear | ( | ) |
Clears the current dialogue chain.
Definition at line 115 of file DialogueFactory.java.
References CHAIN, nextAction, player, and setActive().
Referenced by com.runehive.content.skill.impl.crafting.impl.Spinning.click(), com.runehive.content.skill.impl.slayer.SlayerOfferings.confirm(), com.runehive.content.skill.impl.crafting.impl.Stringing.craft(), com.runehive.net.packet.in.DropItemPacketListener.handlePacket(), com.runehive.content.store.impl.PersonalStore.modify(), com.runehive.content.skill.impl.slayer.SlayerOfferings.offer(), com.runehive.content.dialogue.impl.VoteDialogue.sendDialogues(), and com.runehive.content.clanchannel.channel.ClanChannelHandler.testPassword().
| final DialogueFactory com.runehive.content.dialogue.DialogueFactory.execute | ( | ) |
Retrieves the next dialogue in the chain and executes it.
Definition at line 161 of file DialogueFactory.java.
References DialogueFactory(), getChain(), getNextAction(), locked, player, setActive(), and setNextAction().
Referenced by com.runehive.content.pet.Pets.buyInsurance(), com.runehive.content.skill.impl.agility.obstacle.impl.WildernessDoorInteraction.canExecute(), com.runehive.content.skill.impl.agility.obstacle.ObstacleInteraction.canExecute(), com.runehive.content.dailyeffect.DailyEffect.canUse(), com.runehive.game.service.DonationService.claimDonation(), com.runehive.game.service.VoteService.claimReward(), com.runehive.content.skill.impl.crafting.impl.Spinning.click(), com.runehive.content.skill.impl.herblore.Herblore.clickItem(), com.runehive.content.activity.impl.barrows.Barrows.clickNpc(), com.runehive.content.skill.impl.firemaking.Firemaking.clickObject(), com.runehive.content.staff.PlayerManagement.confirm(), com.runehive.content.skill.impl.crafting.impl.Stringing.craft(), com.runehive.content.CrystalChest.createKey(), com.runehive.content.dialogue.impl.VoteDialogue.exchange(), com.runehive.content.skill.impl.thieving.Thieving.exchange(), executeOption(), com.runehive.content.skill.impl.fishing.FishingAction.fish(), com.runehive.net.packet.in.DropItemPacketListener.handlePacket(), com.runehive.content.shootingstar.ShootingStar.mine(), com.runehive.content.store.impl.PersonalStore.modify(), com.runehive.content.skill.impl.slayer.SlayerOfferings.offer(), com.runehive.content.bloodmoney.BloodMoneyChest.open(), com.runehive.content.Obelisks.open(), com.runehive.content.RoyaltyProgram.open(), com.runehive.game.world.items.containers.bank.BankPin.open(), com.runehive.content.preset.PresetManager.openSettings(), com.runehive.content.shootingstar.ShootingStar.prospect(), com.runehive.content.Waypoints.removeWaypoint(), com.runehive.content.DropDisplay.search(), com.runehive.content.clanchannel.channel.ClanChannelHandler.sendConnectionWarning(), com.runehive.content.dialogue.impl.ClanmasterDialogue.sendDialogues(), com.runehive.content.dialogue.impl.KamfreenaDialogue.sendDialogues(), com.runehive.content.dialogue.impl.LootshareDialogue.sendDialogues(), com.runehive.content.dialogue.impl.NieveDialogue.sendDialogues(), com.runehive.content.dialogue.impl.PrestigeDialogue.sendDialogues(), com.runehive.content.dialogue.impl.RoyalKingDialogue.sendDialogues(), com.runehive.content.dialogue.impl.VoteDialogue.sendDialogues(), com.runehive.content.dialogue.impl.WellOfGoodwillDialogue.sendDialogues(), com.runehive.content.dialogue.impl.ClanRankDialogue.setRank(), com.runehive.content.Waypoints.setWaypoint(), com.runehive.content.skill.impl.crafting.Crafting.start(), com.runehive.content.skill.impl.fletching.Fletching.start(), com.runehive.content.ai.AIDialogueHandler.streamGandalfResponse(), com.runehive.content.clanchannel.channel.ClanChannelHandler.testPassword(), com.runehive.content.skill.impl.thieving.WallSafe.thieve(), com.runehive.content.skill.impl.cooking.Cooking.useItem(), and com.runehive.content.skill.impl.herblore.Herblore.useItem().
| final DialogueFactory com.runehive.content.dialogue.DialogueFactory.executeOption | ( | int | type, |
| Optional< OptionDialogue > | result ) |
Executes an result for a player.
| type | The type of option. |
| result | The option to execute. |
Definition at line 96 of file DialogueFactory.java.
References DialogueFactory(), execute(), and com.runehive.content.dialogue.OptionDialogue.getActions().
| final Queue< Chainable > com.runehive.content.dialogue.DialogueFactory.getChain | ( | ) |
Gets the current chain.
Definition at line 142 of file DialogueFactory.java.
References CHAIN.
Referenced by execute(), isOption(), and onNext().
| Optional< Runnable > com.runehive.content.dialogue.DialogueFactory.getNextAction | ( | ) |
Gets the Optional describing the next action in the dialogue chain.
Definition at line 649 of file DialogueFactory.java.
References nextAction.
Referenced by execute().
| Player com.runehive.content.dialogue.DialogueFactory.getPlayer | ( | ) |
The player that owns this factory.
Definition at line 639 of file DialogueFactory.java.
References player.
Referenced by com.runehive.content.dialogue.impl.RoyalKingDialogue.claim(), com.runehive.content.dialogue.impl.ClanmasterDialogue.clanManagement(), com.runehive.content.dialogue.impl.VoteDialogue.exchange(), com.runehive.content.dialogue.impl.RoyalKingDialogue.myStats(), com.runehive.content.dialogue.impl.NieveDialogue.sell(), com.runehive.content.ai.AIDialogueHandler.sendDialogues(), com.runehive.content.dialogue.impl.ClanmasterDialogue.sendDialogues(), com.runehive.content.dialogue.impl.ClanRankDialogue.sendDialogues(), com.runehive.content.dialogue.impl.ConstructionDialogue.sendDialogues(), com.runehive.content.dialogue.impl.NieveDialogue.sendDialogues(), com.runehive.content.dialogue.impl.PrestigeDialogue.sendDialogues(), com.runehive.content.dialogue.impl.RoyalKingDialogue.sendDialogues(), com.runehive.content.dialogue.impl.VoteDialogue.sendDialogues(), com.runehive.content.dialogue.impl.WellOfGoodwillDialogue.sendDialogues(), and com.runehive.content.dialogue.impl.RoyalKingDialogue.store().
| boolean com.runehive.content.dialogue.DialogueFactory.isActive | ( | ) |
Definition at line 662 of file DialogueFactory.java.
References active.
| boolean com.runehive.content.dialogue.DialogueFactory.isOption | ( | ) |
Gets if the dialogue is option.
Definition at line 151 of file DialogueFactory.java.
References getChain().
| void com.runehive.content.dialogue.DialogueFactory.lock | ( | boolean | lock | ) |
Definition at line 71 of file DialogueFactory.java.
References lock().
Referenced by lock().
| final DialogueFactory com.runehive.content.dialogue.DialogueFactory.onAction | ( | Runnable | action | ) |
Sets an action so this action can be executed after dialogues are done.
| action | The action to set. |
Definition at line 66 of file DialogueFactory.java.
References DialogueFactory(), and setNextAction().
Referenced by com.runehive.content.store.impl.PersonalStore.edit(), com.runehive.content.store.impl.PersonalStore.modify(), com.runehive.game.plugin.PluginContext.onClick(), com.runehive.content.skill.impl.crafting.impl.Spinning.open(), com.runehive.content.preset.PresetManager.openSettings(), com.runehive.content.dialogue.impl.NieveDialogue.sell(), com.runehive.content.ai.AIDialogueHandler.sendDialogues(), com.runehive.content.dialogue.impl.ClanRankDialogue.sendDialogues(), com.runehive.content.dialogue.impl.ConstructionDialogue.sendDialogues(), com.runehive.content.dialogue.impl.NieveDialogue.sendDialogues(), com.runehive.content.dialogue.impl.WellOfGoodwillDialogue.sendDialogues(), com.runehive.content.ai.AIDialogueHandler.streamGandalfResponse(), and com.runehive.content.clanchannel.channel.ClanChannelHandler.testPassword().
| DialogueFactory com.runehive.content.dialogue.DialogueFactory.onNext | ( | ) |
Accepts the next dialogue in the chain.
Definition at line 80 of file DialogueFactory.java.
References DialogueFactory(), getChain(), and player.
| final DialogueFactory com.runehive.content.dialogue.DialogueFactory.sendDialogue | ( | Dialogue | dialogue | ) |
Sends a player a dialogue.
| dialogue | The dialogue to sent. |
Definition at line 53 of file DialogueFactory.java.
References DialogueFactory().
Referenced by com.runehive.content.ai.AIDialogueHandler.streamGandalfResponse().
|
package |
Definition at line 580 of file DialogueFactory.java.
References DialogueFactory(), logger, player, and validateLength().
| final DialogueFactory com.runehive.content.dialogue.DialogueFactory.sendInformationBox | ( | String | title, |
| String... | lines ) |
Definition at line 574 of file DialogueFactory.java.
References append(), DialogueFactory(), and validateLength().
Referenced by com.runehive.content.dialogue.InformationDialogue.accept(), and com.runehive.content.preset.PresetManager.openSettings().
|
package |
Definition at line 563 of file DialogueFactory.java.
References DialogueFactory(), player, and validateLength().
| final DialogueFactory com.runehive.content.dialogue.DialogueFactory.sendItem | ( | String | title, |
| String | text, | ||
| int | item ) |
Definition at line 557 of file DialogueFactory.java.
References append(), DialogueFactory(), and validateLength().
| final DialogueFactory com.runehive.content.dialogue.DialogueFactory.sendItem | ( | String | title, |
| String | text, | ||
| Item | item ) |
Definition at line 551 of file DialogueFactory.java.
References append(), DialogueFactory(), com.runehive.game.world.items.Item.getId(), and validateLength().
Referenced by com.runehive.content.dialogue.ItemDialogue.accept(), and com.runehive.content.CrystalChest.createKey().
| final DialogueFactory com.runehive.content.dialogue.DialogueFactory.sendNpcChat | ( | int | id, |
| Expression | expression, | ||
| String... | lines ) |
Appends an NpcDialogue to the current dialogue chain.
| id | The id of this npc. |
| expression | The expression of this npc. |
| lines | The text of this dialogue. |
Definition at line 313 of file DialogueFactory.java.
References append(), and DialogueFactory().
| final DialogueFactory com.runehive.content.dialogue.DialogueFactory.sendNpcChat | ( | int | id, |
| String... | lines ) |
Appends an NpcDialogue to the current dialogue chain.
| id | The id of this npc. |
| lines | The text of this dialogue. |
Definition at line 301 of file DialogueFactory.java.
References append(), com.runehive.content.dialogue.Expression.DEFAULT, and DialogueFactory().
Referenced by com.runehive.content.dialogue.NpcDialogue.accept(), com.runehive.content.pet.Pets.buyInsurance(), com.runehive.game.service.DonationService.claimDonation(), com.runehive.content.pet.Pets.claimLostPets(), com.runehive.content.dialogue.impl.ClanmasterDialogue.clanDefinition(), com.runehive.content.dialogue.impl.ClanmasterDialogue.clanManagement(), com.runehive.content.dialogue.impl.ClanmasterDialogue.clanPerks(), com.runehive.content.dialogue.impl.ClanmasterDialogue.clanTask(), com.runehive.content.activity.impl.barrows.Barrows.clickNpc(), com.runehive.content.dialogue.impl.VoteDialogue.exchange(), com.runehive.content.skill.impl.thieving.Thieving.exchange(), com.runehive.content.dialogue.impl.PrestigeDialogue.explainPerks(), com.runehive.content.dialogue.impl.PrestigeDialogue.explainPrestige(), com.runehive.content.skill.impl.slayer.SlayerOfferings.offer(), com.runehive.content.dialogue.impl.NieveDialogue.sell(), com.runehive.content.ai.AIDialogueHandler.sendDialogues(), com.runehive.content.dialogue.impl.ClanmasterDialogue.sendDialogues(), com.runehive.content.dialogue.impl.ConstructionDialogue.sendDialogues(), com.runehive.content.dialogue.impl.KamfreenaDialogue.sendDialogues(), com.runehive.content.dialogue.impl.NieveDialogue.sendDialogues(), com.runehive.content.dialogue.impl.PrestigeDialogue.sendDialogues(), com.runehive.content.dialogue.impl.RoyalKingDialogue.sendDialogues(), com.runehive.content.dialogue.impl.VoteDialogue.sendDialogues(), and com.runehive.content.ai.AIDialogueHandler.streamGandalfResponse().
|
package |
Sends a dialogue with a npc talking.
| dialogue | The dialogue. |
Definition at line 323 of file DialogueFactory.java.
References appendKeywords(), DialogueFactory(), com.runehive.game.world.entity.mob.npc.definition.NpcDefinition.get(), com.runehive.content.dialogue.Expression.getId(), com.runehive.game.world.entity.mob.npc.definition.NpcDefinition.getId(), com.runehive.game.world.entity.mob.npc.definition.NpcDefinition.getName(), logger, player, and validateLength().
|
package |
Sends a dialogue with options.
| dialogue | The dialogue. |
Definition at line 442 of file DialogueFactory.java.
References DialogueFactory(), player, and validateLength().
| final DialogueFactory com.runehive.content.dialogue.DialogueFactory.sendOption | ( | String | option1, |
| Runnable | action1, | ||
| String | option2, | ||
| Runnable | action2 ) |
Appends the OptionDialogue onto the current dialogue chain.
| option1 | The text for the first option. |
| action1 | The action for the first action. |
| option2 | The text for the second option. |
| action2 | The action for the second action. |
Definition at line 384 of file DialogueFactory.java.
References append(), and DialogueFactory().
Referenced by com.runehive.content.dialogue.OptionDialogue.accept(), com.runehive.content.dialogue.impl.ClanmasterDialogue.clanInformation(), com.runehive.content.dialogue.impl.ClanmasterDialogue.clanManagement(), com.runehive.content.dialogue.impl.ClanmasterDialogue.clanTask(), com.runehive.content.activity.impl.barrows.Barrows.clickNpc(), com.runehive.content.staff.PlayerManagement.confirm(), com.runehive.content.store.impl.PersonalStore.edit(), com.runehive.net.packet.in.DropItemPacketListener.handlePacket(), com.runehive.content.store.impl.PersonalStore.modify(), com.runehive.content.skill.impl.slayer.SlayerOfferings.offer(), com.runehive.game.plugin.PluginContext.onClick(), com.runehive.content.skill.impl.crafting.impl.Spinning.open(), com.runehive.game.world.items.containers.bank.BankPin.open(), com.runehive.content.preset.PresetManager.openSettings(), com.runehive.content.dialogue.impl.NieveDialogue.sell(), com.runehive.content.clanchannel.channel.ClanChannelHandler.sendConnectionWarning(), com.runehive.content.dialogue.impl.ClanmasterDialogue.sendDialogues(), com.runehive.content.dialogue.impl.ClanRankDialogue.sendDialogues(), com.runehive.content.dialogue.impl.ConstructionDialogue.sendDialogues(), com.runehive.content.dialogue.impl.NieveDialogue.sendDialogues(), com.runehive.content.dialogue.impl.PrestigeDialogue.sendDialogues(), com.runehive.content.dialogue.impl.RoyalKingDialogue.sendDialogues(), com.runehive.content.dialogue.impl.VoteDialogue.sendDialogues(), com.runehive.content.dialogue.impl.WellOfGoodwillDialogue.sendDialogues(), com.runehive.content.teleport.TeleportHandler.special(), com.runehive.content.dialogue.impl.RoyalKingDialogue.store(), and com.runehive.content.ai.AIDialogueHandler.streamGandalfResponse().
| final DialogueFactory com.runehive.content.dialogue.DialogueFactory.sendOption | ( | String | option1, |
| Runnable | action1, | ||
| String | option2, | ||
| Runnable | action2, | ||
| String | option3, | ||
| Runnable | action3 ) |
Appends the OptionDialogue onto the current dialogue chain.
| option1 | The text for the first option. |
| action1 | The action for the first action. |
| option2 | The text for the second option. |
| action2 | The action for the second action. |
| option3 | The text for the third option. |
| action3 | The action for the third action. |
Definition at line 398 of file DialogueFactory.java.
References append(), and DialogueFactory().
| final DialogueFactory com.runehive.content.dialogue.DialogueFactory.sendOption | ( | String | option1, |
| Runnable | action1, | ||
| String | option2, | ||
| Runnable | action2, | ||
| String | option3, | ||
| Runnable | action3, | ||
| String | option4, | ||
| Runnable | action4 ) |
Appends the OptionDialogue onto the current dialogue chain.
| option1 | The text for the first option. |
| action1 | The action for the first action. |
| option2 | The text for the second option. |
| action2 | The action for the second action. |
| option3 | The text for the third option. |
| action3 | The action for the third action. |
| option4 | The text for the four option. |
| action4 | The action for the four action. |
Definition at line 414 of file DialogueFactory.java.
References append(), and DialogueFactory().
| final DialogueFactory com.runehive.content.dialogue.DialogueFactory.sendOption | ( | String | option1, |
| Runnable | action1, | ||
| String | option2, | ||
| Runnable | action2, | ||
| String | option3, | ||
| Runnable | action3, | ||
| String | option4, | ||
| Runnable | action4, | ||
| String | option5, | ||
| Runnable | action5 ) |
Appends the OptionDialogue onto the current dialogue chain.
| option1 | The text for the first option. |
| action1 | The action for the first action. |
| option2 | The text for the second option. |
| action2 | The action for the second action. |
| option3 | The text for the third option. |
| action3 | The action for the third action. |
| option4 | The text for the four option. |
| action4 | The action for the four action. |
| option5 | The text for the fifth option. |
| action5 | The action for the fifth action. |
Definition at line 432 of file DialogueFactory.java.
References append(), and DialogueFactory().
| final DialogueFactory com.runehive.content.dialogue.DialogueFactory.sendPlayerChat | ( | Expression | expression, |
| String... | lines ) |
Appends a PlayerDialogue to the current dialogue chain.
| lines | The dialogue of the player talking. |
| expression | The expression of this dialogue. |
Definition at line 235 of file DialogueFactory.java.
References append(), and DialogueFactory().
|
package |
Sends a dialogue with a player talking.
| dialogue | The player dialogue. |
Definition at line 245 of file DialogueFactory.java.
References appendKeywords(), DialogueFactory(), com.runehive.util.Utility.formatName(), com.runehive.content.dialogue.Expression.getId(), logger, player, and validateLength().
| final DialogueFactory com.runehive.content.dialogue.DialogueFactory.sendPlayerChat | ( | String... | lines | ) |
Appends a PlayerDialogue to the current dialogue chain.
| lines | The dialogue of the player talking. |
Definition at line 224 of file DialogueFactory.java.
References append(), and DialogueFactory().
Referenced by com.runehive.content.dialogue.PlayerDialogue.accept(), and com.runehive.content.dialogue.impl.VoteDialogue.sendDialogues().
|
package |
Sends a player a statement dialogue.
| dialogue | The statement dialogue. |
Definition at line 511 of file DialogueFactory.java.
References DialogueFactory(), logger, player, and validateLength().
| final DialogueFactory com.runehive.content.dialogue.DialogueFactory.sendStatement | ( | String... | lines | ) |
Appends a StatementDialogue to the current dialogue chain.
| lines | The text for this statement. |
Definition at line 500 of file DialogueFactory.java.
References append(), DialogueFactory(), and validateLength().
Referenced by com.runehive.content.dialogue.StatementDialogue.accept(), com.runehive.content.skill.impl.agility.obstacle.impl.WildernessDoorInteraction.canExecute(), com.runehive.content.skill.impl.agility.obstacle.ObstacleInteraction.canExecute(), com.runehive.content.dailyeffect.DailyEffect.canUse(), com.runehive.game.service.DonationService.claimDonation(), com.runehive.game.service.VoteService.claimReward(), com.runehive.content.dialogue.impl.ClanmasterDialogue.clanTask(), com.runehive.content.skill.impl.crafting.impl.Spinning.click(), com.runehive.content.skill.impl.herblore.Herblore.clickItem(), com.runehive.content.skill.impl.firemaking.Firemaking.clickObject(), com.runehive.content.staff.PlayerManagement.confirm(), com.runehive.content.skill.impl.crafting.impl.Stringing.craft(), com.runehive.content.store.impl.PersonalStore.edit(), com.runehive.content.skill.impl.fishing.FishingAction.fish(), com.runehive.net.packet.in.DropItemPacketListener.handlePacket(), com.runehive.content.shootingstar.ShootingStar.mine(), com.runehive.content.dialogue.impl.RoyalKingDialogue.myStats(), com.runehive.content.bloodmoney.BloodMoneyChest.open(), com.runehive.content.Obelisks.open(), com.runehive.content.RoyaltyProgram.open(), com.runehive.content.preset.PresetManager.openSettings(), com.runehive.content.shootingstar.ShootingStar.prospect(), com.runehive.content.Waypoints.removeWaypoint(), com.runehive.content.DropDisplay.search(), com.runehive.content.dialogue.impl.NieveDialogue.sell(), com.runehive.content.clanchannel.channel.ClanChannelHandler.sendConnectionWarning(), com.runehive.content.dialogue.impl.LootshareDialogue.sendDialogues(), com.runehive.content.dialogue.impl.WellOfGoodwillDialogue.sendDialogues(), com.runehive.content.dialogue.impl.ClanRankDialogue.setRank(), com.runehive.content.Waypoints.setWaypoint(), com.runehive.content.teleport.TeleportHandler.special(), com.runehive.content.skill.impl.crafting.Crafting.start(), com.runehive.content.skill.impl.fletching.Fletching.start(), com.runehive.content.clanchannel.channel.ClanChannelHandler.testPassword(), com.runehive.content.skill.impl.thieving.WallSafe.thieve(), com.runehive.content.skill.impl.cooking.Cooking.useItem(), and com.runehive.content.skill.impl.herblore.Herblore.useItem().
| void com.runehive.content.dialogue.DialogueFactory.setActive | ( | boolean | active | ) |
Definition at line 666 of file DialogueFactory.java.
References active.
Referenced by clear(), execute(), and com.runehive.game.world.entity.skill.SkillManager.showLevelUpInterface().
| void com.runehive.content.dialogue.DialogueFactory.setNextAction | ( | Optional< Runnable > | nextAction | ) |
Sets the next action in the dialogue chain.
| nextAction | The action to set. |
Definition at line 658 of file DialogueFactory.java.
References nextAction.
Referenced by execute(), and onAction().
|
private |
The method that validates the length of text.
| text | the text that will be validated. |
| IllegalStateException | if any lines of the text exceed a certain length. |
Definition at line 628 of file DialogueFactory.java.
References MAXIMUM_LENGTH.
Referenced by sendInformationBox(), sendInformationBox(), sendItem(), sendItem(), sendItem(), sendNpcChat(), sendOption(), sendPlayerChat(), sendStatement(), and sendStatement().
|
private |
The flag that denotes dialogue is active.
Definition at line 33 of file DialogueFactory.java.
Referenced by isActive(), and setActive().
|
private |
The queue of dialogues in this factory.
Definition at line 24 of file DialogueFactory.java.
Referenced by clear(), and getChain().
|
private |
Definition at line 37 of file DialogueFactory.java.
Referenced by execute().
|
staticprivate |
Definition at line 21 of file DialogueFactory.java.
Referenced by sendInformationBox(), sendNpcChat(), sendPlayerChat(), and sendStatement().
|
staticprivate |
The maximum length of a single line of dialogue.
Definition at line 27 of file DialogueFactory.java.
Referenced by validateLength().
|
private |
The next action in the dialogue chain.
Definition at line 36 of file DialogueFactory.java.
Referenced by clear(), getNextAction(), and setNextAction().
|
private |
The player who owns this factory.
Definition at line 30 of file DialogueFactory.java.
Referenced by appendKeywords(), clear(), DialogueFactory(), execute(), getPlayer(), onNext(), sendInformationBox(), sendItem(), sendNpcChat(), sendOption(), sendPlayerChat(), sendStatement(), and com.runehive.content.ai.AIDialogueHandler.streamGandalfResponse().