Skip to content

Commit 97266c5

Browse files
Merge branch 'main' into Development
2 parents ce6f250 + 7375530 commit 97266c5

File tree

6 files changed

+37
-4
lines changed

6 files changed

+37
-4
lines changed

build.gradle

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ plugins {
2323
id "de.undercouch.download" version "5.0.1"
2424
}
2525

26-
version '1.12.1-1.20.1'
26+
version '1.12.3-1.20.1'
2727
def nmsVersion = "1.20.1" //[NMS]
2828
def apiVersion = '1.20'
2929
def specialSourceVersion = '1.11.0' //[NMS]
@@ -134,12 +134,12 @@ dependencies {
134134
//Random Api's
135135
implementation 'com.github.DeadSilenceIV:AdvancedChestsAPI:2.9-BETA'
136136
implementation 'com.sk89q.worldguard:worldguard-bukkit:7.0.8'
137-
implementation "com.github.FrancoBM12:API-MagicCosmetics:1.9.85"
137+
implementation "com.github.FrancoBM12:API-MagicCosmetics:2.2.2"
138138
implementation 'me.clip:placeholderapi:2.11.2'
139139
implementation 'com.github.LoneDev6:api-itemsadder:3.2.5'
140140
implementation 'io.th0rgal:oraxen:1.94.0'
141141
implementation 'com.massivecraft:Factions:1.6.9.5-U0.6.21'
142-
implementation "com.github.angeschossen:ChestProtectAPI:3.6.0"
142+
implementation "com.github.angeschossen:ChestProtectAPI:3.9.1"
143143
implementation "com.github.TechFortress:GriefPrevention:16.18.1"
144144
implementation 'xyz.xenondevs:particle:1.8.1'
145145
compileOnly 'com.griefdefender:api:2.1.0-SNAPSHOT'
@@ -154,6 +154,7 @@ dependencies {
154154
compileOnly 'net.kyori:adventure-api:4.13.1'
155155
compileOnly 'io.github.mqzn:mCommands-spigot:1.1.0'
156156
compileOnly 'io.github.mqzn:mCommands-common:1.1.0'
157+
implementation 'com.google.guava:guava:30.1-jre'
157158
compileOnly fileTree(dir: 'libs', include: ['*.jar'])
158159
}
159160

libs/LockettePro-2.11.1.jar

96.4 KB
Binary file not shown.

src/main/java/com/volmit/adapt/Adapt.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,9 @@ public void start() {
142142
if (getServer().getPluginManager().getPlugin("GriefPrevention") != null) {
143143
protectorRegistry.registerProtector(new GriefPreventionProtector());
144144
}
145+
if (getServer().getPluginManager().getPlugin("LockettePro") != null) {
146+
protectorRegistry.registerProtector(new LocketteProProtector());
147+
}
145148
glowingEntities = new GlowingEntities(this);
146149
parser.parse(new CommandAdapt());
147150
}

src/main/java/com/volmit/adapt/AdaptConfig.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ public static class Protector {
115115
private boolean residence = true;
116116
private boolean chestProtect = true;
117117
private boolean griefprevention = true;
118+
private boolean lockettePro = true;
118119
}
119120

120121

src/main/java/com/volmit/adapt/content/protector/ChestProtectProtector.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import com.volmit.adapt.api.adaptation.Adaptation;
66
import com.volmit.adapt.api.protection.Protector;
77
import me.angeschossen.chestprotect.api.addons.ChestProtectAddon;
8-
import me.angeschossen.chestprotect.api.objects.BlockProtection;
8+
import me.angeschossen.chestprotect.api.protection.block.BlockProtection;
99
import org.bukkit.Location;
1010
import org.bukkit.entity.Player;
1111

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package com.volmit.adapt.content.protector;
2+
3+
import com.volmit.adapt.Adapt;
4+
import com.volmit.adapt.AdaptConfig;
5+
import com.volmit.adapt.api.adaptation.Adaptation;
6+
import com.volmit.adapt.api.protection.Protector;
7+
import me.angeschossen.chestprotect.api.addons.ChestProtectAddon;
8+
import me.angeschossen.chestprotect.api.protection.block.BlockProtection;
9+
import me.crafter.mc.lockettepro.LocketteProAPI;
10+
import org.bukkit.Location;
11+
import org.bukkit.entity.Player;
12+
13+
public class LocketteProProtector implements Protector {
14+
@Override
15+
public boolean canAccessChest(Player player, Location chestlocation, Adaptation<?> adaptation) {
16+
return LocketteProAPI.isOwner(chestlocation.getBlock(), player);
17+
}
18+
19+
@Override
20+
public String getName() {
21+
return "LockettePro";
22+
}
23+
24+
@Override
25+
public boolean isEnabledByDefault() {
26+
return AdaptConfig.get().getProtectorSupport().isLockettePro();
27+
}
28+
}

0 commit comments

Comments
 (0)