Skip to content

Commit

Permalink
Update dependencies and use non-deprecated methods (take 2)
Browse files Browse the repository at this point in the history
Signed-off-by: BT (calcastor/mame) <[email protected]>
  • Loading branch information
calcastor committed Feb 26, 2024
1 parent ef5d5a9 commit 35bedaf
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 17 deletions.
2 changes: 1 addition & 1 deletion core/src/main/java/tc/oc/pgm/flag/state/Carried.java
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public void tickRunning() {
if (!message.equals(this.lastMessage)) {
this.lastMessage = message;
this.carrier.showTitle(
title(empty(), message, Title.Times.of(Duration.ZERO, fromTicks(5), fromTicks(35))));
title(empty(), message, Title.Times.times(Duration.ZERO, fromTicks(5), fromTicks(35))));
}

ScoreMatchModule smm = this.flag.getMatch().getModule(ScoreMatchModule.class);
Expand Down
3 changes: 2 additions & 1 deletion core/src/main/java/tc/oc/pgm/listeners/MatchAnnouncer.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ public void onMatchBegin(final MatchStartEvent event) {
match.sendMessage(translatable("broadcast.matchStart", NamedTextColor.GREEN));

Component go = translatable("broadcast.go", NamedTextColor.GREEN);
match.showTitle(title(go, empty(), Title.Times.of(Duration.ZERO, fromTicks(5), fromTicks(15))));
match.showTitle(
title(go, empty(), Title.Times.times(Duration.ZERO, fromTicks(5), fromTicks(15))));

match.playSound(SOUND_MATCH_START);
}
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/tc/oc/pgm/spawns/states/Spawning.java
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ protected long ticksUntilRespawn() {
}

public void updateTitle() {
Title.Times times = Title.Times.of(Duration.ZERO, fromTicks(3), fromTicks(3));
Title.Times times = Title.Times.times(Duration.ZERO, fromTicks(3), fromTicks(3));

player.showTitle(title(getTitle(false), getSubtitle(false), times));

Expand Down
21 changes: 7 additions & 14 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,24 +93,17 @@
<!-- Multi-protocol library for future Minecraft versions -->
<dependency>
<groupId>com.viaversion</groupId>
<artifactId>viaversion</artifactId>
<version>4.5.1</version>
<artifactId>viaversion-api</artifactId>
<version>4.9.2</version>
<scope>provided</scope>
<optional>true</optional>
<!-- Fix transitive dependency breaking builds -->
<exclusions>
<exclusion>
<groupId>net.md-5</groupId>
<artifactId>bungeecord-chat</artifactId>
</exclusion>
</exclusions>
</dependency>

<!-- Send packets to players -->
<dependency>
<groupId>com.comphenix.protocol</groupId>
<artifactId>ProtocolLib</artifactId>
<version>5.0.0</version>
<version>5.1.0</version>
</dependency>

<!-- XML parsing library used for all "map.xml" configuration loading -->
Expand All @@ -125,19 +118,19 @@
<dependency>
<groupId>net.kyori</groupId>
<artifactId>adventure-api</artifactId>
<version>4.12.0</version>
<version>4.15.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.kyori</groupId>
<artifactId>adventure-text-serializer-plain</artifactId>
<version>4.12.0</version>
<version>4.15.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.kyori</groupId>
<artifactId>adventure-platform-bukkit</artifactId>
<version>4.2.0</version>
<version>4.3.2</version>
<scope>compile</scope>
<!-- Exclude Spigot APIs since we already provide Bukkit -->
<exclusions>
Expand Down Expand Up @@ -185,7 +178,7 @@
<dependency>
<groupId>fr.mrmicky</groupId>
<artifactId>FastBoard</artifactId>
<version>1.2.1</version>
<version>2.0.2</version>
<scope>compile</scope>
</dependency>

Expand Down

0 comments on commit 35bedaf

Please sign in to comment.