1package com.runehive.game.action.impl;
3import com.google.gson.Gson;
4import com.google.gson.GsonBuilder;
5import com.runehive.game.task.Task;
6import com.runehive.net.packet.out.SendInputMessage;
7import com.runehive.net.packet.out.SendMessage;
8import com.runehive.game.world.entity.mob.player.Player;
9import com.runehive.util.MessageColor;
11import java.io.FileWriter;
12import java.util.HashMap;
23 private Map<Integer, String>
DATA =
new HashMap<>();
39 this.identification = 0;
40 this.inputTaken =
false;
42 this.DATA =
new HashMap<>();
45 private final void save() {
46 Gson gson =
new GsonBuilder().setPrettyPrinting().disableHtmlEscaping().create();
47 try (FileWriter fw =
new FileWriter(
"./data/INTERFACES.json")) {
48 fw.write(gson.toJson(
DATA));
49 }
catch (
final Exception e) {
73 player.dialogueFactory.sendOption(
78 player.dialogueFactory.clear();
DebugAction(Player player)
Map< Integer, String > DATA
void input(Player player)
void execute()
A function representing the unit of work that will be carried out.
synchronized final void cancel()
Cancels all subsequent executions.
Task(boolean instant, int delay)
Creates a new Task.
This class represents a character controlled by a player.
The OutgoingPacket that sends a message to a Players chatbox in the client.
Holds an enum of colors for ease.