41public abstract class InterfaceWriter {
43 public InterfaceWriter(
Player player) {
49 protected abstract int startingIndex();
51 protected abstract String[] text();
53 protected abstract int[][] color();
55 protected abstract int[][] font();
57 public void scroll() {
61 public static void write(InterfaceWriter writer) {
65 int line = writer.startingIndex();
66 if (writer.text() !=
null) {
67 for (
int index = 0; index < writer.text().length; index++) {
68 writer.player.send(
new SendString(writer.text()[index], line++));
73 if (writer.color() !=
null) {
74 for (
int index = 0; index < writer.color().length; index++) {
75 writer.player.send(
new SendColor(writer.color()[index][0], writer.color()[index][1]));
80 if (writer.font() !=
null) {
81 for (
int index = 0; index < writer.font().length; index++) {
82 writer.player.send(
new SendFont(writer.font()[index][0], writer.font()[index][1]));