Skip to content

Commit

Permalink
1.13.1
Browse files Browse the repository at this point in the history
  • Loading branch information
BenceX100 committed Jul 14, 2024
1 parent dc304a2 commit 450c7bb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.artillexstudios</groupId>
<artifactId>AxGraves</artifactId>
<version>1.13.0</version>
<version>1.13.1</version>
<packaging>jar</packaging>

<name>AxGraves</name>
Expand Down Expand Up @@ -106,7 +106,7 @@
<dependency>
<groupId>com.artillexstudios.axapi</groupId>
<artifactId>axapi</artifactId>
<version>1.4.280</version>
<version>1.4.292</version>
<scope>compile</scope>
<classifier>all</classifier>
</dependency>
Expand All @@ -119,7 +119,7 @@
<dependency>
<groupId>dev.triumphteam</groupId>
<artifactId>triumph-gui</artifactId>
<version>3.1.7</version>
<version>3.1.10</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.artillexstudios.axapi.utils.StringUtils;
import com.artillexstudios.axgraves.commands.subcommands.SubCommandList;
import com.artillexstudios.axgraves.commands.subcommands.SubCommandReload;
import com.artillexstudios.axgraves.grave.SpawnedGraves;
import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.entity.Player;
Expand Down Expand Up @@ -41,6 +42,10 @@ public void list(@NotNull Player sender) {
@Subcommand("tp")
@CommandPermission("axgraves.tp")
public void tp(@NotNull Player sender, World world, double x, double y, double z) {
PaperUtils.teleportAsync(sender, new Location(world, x, y, z));
final Location location = new Location(world, x, y, z);
if (!sender.hasPermission("axgraves.tp.bypass") && SpawnedGraves.getGraves().stream().filter(grave -> grave.getPlayer().getUniqueId().equals(sender.getUniqueId())).filter(grave -> grave.getLocation().equals(location)).findAny().isEmpty()) {
return;
}
PaperUtils.teleportAsync(sender, location);
}
}
4 changes: 4 additions & 0 deletions src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,8 @@ permissions:
axgraves.list:
default: true
axgraves.list.other:
default: op
axgraves.tp:
default: op
axgraves.tp.bypass:
default: op

0 comments on commit 450c7bb

Please sign in to comment.