Skip to content

Commit

Permalink
Add mojang-mapped Paper plugin and Adventure component support.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rapha149 committed Aug 11, 2024
2 parents 16a3a0a + 9492933 commit 2daaf99
Show file tree
Hide file tree
Showing 65 changed files with 672 additions and 101 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ test/
dependency-reduced-pom.xml
.mvn/
.flattened-pom.xml
.paper-nms/
2 changes: 1 addition & 1 deletion 1_10_R1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>signgui-parent</artifactId>
<groupId>de.rapha149.signgui</groupId>
<version>2.3.6</version>
<version>2.4.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public List<Material> getSignTypes() {
}

@Override
public void openSignEditor(Player player, String[] lines, Material type, DyeColor color, boolean glow, Location signLoc, BiConsumer<SignEditor, String[]> onFinish) {
public void openSignEditor(Player player, String[] lines, Object[] adventureLines, Material type, DyeColor color, boolean glow, Location signLoc, BiConsumer<SignEditor, String[]> onFinish) {
EntityPlayer p = ((CraftPlayer) player).getHandle();
PlayerConnection conn = p.playerConnection;
Location loc = signLoc != null ? signLoc : getDefaultLocation(player);
Expand Down Expand Up @@ -98,7 +98,7 @@ protected void decode(ChannelHandlerContext chc, Packet<?> packet, List<Object>
}

@Override
public void displayNewLines(Player player, SignEditor signEditor, String[] lines) {
public void displayNewLines(Player player, SignEditor signEditor, String[] lines, Object[] adventureLines) {
TileEntitySign sign = (TileEntitySign) signEditor.getSign();
for (int i = 0; i < lines.length; i++)
sign.lines[i] = new ChatComponentText(lines[i] != null ? lines[i] : "");
Expand Down
2 changes: 1 addition & 1 deletion 1_11_R1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>signgui-parent</artifactId>
<groupId>de.rapha149.signgui</groupId>
<version>2.3.6</version>
<version>2.4.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public List<Material> getSignTypes() {
}

@Override
public void openSignEditor(Player player, String[] lines, Material type, DyeColor color, boolean glow, Location signLoc, BiConsumer<SignEditor, String[]> onFinish) {
public void openSignEditor(Player player, String[] lines, Object[] adventureLines, Material type, DyeColor color, boolean glow, Location signLoc, BiConsumer<SignEditor, String[]> onFinish) {
EntityPlayer p = ((CraftPlayer) player).getHandle();
PlayerConnection conn = p.playerConnection;
Location loc = signLoc != null ? signLoc : getDefaultLocation(player);
Expand Down Expand Up @@ -98,7 +98,7 @@ protected void decode(ChannelHandlerContext chc, Packet<?> packet, List<Object>
}

@Override
public void displayNewLines(Player player, SignEditor signEditor, String[] lines) {
public void displayNewLines(Player player, SignEditor signEditor, String[] lines, Object[] adventureLines) {
TileEntitySign sign = (TileEntitySign) signEditor.getSign();
for (int i = 0; i < lines.length; i++)
sign.lines[i] = new ChatComponentText(lines[i] != null ? lines[i] : "");
Expand Down
2 changes: 1 addition & 1 deletion 1_12_R1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>signgui-parent</artifactId>
<groupId>de.rapha149.signgui</groupId>
<version>2.3.6</version>
<version>2.4.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public List<Material> getSignTypes() {
}

@Override
public void openSignEditor(Player player, String[] lines, Material type, DyeColor color, boolean glow, Location signLoc, BiConsumer<SignEditor, String[]> onFinish) {
public void openSignEditor(Player player, String[] lines, Object[] adventureLines, Material type, DyeColor color, boolean glow, Location signLoc, BiConsumer<SignEditor, String[]> onFinish) {
EntityPlayer p = ((CraftPlayer) player).getHandle();
PlayerConnection conn = p.playerConnection;
Location loc = signLoc != null ? signLoc : getDefaultLocation(player);
Expand Down Expand Up @@ -98,7 +98,7 @@ protected void decode(ChannelHandlerContext chc, Packet<?> packet, List<Object>
}

@Override
public void displayNewLines(Player player, SignEditor signEditor, String[] lines) {
public void displayNewLines(Player player, SignEditor signEditor, String[] lines, Object[] adventureLines) {
TileEntitySign sign = (TileEntitySign) signEditor.getSign();
for (int i = 0; i < lines.length; i++)
sign.lines[i] = new ChatComponentText(lines[i] != null ? lines[i] : "");
Expand Down
2 changes: 1 addition & 1 deletion 1_13_R1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>signgui-parent</artifactId>
<groupId>de.rapha149.signgui</groupId>
<version>2.3.6</version>
<version>2.4.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public List<Material> getSignTypes() {
}

@Override
public void openSignEditor(Player player, String[] lines, Material type, DyeColor color, boolean glow, Location signLoc, BiConsumer<SignEditor, String[]> onFinish) {
public void openSignEditor(Player player, String[] lines, Object[] adventureLines, Material type, DyeColor color, boolean glow, Location signLoc, BiConsumer<SignEditor, String[]> onFinish) {
EntityPlayer p = ((CraftPlayer) player).getHandle();
PlayerConnection conn = p.playerConnection;
Location loc = signLoc != null ? signLoc : getDefaultLocation(player);
Expand Down Expand Up @@ -97,7 +97,7 @@ protected void decode(ChannelHandlerContext chc, Packet<?> packet, List<Object>
}

@Override
public void displayNewLines(Player player, SignEditor signEditor, String[] lines) {
public void displayNewLines(Player player, SignEditor signEditor, String[] lines, Object[] adventureLines) {
TileEntitySign sign = (TileEntitySign) signEditor.getSign();
for (int i = 0; i < lines.length; i++)
sign.lines[i] = new ChatComponentText(lines[i] != null ? lines[i] : "");
Expand Down
2 changes: 1 addition & 1 deletion 1_13_R2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>signgui-parent</artifactId>
<groupId>de.rapha149.signgui</groupId>
<version>2.3.6</version>
<version>2.4.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public List<Material> getSignTypes() {
}

@Override
public void openSignEditor(Player player, String[] lines, Material type, DyeColor color, boolean glow, Location signLoc, BiConsumer<SignEditor, String[]> onFinish) {
public void openSignEditor(Player player, String[] lines, Object[] adventureLines, Material type, DyeColor color, boolean glow, Location signLoc, BiConsumer<SignEditor, String[]> onFinish) {
EntityPlayer p = ((CraftPlayer) player).getHandle();
PlayerConnection conn = p.playerConnection;
Location loc = signLoc != null ? signLoc : getDefaultLocation(player);
Expand Down Expand Up @@ -97,7 +97,7 @@ protected void decode(ChannelHandlerContext chc, Packet<?> packet, List<Object>
}

@Override
public void displayNewLines(Player player, SignEditor signEditor, String[] lines) {
public void displayNewLines(Player player, SignEditor signEditor, String[] lines, Object[] adventureLines) {
TileEntitySign sign = (TileEntitySign) signEditor.getSign();
for (int i = 0; i < lines.length; i++)
sign.a(i, new ChatComponentText(lines[i] != null ? lines[i] : ""));
Expand Down
2 changes: 1 addition & 1 deletion 1_14_R1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>signgui-parent</artifactId>
<groupId>de.rapha149.signgui</groupId>
<version>2.3.6</version>
<version>2.4.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public List<Material> getSignTypes() {
}

@Override
public void openSignEditor(Player player, String[] lines, Material type, DyeColor color, boolean glow, Location signLoc, BiConsumer<SignEditor, String[]> onFinish) throws NoSuchFieldException, IllegalAccessException {
public void openSignEditor(Player player, String[] lines, Object[] adventureLines, Material type, DyeColor color, boolean glow, Location signLoc, BiConsumer<SignEditor, String[]> onFinish) throws NoSuchFieldException, IllegalAccessException {
EntityPlayer p = ((CraftPlayer) player).getHandle();
PlayerConnection conn = p.playerConnection;
Location loc = signLoc != null ? signLoc : getDefaultLocation(player);
Expand Down Expand Up @@ -109,7 +109,7 @@ protected void decode(ChannelHandlerContext chc, Packet<?> packet, List<Object>
}

@Override
public void displayNewLines(Player player, SignEditor signEditor, String[] lines) {
public void displayNewLines(Player player, SignEditor signEditor, String[] lines, Object[] adventureLines) {
TileEntitySign sign = (TileEntitySign) signEditor.getSign();
for (int i = 0; i < lines.length; i++)
sign.a(i, new ChatComponentText(lines[i] != null ? lines[i] : ""));
Expand Down
2 changes: 1 addition & 1 deletion 1_15_R1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>signgui-parent</artifactId>
<groupId>de.rapha149.signgui</groupId>
<version>2.3.6</version>
<version>2.4.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public List<Material> getSignTypes() {
}

@Override
public void openSignEditor(Player player, String[] lines, Material type, DyeColor color, boolean glow, Location signLoc, BiConsumer<SignEditor, String[]> onFinish) {
public void openSignEditor(Player player, String[] lines, Object[] adventureLines, Material type, DyeColor color, boolean glow, Location signLoc, BiConsumer<SignEditor, String[]> onFinish) {
EntityPlayer p = ((CraftPlayer) player).getHandle();
PlayerConnection conn = p.playerConnection;
Location loc = signLoc != null ? signLoc : getDefaultLocation(player);
Expand Down Expand Up @@ -99,7 +99,7 @@ protected void decode(ChannelHandlerContext chc, Packet<?> packet, List<Object>
}

@Override
public void displayNewLines(Player player, SignEditor signEditor, String[] lines) {
public void displayNewLines(Player player, SignEditor signEditor, String[] lines, Object[] adventureLines) {
TileEntitySign sign = (TileEntitySign) signEditor.getSign();
for (int i = 0; i < lines.length; i++)
sign.a(i, new ChatComponentText(lines[i] != null ? lines[i] : ""));
Expand Down
2 changes: 1 addition & 1 deletion 1_16_R1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>signgui-parent</artifactId>
<groupId>de.rapha149.signgui</groupId>
<version>2.3.6</version>
<version>2.4.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public List<Material> getSignTypes() {
}

@Override
public void openSignEditor(Player player, String[] lines, Material type, DyeColor color, boolean glow, Location signLoc, BiConsumer<SignEditor, String[]> onFinish) {
public void openSignEditor(Player player, String[] lines, Object[] adventureLines, Material type, DyeColor color, boolean glow, Location signLoc, BiConsumer<SignEditor, String[]> onFinish) {
EntityPlayer p = ((CraftPlayer) player).getHandle();
PlayerConnection conn = p.playerConnection;
Location loc = signLoc != null ? signLoc : getDefaultLocation(player);
Expand Down Expand Up @@ -99,7 +99,7 @@ protected void decode(ChannelHandlerContext chc, Packet<?> packet, List<Object>
}

@Override
public void displayNewLines(Player player, SignEditor signEditor, String[] lines) {
public void displayNewLines(Player player, SignEditor signEditor, String[] lines, Object[] adventureLines) {
TileEntitySign sign = (TileEntitySign) signEditor.getSign();
for (int i = 0; i < lines.length; i++)
sign.a(i, new ChatComponentText(lines[i] != null ? lines[i] : ""));
Expand Down
2 changes: 1 addition & 1 deletion 1_16_R2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>signgui-parent</artifactId>
<groupId>de.rapha149.signgui</groupId>
<version>2.3.6</version>
<version>2.4.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public List<Material> getSignTypes() {
}

@Override
public void openSignEditor(Player player, String[] lines, Material type, DyeColor color, boolean glow, Location signLoc, BiConsumer<SignEditor, String[]> onFinish) {
public void openSignEditor(Player player, String[] lines, Object[] adventureLines, Material type, DyeColor color, boolean glow, Location signLoc, BiConsumer<SignEditor, String[]> onFinish) {
EntityPlayer p = ((CraftPlayer) player).getHandle();
PlayerConnection conn = p.playerConnection;
Location loc = signLoc != null ? signLoc : getDefaultLocation(player);
Expand Down Expand Up @@ -99,7 +99,7 @@ protected void decode(ChannelHandlerContext chc, Packet<?> packet, List<Object>
}

@Override
public void displayNewLines(Player player, SignEditor signEditor, String[] lines) {
public void displayNewLines(Player player, SignEditor signEditor, String[] lines, Object[] adventureLines) {
TileEntitySign sign = (TileEntitySign) signEditor.getSign();
for (int i = 0; i < lines.length; i++)
sign.a(i, new ChatComponentText(lines[i] != null ? lines[i] : ""));
Expand Down
2 changes: 1 addition & 1 deletion 1_16_R3/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>signgui-parent</artifactId>
<groupId>de.rapha149.signgui</groupId>
<version>2.3.6</version>
<version>2.4.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public List<Material> getSignTypes() {
}

@Override
public void openSignEditor(Player player, String[] lines, Material type, DyeColor color, boolean glow, Location signLoc, BiConsumer<SignEditor, String[]> onFinish) {
public void openSignEditor(Player player, String[] lines, Object[] adventureLines, Material type, DyeColor color, boolean glow, Location signLoc, BiConsumer<SignEditor, String[]> onFinish) {
EntityPlayer p = ((CraftPlayer) player).getHandle();
PlayerConnection conn = p.playerConnection;
Location loc = signLoc != null ? signLoc : getDefaultLocation(player);
Expand Down Expand Up @@ -99,7 +99,7 @@ protected void decode(ChannelHandlerContext chc, Packet<?> packet, List<Object>
}

@Override
public void displayNewLines(Player player, SignEditor signEditor, String[] lines) {
public void displayNewLines(Player player, SignEditor signEditor, String[] lines, Object[] adventureLines) {
TileEntitySign sign = (TileEntitySign) signEditor.getSign();
for (int i = 0; i < lines.length; i++)
sign.a(i, new ChatComponentText(lines[i] != null ? lines[i] : ""));
Expand Down
2 changes: 1 addition & 1 deletion 1_17_R1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>signgui-parent</artifactId>
<groupId>de.rapha149.signgui</groupId>
<version>2.3.6</version>
<version>2.4.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public List<Material> getSignTypes() {
}

@Override
public void openSignEditor(Player player, String[] lines, Material type, DyeColor color, boolean glow, Location signLoc, BiConsumer<SignEditor, String[]> onFinish) {
public void openSignEditor(Player player, String[] lines, Object[] adventureLines, Material type, DyeColor color, boolean glow, Location signLoc, BiConsumer<SignEditor, String[]> onFinish) {
EntityPlayer p = ((CraftPlayer) player).getHandle();
PlayerConnection conn = p.b;
Location loc = signLoc != null ? signLoc : getDefaultLocation(player);
Expand Down Expand Up @@ -105,7 +105,7 @@ protected void decode(ChannelHandlerContext chc, Packet<?> packet, List<Object>
}

@Override
public void displayNewLines(Player player, SignEditor signEditor, String[] lines) {
public void displayNewLines(Player player, SignEditor signEditor, String[] lines, Object[] adventureLines) {
TileEntitySign sign = (TileEntitySign) signEditor.getSign();
for (int i = 0; i < lines.length; i++)
sign.a(i, IChatBaseComponent.a(lines[i]));
Expand Down
2 changes: 1 addition & 1 deletion 1_18_R1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>signgui-parent</artifactId>
<groupId>de.rapha149.signgui</groupId>
<version>2.3.6</version>
<version>2.4.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public List<Material> getSignTypes() {
}

@Override
public void openSignEditor(Player player, String[] lines, Material type, DyeColor color, boolean glow, Location signLoc, BiConsumer<SignEditor, String[]> onFinish) {
public void openSignEditor(Player player, String[] lines, Object[] adventureLines, Material type, DyeColor color, boolean glow, Location signLoc, BiConsumer<SignEditor, String[]> onFinish) {
EntityPlayer p = ((CraftPlayer) player).getHandle();
PlayerConnection conn = p.b;
Location loc = signLoc != null ? signLoc : getDefaultLocation(player);
Expand Down Expand Up @@ -105,7 +105,7 @@ protected void decode(ChannelHandlerContext chc, Packet<?> packet, List<Object>
}

@Override
public void displayNewLines(Player player, SignEditor signEditor, String[] lines) {
public void displayNewLines(Player player, SignEditor signEditor, String[] lines, Object[] adventureLines) {
TileEntitySign sign = (TileEntitySign) signEditor.getSign();
for (int i = 0; i < lines.length; i++)
sign.a(i, IChatBaseComponent.a(lines[i]));
Expand Down
2 changes: 1 addition & 1 deletion 1_18_R2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>signgui-parent</artifactId>
<groupId>de.rapha149.signgui</groupId>
<version>2.3.6</version>
<version>2.4.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public List<Material> getSignTypes() {
}

@Override
public void openSignEditor(Player player, String[] lines, Material type, DyeColor color, boolean glow, Location signLoc, BiConsumer<SignEditor, String[]> onFinish) {
public void openSignEditor(Player player, String[] lines, Object[] adventureLines, Material type, DyeColor color, boolean glow, Location signLoc, BiConsumer<SignEditor, String[]> onFinish) {
EntityPlayer p = ((CraftPlayer) player).getHandle();
PlayerConnection conn = p.b;
Location loc = signLoc != null ? signLoc : getDefaultLocation(player);
Expand Down Expand Up @@ -105,7 +105,7 @@ protected void decode(ChannelHandlerContext chc, Packet<?> packet, List<Object>
}

@Override
public void displayNewLines(Player player, SignEditor signEditor, String[] lines) {
public void displayNewLines(Player player, SignEditor signEditor, String[] lines, Object[] adventureLines) {
TileEntitySign sign = (TileEntitySign) signEditor.getSign();
for (int i = 0; i < lines.length; i++)
sign.a(i, IChatBaseComponent.a(lines[i]));
Expand Down
2 changes: 1 addition & 1 deletion 1_19_R1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>signgui-parent</artifactId>
<groupId>de.rapha149.signgui</groupId>
<version>2.3.6</version>
<version>2.4.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public List<Material> getSignTypes() {
}

@Override
public void openSignEditor(Player player, String[] lines, Material type, DyeColor color, boolean glow, Location signLoc, BiConsumer<SignEditor, String[]> onFinish) {
public void openSignEditor(Player player, String[] lines, Object[] adventureLines, Material type, DyeColor color, boolean glow, Location signLoc, BiConsumer<SignEditor, String[]> onFinish) {
EntityPlayer p = ((CraftPlayer) player).getHandle();
PlayerConnection conn = p.b;
Location loc = signLoc != null ? signLoc : getDefaultLocation(player);
Expand Down Expand Up @@ -105,7 +105,7 @@ protected void decode(ChannelHandlerContext chc, Packet<?> packet, List<Object>
}

@Override
public void displayNewLines(Player player, SignEditor signEditor, String[] lines) {
public void displayNewLines(Player player, SignEditor signEditor, String[] lines, Object[] adventureLines) {
TileEntitySign sign = (TileEntitySign) signEditor.getSign();
for (int i = 0; i < lines.length; i++)
sign.a(i, IChatBaseComponent.a(lines[i]));
Expand Down
2 changes: 1 addition & 1 deletion 1_19_R2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>signgui-parent</artifactId>
<groupId>de.rapha149.signgui</groupId>
<version>2.3.6</version>
<version>2.4.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Loading

0 comments on commit 2daaf99

Please sign in to comment.