Skip to content

Commit

Permalink
Support for gradle Movecraft (#1)
Browse files Browse the repository at this point in the history
* Update PilotListener.java

* Temporary patches

* Update pom.xml

* Update PilotListener.java
  • Loading branch information
TylerS1066 authored Jun 23, 2024
1 parent 140c198 commit 7a4ef47
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
14 changes: 7 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@

<repositories>
<repository>
<id>spigotmc-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
<id>papermc-repo</id>
<url>https://repo.papermc.io/repository/maven-public/</url>
</repository>
<repository>
<id>github</id>
Expand All @@ -70,12 +70,12 @@
</repositories>

<dependencies>
<!--Spigot-->
<!--Paper-->
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.14.4-R0.1-SNAPSHOT</version>
<scope>provided</scope>
<groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.18.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>

<!--Movecraft-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
import net.countercraft.movecraft.craft.SubCraft;
import net.countercraft.movecraft.craft.type.CraftType;
import net.countercraft.movecraft.events.CraftDetectEvent;
import net.countercraft.movecraft.libs.net.kyori.adventure.audience.Audience;
import net.countercraft.movecraft.libs.net.kyori.adventure.text.Component;
import net.countercraft.movecraft.util.ChatUtils;
import net.countercraft.movecraft.util.hitboxes.HitBox;
import net.kyori.adventure.audience.Audience;
import net.kyori.adventure.text.Component;

import org.bukkit.ChatColor;
import org.bukkit.Tag;
Expand Down Expand Up @@ -85,15 +85,17 @@ public void onCraftPilot(CraftDetectEvent event) {
if (direction == CruiseDirection.NONE) {
direction = currentDirection;
} else if (direction != currentDirection && requireCruiseSignAlignment) {
craft.getAudience().sendMessage(Component.text(ChatUtils.MOVECRAFT_COMMAND_PREFIX
// TODO: Remove cast when maven cache is cleared
((Audience) craft.getAudience()).sendMessage(Component.text(ChatUtils.MOVECRAFT_COMMAND_PREFIX
+ "Detection failed: All cruise signs must face the same way."));
event.setCancelled(true);
}
}
}

if (direction != CruiseDirection.NONE) {
if (!checkDimensions(craft.getHitBox(), direction, type, craft.getAudience())) {
// TODO: Remove cast when maven cache is cleared
if (!checkDimensions(craft.getHitBox(), direction, type, (Audience) craft.getAudience())) {
event.setCancelled(true);
return;
}
Expand Down

0 comments on commit 7a4ef47

Please sign in to comment.