aboutsummaryrefslogtreecommitdiffstats
path: root/src/me/fatpigsarefat/quests/title
diff options
context:
space:
mode:
Diffstat (limited to 'src/me/fatpigsarefat/quests/title')
-rw-r--r--src/me/fatpigsarefat/quests/title/Title.java8
-rw-r--r--src/me/fatpigsarefat/quests/title/Title_Other.java19
-rw-r--r--src/me/fatpigsarefat/quests/title/Title_v1_10_R1.java22
-rw-r--r--src/me/fatpigsarefat/quests/title/Title_v1_11_R1.java22
-rw-r--r--src/me/fatpigsarefat/quests/title/Title_v1_12_R1.java22
-rw-r--r--src/me/fatpigsarefat/quests/title/Title_v1_8_R1.java23
-rw-r--r--src/me/fatpigsarefat/quests/title/Title_v1_8_R2.java22
-rw-r--r--src/me/fatpigsarefat/quests/title/Title_v1_8_R3.java22
-rw-r--r--src/me/fatpigsarefat/quests/title/Title_v1_9_R1.java22
-rw-r--r--src/me/fatpigsarefat/quests/title/Title_v1_9_R2.java22
10 files changed, 204 insertions, 0 deletions
diff --git a/src/me/fatpigsarefat/quests/title/Title.java b/src/me/fatpigsarefat/quests/title/Title.java
new file mode 100644
index 00000000..4851440b
--- /dev/null
+++ b/src/me/fatpigsarefat/quests/title/Title.java
@@ -0,0 +1,8 @@
+package me.fatpigsarefat.quests.title;
+
+import org.bukkit.entity.Player;
+
+public interface Title {
+
+ public void sendTitle(Player player, String message, String submessage);
+} \ No newline at end of file
diff --git a/src/me/fatpigsarefat/quests/title/Title_Other.java b/src/me/fatpigsarefat/quests/title/Title_Other.java
new file mode 100644
index 00000000..eef4bc07
--- /dev/null
+++ b/src/me/fatpigsarefat/quests/title/Title_Other.java
@@ -0,0 +1,19 @@
+package me.fatpigsarefat.quests.title;
+
+import org.bukkit.entity.Player;
+
+public class Title_Other implements Title {
+
+ @Override
+ public void sendTitle(Player player, String message, String submessage) {
+ /*
+ I'm too lazy to do a null check each time I want to send a title, so here.
+ Anyway, hello there programmer! I see you're rummaging through my source code.
+ Try not to leave a mess please. If you see anything dodgy or looks like it
+ could do with a little improvement make a pull request.
+ Also join my discord: https://discord.gg/8amrJnX
+ Have a great day!
+ - fatpigsarefat
+ */
+ }
+}
diff --git a/src/me/fatpigsarefat/quests/title/Title_v1_10_R1.java b/src/me/fatpigsarefat/quests/title/Title_v1_10_R1.java
new file mode 100644
index 00000000..b91cdbfc
--- /dev/null
+++ b/src/me/fatpigsarefat/quests/title/Title_v1_10_R1.java
@@ -0,0 +1,22 @@
+package me.fatpigsarefat.quests.title;
+
+import net.minecraft.server.v1_10_R1.IChatBaseComponent.ChatSerializer;
+import net.minecraft.server.v1_10_R1.PacketPlayOutTitle;
+import net.minecraft.server.v1_10_R1.PacketPlayOutTitle.EnumTitleAction;
+import org.bukkit.craftbukkit.v1_10_R1.entity.CraftPlayer;
+import org.bukkit.entity.Player;
+
+public class Title_v1_10_R1 implements Title {
+
+ @Override
+ public void sendTitle(Player player, String message, String submessage) {
+ message = "{\"text\":\"" + message + "\"}";
+ PacketPlayOutTitle title = new PacketPlayOutTitle(EnumTitleAction.TITLE, ChatSerializer.a(message), 10, 100,
+ 10);
+ ((CraftPlayer) player).getHandle().playerConnection.sendPacket(title);
+ submessage = "{\"text\":\"" + submessage + "\"}";
+ PacketPlayOutTitle subtitle = new PacketPlayOutTitle(EnumTitleAction.SUBTITLE, ChatSerializer.a(submessage), 10,
+ 100, 10);
+ ((CraftPlayer) player).getHandle().playerConnection.sendPacket(subtitle);
+ }
+}
diff --git a/src/me/fatpigsarefat/quests/title/Title_v1_11_R1.java b/src/me/fatpigsarefat/quests/title/Title_v1_11_R1.java
new file mode 100644
index 00000000..1cb522e1
--- /dev/null
+++ b/src/me/fatpigsarefat/quests/title/Title_v1_11_R1.java
@@ -0,0 +1,22 @@
+package me.fatpigsarefat.quests.title;
+
+import net.minecraft.server.v1_11_R1.IChatBaseComponent.ChatSerializer;
+import net.minecraft.server.v1_11_R1.PacketPlayOutTitle;
+import net.minecraft.server.v1_11_R1.PacketPlayOutTitle.EnumTitleAction;
+import org.bukkit.craftbukkit.v1_11_R1.entity.CraftPlayer;
+import org.bukkit.entity.Player;
+
+public class Title_v1_11_R1 implements Title {
+
+ @Override
+ public void sendTitle(Player player, String message, String submessage) {
+ message = "{\"text\":\"" + message + "\"}";
+ PacketPlayOutTitle title = new PacketPlayOutTitle(EnumTitleAction.TITLE, ChatSerializer.a(message), 10, 100,
+ 10);
+ ((CraftPlayer) player).getHandle().playerConnection.sendPacket(title);
+ submessage = "{\"text\":\"" + submessage + "\"}";
+ PacketPlayOutTitle subtitle = new PacketPlayOutTitle(EnumTitleAction.SUBTITLE, ChatSerializer.a(submessage), 10,
+ 100, 10);
+ ((CraftPlayer) player).getHandle().playerConnection.sendPacket(subtitle);
+ }
+}
diff --git a/src/me/fatpigsarefat/quests/title/Title_v1_12_R1.java b/src/me/fatpigsarefat/quests/title/Title_v1_12_R1.java
new file mode 100644
index 00000000..61a221fa
--- /dev/null
+++ b/src/me/fatpigsarefat/quests/title/Title_v1_12_R1.java
@@ -0,0 +1,22 @@
+package me.fatpigsarefat.quests.title;
+
+import net.minecraft.server.v1_12_R1.IChatBaseComponent.ChatSerializer;
+import net.minecraft.server.v1_12_R1.PacketPlayOutTitle;
+import net.minecraft.server.v1_12_R1.PacketPlayOutTitle.EnumTitleAction;
+import org.bukkit.craftbukkit.v1_12_R1.entity.CraftPlayer;
+import org.bukkit.entity.Player;
+
+public class Title_v1_12_R1 implements Title {
+
+ @Override
+ public void sendTitle(Player player, String message, String submessage) {
+ message = "{\"text\":\"" + message + "\"}";
+ PacketPlayOutTitle title = new PacketPlayOutTitle(EnumTitleAction.TITLE, ChatSerializer.a(message), 10, 100,
+ 10);
+ ((CraftPlayer) player).getHandle().playerConnection.sendPacket(title);
+ submessage = "{\"text\":\"" + submessage + "\"}";
+ PacketPlayOutTitle subtitle = new PacketPlayOutTitle(EnumTitleAction.SUBTITLE, ChatSerializer.a(submessage), 10,
+ 100, 10);
+ ((CraftPlayer) player).getHandle().playerConnection.sendPacket(subtitle);
+ }
+}
diff --git a/src/me/fatpigsarefat/quests/title/Title_v1_8_R1.java b/src/me/fatpigsarefat/quests/title/Title_v1_8_R1.java
new file mode 100644
index 00000000..e6c7dbcb
--- /dev/null
+++ b/src/me/fatpigsarefat/quests/title/Title_v1_8_R1.java
@@ -0,0 +1,23 @@
+package me.fatpigsarefat.quests.title;
+
+import net.minecraft.server.v1_8_R1.ChatSerializer;
+import net.minecraft.server.v1_8_R1.EnumTitleAction;
+import net.minecraft.server.v1_8_R1.PacketPlayOutTitle;
+import org.bukkit.craftbukkit.v1_8_R1.entity.CraftPlayer;
+import org.bukkit.entity.Player;
+
+public class Title_v1_8_R1 implements Title {
+
+ @Override
+ public void sendTitle(Player player, String message, String submessage) {
+ message = "{\"text\":\"" + message + "\"}";
+ PacketPlayOutTitle title = new PacketPlayOutTitle(EnumTitleAction.TITLE, ChatSerializer.a(message), 10, 100,
+ 10);
+ ((CraftPlayer) player).getHandle().playerConnection.sendPacket(title);
+ submessage = "{\"text\":\"" + submessage + "\"}";
+ PacketPlayOutTitle subtitle = new PacketPlayOutTitle(EnumTitleAction.SUBTITLE, ChatSerializer.a(submessage), 10,
+ 100, 10);
+ ((CraftPlayer) player).getHandle().playerConnection.sendPacket(subtitle);
+ }
+
+} \ No newline at end of file
diff --git a/src/me/fatpigsarefat/quests/title/Title_v1_8_R2.java b/src/me/fatpigsarefat/quests/title/Title_v1_8_R2.java
new file mode 100644
index 00000000..3e76e001
--- /dev/null
+++ b/src/me/fatpigsarefat/quests/title/Title_v1_8_R2.java
@@ -0,0 +1,22 @@
+package me.fatpigsarefat.quests.title;
+
+import net.minecraft.server.v1_8_R2.IChatBaseComponent.ChatSerializer;
+import net.minecraft.server.v1_8_R2.PacketPlayOutTitle;
+import net.minecraft.server.v1_8_R2.PacketPlayOutTitle.EnumTitleAction;
+import org.bukkit.craftbukkit.v1_8_R2.entity.CraftPlayer;
+import org.bukkit.entity.Player;
+
+public class Title_v1_8_R2 implements Title {
+
+ @Override
+ public void sendTitle(Player player, String message, String submessage) {
+ message = "{\"text\":\"" + message + "\"}";
+ PacketPlayOutTitle title = new PacketPlayOutTitle(EnumTitleAction.TITLE, ChatSerializer.a(message), 10, 100,
+ 10);
+ ((CraftPlayer) player).getHandle().playerConnection.sendPacket(title);
+ submessage = "{\"text\":\"" + submessage + "\"}";
+ PacketPlayOutTitle subtitle = new PacketPlayOutTitle(EnumTitleAction.SUBTITLE, ChatSerializer.a(submessage), 10,
+ 100, 10);
+ ((CraftPlayer) player).getHandle().playerConnection.sendPacket(subtitle);
+ }
+} \ No newline at end of file
diff --git a/src/me/fatpigsarefat/quests/title/Title_v1_8_R3.java b/src/me/fatpigsarefat/quests/title/Title_v1_8_R3.java
new file mode 100644
index 00000000..933bd098
--- /dev/null
+++ b/src/me/fatpigsarefat/quests/title/Title_v1_8_R3.java
@@ -0,0 +1,22 @@
+package me.fatpigsarefat.quests.title;
+
+import net.minecraft.server.v1_8_R3.IChatBaseComponent.ChatSerializer;
+import net.minecraft.server.v1_8_R3.PacketPlayOutTitle;
+import net.minecraft.server.v1_8_R3.PacketPlayOutTitle.EnumTitleAction;
+import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer;
+import org.bukkit.entity.Player;
+
+public class Title_v1_8_R3 implements Title {
+
+ @Override
+ public void sendTitle(Player player, String message, String submessage) {
+ message = "{\"text\":\"" + message + "\"}";
+ PacketPlayOutTitle title = new PacketPlayOutTitle(EnumTitleAction.TITLE, ChatSerializer.a(message), 10, 100,
+ 10);
+ ((CraftPlayer) player).getHandle().playerConnection.sendPacket(title);
+ submessage = "{\"text\":\"" + submessage + "\"}";
+ PacketPlayOutTitle subtitle = new PacketPlayOutTitle(EnumTitleAction.SUBTITLE, ChatSerializer.a(submessage), 10,
+ 100, 10);
+ ((CraftPlayer) player).getHandle().playerConnection.sendPacket(subtitle);
+ }
+}
diff --git a/src/me/fatpigsarefat/quests/title/Title_v1_9_R1.java b/src/me/fatpigsarefat/quests/title/Title_v1_9_R1.java
new file mode 100644
index 00000000..b42b4920
--- /dev/null
+++ b/src/me/fatpigsarefat/quests/title/Title_v1_9_R1.java
@@ -0,0 +1,22 @@
+package me.fatpigsarefat.quests.title;
+
+import net.minecraft.server.v1_9_R1.IChatBaseComponent.ChatSerializer;
+import net.minecraft.server.v1_9_R1.PacketPlayOutTitle;
+import net.minecraft.server.v1_9_R1.PacketPlayOutTitle.EnumTitleAction;
+import org.bukkit.craftbukkit.v1_9_R1.entity.CraftPlayer;
+import org.bukkit.entity.Player;
+
+public class Title_v1_9_R1 implements Title {
+
+ @Override
+ public void sendTitle(Player player, String message, String submessage) {
+ message = "{\"text\":\"" + message + "\"}";
+ PacketPlayOutTitle title = new PacketPlayOutTitle(EnumTitleAction.TITLE, ChatSerializer.a(message), 10, 100,
+ 10);
+ ((CraftPlayer) player).getHandle().playerConnection.sendPacket(title);
+ submessage = "{\"text\":\"" + submessage + "\"}";
+ PacketPlayOutTitle subtitle = new PacketPlayOutTitle(EnumTitleAction.SUBTITLE, ChatSerializer.a(submessage), 10,
+ 100, 10);
+ ((CraftPlayer) player).getHandle().playerConnection.sendPacket(subtitle);
+ }
+}
diff --git a/src/me/fatpigsarefat/quests/title/Title_v1_9_R2.java b/src/me/fatpigsarefat/quests/title/Title_v1_9_R2.java
new file mode 100644
index 00000000..5f69ccfd
--- /dev/null
+++ b/src/me/fatpigsarefat/quests/title/Title_v1_9_R2.java
@@ -0,0 +1,22 @@
+package me.fatpigsarefat.quests.title;
+
+import net.minecraft.server.v1_9_R2.IChatBaseComponent.ChatSerializer;
+import net.minecraft.server.v1_9_R2.PacketPlayOutTitle;
+import net.minecraft.server.v1_9_R2.PacketPlayOutTitle.EnumTitleAction;
+import org.bukkit.craftbukkit.v1_9_R2.entity.CraftPlayer;
+import org.bukkit.entity.Player;
+
+public class Title_v1_9_R2 implements Title {
+
+ @Override
+ public void sendTitle(Player player, String message, String submessage) {
+ message = "{\"text\":\"" + message + "\"}";
+ PacketPlayOutTitle title = new PacketPlayOutTitle(EnumTitleAction.TITLE, ChatSerializer.a(message), 10, 100,
+ 10);
+ ((CraftPlayer) player).getHandle().playerConnection.sendPacket(title);
+ submessage = "{\"text\":\"" + submessage + "\"}";
+ PacketPlayOutTitle subtitle = new PacketPlayOutTitle(EnumTitleAction.SUBTITLE, ChatSerializer.a(submessage), 10,
+ 100, 10);
+ ((CraftPlayer) player).getHandle().playerConnection.sendPacket(subtitle);
+ }
+}