Fixed permission reference

This commit is contained in:
tastybento 2019-08-20 07:50:11 -07:00
parent af3a055bcc
commit 8c6fb4f4ee
3 changed files with 9 additions and 9 deletions

View File

@ -58,15 +58,15 @@
<!-- Non-minecraft related dependencies -->
<powermock.version>2.0.2</powermock.version>
<!-- More visible way how to change dependency versions -->
<spigot.version>1.13.2-R0.1-SNAPSHOT</spigot.version>
<bentobox.version>1.6.0-SNAPSHOT</bentobox.version>
<spigot.version>1.14.4-R0.1-SNAPSHOT</spigot.version>
<bentobox.version>1.6.0</bentobox.version>
<level.version>1.5.0</level.version>
<!-- Revision variable removes warning about dynamic version -->
<revision>${build.version}-SNAPSHOT</revision>
<!-- Do not change unless you want different name for local builds. -->
<build.number>-LOCAL</build.number>
<!-- This allows to change between versions. -->
<build.version>1.6.0</build.version>
<build.version>1.6.1</build.version>
</properties>
<!-- Profiles will allow to automatically change build version. -->

View File

@ -97,7 +97,7 @@ public class WarpSignsListener implements Listener {
// Welcome sign detected - check permissions
if (!(user.hasPermission(addon.getPermPrefix(b.getWorld()) + "island.addwarp"))) {
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;
}
// Get level if level addon is available

View File

@ -50,6 +50,7 @@ public class WarpSignsManager {
private Database<WarpsData> handler;
private Warp addon;
private WarpsData warpsData = new WarpsData();
/**
* Get the warp map for this world
@ -164,12 +165,11 @@ public class WarpSignsManager {
private void loadWarpList() {
addon.getLogger().info("Loading warps...");
worldsWarpList = new HashMap<>();
WarpsData warps = new WarpsData();
if (handler.objectExists("warps")) {
warps = handler.loadObject("warps");
warpsData = handler.loadObject("warps");
// Load into map
if (warps != null) {
warps.getWarpSigns().forEach((k,v) -> {
if (warpsData != null) {
warpsData.getWarpSigns().forEach((k,v) -> {
if (k != null && k.getWorld() != null && k.getBlock().getType().name().contains("SIGN")) {
// Add to map
getWarpMap(k.getWorld()).put(v, k);
@ -240,7 +240,7 @@ public class WarpSignsManager {
* Saves the warp lists to the database
*/
public void saveWarpList() {
handler.saveObject(new WarpsData().save(worldsWarpList));
handler.saveObject(warpsData .save(worldsWarpList));
}
/**