Skip to content

Commit

Permalink
Merge pull request #253 from Slimefun/fix/plotsquared_update
Browse files Browse the repository at this point in the history
Updated plotsquared module
  • Loading branch information
Sfiguz7 authored Mar 20, 2024
2 parents a23d95e + e3a3744 commit b256895
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 11 deletions.
35 changes: 28 additions & 7 deletions dough-protection/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,24 @@
<artifactId>dough-protection</artifactId>
<packaging>jar</packaging>

<properties>
<plotsquared.version>7.3.6</plotsquared.version>
</properties>

<!-- TODO: Bring down this repo count -->
<repositories>
<repository>
<id>sonatype-oss-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</repository>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io/</url>
</repository>
<repository>
<id>papermc</id>
<url>https://repo.papermc.io/repository/maven-public/</url>
</repository>
<repository>
<id>sonatype-oss-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</repository>
<repository>
<id>coreprotect-repo</id>
<url>https://maven.playpro.com/</url>
Expand Down Expand Up @@ -164,9 +173,9 @@

<!-- PlotSquared -->
<dependency>
<groupId>com.plotsquared</groupId>
<artifactId>PlotSquared-Core</artifactId>
<version>6.11.1</version>
<groupId>com.intellectualsites.plotsquared</groupId>
<artifactId>plotsquared-core</artifactId>
<version>${plotsquared.version}</version>
<scope>provided</scope>
<exclusions>
<exclusion>
Expand All @@ -175,6 +184,18 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.intellectualsites.plotsquared</groupId>
<artifactId>plotsquared-bukkit</artifactId>
<version>${plotsquared.version}</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<artifactId>plotsquared-core</artifactId>
<groupId>*</groupId>
</exclusion>
</exclusions>
</dependency>

<!-- RedProtect -->
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@

import org.bukkit.OfflinePlayer;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import org.bukkit.plugin.Plugin;

import com.plotsquared.bukkit.util.BukkitUtil;
import com.plotsquared.core.location.Location;
import com.plotsquared.core.permissions.Permission;
import com.plotsquared.core.player.PlotPlayer;
import com.plotsquared.core.plot.Plot;
import com.plotsquared.core.util.Permissions;

import io.github.bakedlibs.dough.protection.Interaction;
import io.github.bakedlibs.dough.protection.ProtectionModule;
Expand Down Expand Up @@ -53,12 +54,12 @@ private boolean check(OfflinePlayer p, Interaction action) {

switch (action) {
case INTERACT_BLOCK:
return Permissions.hasPermission(player, Permission.PERMISSION_ADMIN_INTERACT_UNOWNED);
return player.hasPermission(Permission.PERMISSION_ADMIN_INTERACT_UNOWNED);
case ATTACK_PLAYER:
return Permissions.hasPermission(player, Permission.PERMISSION_ADMIN_PVP);
return player.hasPermission(Permission.PERMISSION_ADMIN_PVP);
case PLACE_BLOCK:
default:
return Permissions.hasPermission(player, Permission.PERMISSION_ADMIN_BUILD_UNOWNED);
return player.hasPermission(Permission.PERMISSION_ADMIN_BUILD_UNOWNED);
}
}
}

0 comments on commit b256895

Please sign in to comment.