mirror of
https://github.com/BentoBoxWorld/Warps.git
synced 2024-09-27 14:52:55 +02:00
Fixed permission reference
This commit is contained in:
parent
af3a055bcc
commit
8c6fb4f4ee
6
pom.xml
6
pom.xml
@ -58,15 +58,15 @@
|
|||||||
<!-- Non-minecraft related dependencies -->
|
<!-- Non-minecraft related dependencies -->
|
||||||
<powermock.version>2.0.2</powermock.version>
|
<powermock.version>2.0.2</powermock.version>
|
||||||
<!-- More visible way how to change dependency versions -->
|
<!-- More visible way how to change dependency versions -->
|
||||||
<spigot.version>1.13.2-R0.1-SNAPSHOT</spigot.version>
|
<spigot.version>1.14.4-R0.1-SNAPSHOT</spigot.version>
|
||||||
<bentobox.version>1.6.0-SNAPSHOT</bentobox.version>
|
<bentobox.version>1.6.0</bentobox.version>
|
||||||
<level.version>1.5.0</level.version>
|
<level.version>1.5.0</level.version>
|
||||||
<!-- Revision variable removes warning about dynamic version -->
|
<!-- Revision variable removes warning about dynamic version -->
|
||||||
<revision>${build.version}-SNAPSHOT</revision>
|
<revision>${build.version}-SNAPSHOT</revision>
|
||||||
<!-- Do not change unless you want different name for local builds. -->
|
<!-- Do not change unless you want different name for local builds. -->
|
||||||
<build.number>-LOCAL</build.number>
|
<build.number>-LOCAL</build.number>
|
||||||
<!-- This allows to change between versions. -->
|
<!-- This allows to change between versions. -->
|
||||||
<build.version>1.6.0</build.version>
|
<build.version>1.6.1</build.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<!-- Profiles will allow to automatically change build version. -->
|
<!-- Profiles will allow to automatically change build version. -->
|
||||||
|
@ -97,7 +97,7 @@ public class WarpSignsListener implements Listener {
|
|||||||
// Welcome sign detected - check permissions
|
// Welcome sign detected - check permissions
|
||||||
if (!(user.hasPermission(addon.getPermPrefix(b.getWorld()) + "island.addwarp"))) {
|
if (!(user.hasPermission(addon.getPermPrefix(b.getWorld()) + "island.addwarp"))) {
|
||||||
user.sendMessage("warps.error.no-permission");
|
user.sendMessage("warps.error.no-permission");
|
||||||
user.sendMessage("general.errors.you-need", "[permission]", addon.getPermPrefix(b.getWorld()) + "island.addwarp");
|
user.sendMessage("general.errors.no-permission", "[permission]", addon.getPermPrefix(b.getWorld()) + "island.addwarp");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Get level if level addon is available
|
// Get level if level addon is available
|
||||||
|
@ -50,6 +50,7 @@ public class WarpSignsManager {
|
|||||||
private Database<WarpsData> handler;
|
private Database<WarpsData> handler;
|
||||||
|
|
||||||
private Warp addon;
|
private Warp addon;
|
||||||
|
private WarpsData warpsData = new WarpsData();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the warp map for this world
|
* Get the warp map for this world
|
||||||
@ -164,12 +165,11 @@ public class WarpSignsManager {
|
|||||||
private void loadWarpList() {
|
private void loadWarpList() {
|
||||||
addon.getLogger().info("Loading warps...");
|
addon.getLogger().info("Loading warps...");
|
||||||
worldsWarpList = new HashMap<>();
|
worldsWarpList = new HashMap<>();
|
||||||
WarpsData warps = new WarpsData();
|
|
||||||
if (handler.objectExists("warps")) {
|
if (handler.objectExists("warps")) {
|
||||||
warps = handler.loadObject("warps");
|
warpsData = handler.loadObject("warps");
|
||||||
// Load into map
|
// Load into map
|
||||||
if (warps != null) {
|
if (warpsData != null) {
|
||||||
warps.getWarpSigns().forEach((k,v) -> {
|
warpsData.getWarpSigns().forEach((k,v) -> {
|
||||||
if (k != null && k.getWorld() != null && k.getBlock().getType().name().contains("SIGN")) {
|
if (k != null && k.getWorld() != null && k.getBlock().getType().name().contains("SIGN")) {
|
||||||
// Add to map
|
// Add to map
|
||||||
getWarpMap(k.getWorld()).put(v, k);
|
getWarpMap(k.getWorld()).put(v, k);
|
||||||
@ -240,7 +240,7 @@ public class WarpSignsManager {
|
|||||||
* Saves the warp lists to the database
|
* Saves the warp lists to the database
|
||||||
*/
|
*/
|
||||||
public void saveWarpList() {
|
public void saveWarpList() {
|
||||||
handler.saveObject(new WarpsData().save(worldsWarpList));
|
handler.saveObject(warpsData .save(worldsWarpList));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user