Back command improvement (#422)

This commit is contained in:
Nailm authored and GitHub committed 2023-06-01 10:36:39 +01:00
1 parent c7ab1d4517
commit f7f5b1dab9
5 files changed
+12 -6

No files matched your search

+1 -1
View File
@@ -13,7 +13,7 @@ dependencies {
compileOnly 'net.william278:Annotaml:2.0.1' compileOnly 'net.william278:Annotaml:2.0.1'
compileOnly 'net.william278:DesertWell:2.0.4' compileOnly 'net.william278:DesertWell:2.0.4'
compileOnly 'com.github.MilkBowl:VaultAPI:1.7.1' compileOnly 'com.github.MilkBowl:VaultAPI:1.7.1'
compileOnly 'com.github.Emibergo02:RedisEconomy:3.2-SNAPSHOT' compileOnly 'com.github.Emibergo02:RedisEconomy:3.4-SNAPSHOT'
compileOnly 'me.clip:placeholderapi:2.11.3' compileOnly 'me.clip:placeholderapi:2.11.3'
compileOnly 'net.essentialsx:EssentialsX:2.19.7' compileOnly 'net.essentialsx:EssentialsX:2.19.7'
+2 -2
View File
@@ -26,11 +26,11 @@ dependencies {
compileOnly 'org.jetbrains:annotations:24.0.1' compileOnly 'org.jetbrains:annotations:24.0.1'
compileOnly 'com.google.guava:guava:32.0.0-jre' compileOnly 'com.google.guava:guava:32.0.0-jre'
compileOnly 'com.github.plan-player-analytics:Plan:5.5.1923' compileOnly 'com.github.plan-player-analytics:Plan:5.5.2391'
compileOnly 'com.github.BlueMap-Minecraft:BlueMapAPI:2.5.0' compileOnly 'com.github.BlueMap-Minecraft:BlueMapAPI:2.5.0'
compileOnly 'us.dynmap:DynmapCoreAPI:3.4' compileOnly 'us.dynmap:DynmapCoreAPI:3.4'
compileOnly 'maven.modrinth:pl3xmap:1.19.4-433' compileOnly 'maven.modrinth:pl3xmap:1.19.4-433'
testImplementation 'com.github.plan-player-analytics:Plan:5.5.1923' testImplementation 'com.github.plan-player-analytics:Plan:5.5.2391'
testImplementation 'com.github.yuriy-g:simple-java-plot:5c502c2e98' testImplementation 'com.github.yuriy-g:simple-java-plot:5c502c2e98'
} }
@@ -35,7 +35,10 @@ public class BackCommand extends InGameCommand {
protected BackCommand(@NotNull HuskHomes plugin) { protected BackCommand(@NotNull HuskHomes plugin) {
super("back", List.of(), "", plugin); super("back", List.of(), "", plugin);
addAdditionalPermissions(Map.of("death", false)); addAdditionalPermissions(Map.of(
"death", false,
"previous", false
));
} }
@Override @Override
@@ -62,7 +62,10 @@ public class Teleport {
this.economyActions = actions; this.economyActions = actions;
this.async = plugin.getSettings().doAsynchronousTeleports(); this.async = plugin.getSettings().doAsynchronousTeleports();
this.updateLastPosition = updateLastPosition && plugin.getCommand(BackCommand.class) this.updateLastPosition = updateLastPosition && plugin.getCommand(BackCommand.class)
.map(command -> executor.hasPermission(command.getPermission())) .map(command ->
executor.hasPermission(command.getPermission()) &&
executor.hasPermission(command.getPermission("previous"))
)
.orElse(false); .orElse(false);
} }
+1 -1
View File
@@ -15,7 +15,7 @@ dependencies {
compileOnly 'net.william278:DesertWell:2.0.4' compileOnly 'net.william278:DesertWell:2.0.4'
compileOnly 'me.lucko:commodore:2.2' compileOnly 'me.lucko:commodore:2.2'
compileOnly 'com.github.MilkBowl:VaultAPI:1.7.1' compileOnly 'com.github.MilkBowl:VaultAPI:1.7.1'
compileOnly 'com.github.Emibergo02:RedisEconomy:3.2-SNAPSHOT' compileOnly 'com.github.Emibergo02:RedisEconomy:3.4-SNAPSHOT'
compileOnly 'me.clip:placeholderapi:2.11.3' compileOnly 'me.clip:placeholderapi:2.11.3'
} }