Merge branch 'development'

This commit is contained in:
Brianna 2020-06-07 10:06:43 -05:00
commit 6f0a4a45ed
6 changed files with 22 additions and 14 deletions

View File

@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.songoda</groupId>
<artifactId>skyblock</artifactId>
<version>2.2.14</version>
<version>2.2.15</version>
<packaging>jar</packaging>
<build>
<defaultGoal>clean install</defaultGoal>

View File

@ -215,7 +215,8 @@ public class IslandManager {
return false;
}
data.setIslandCreationCount(amt + 1);
if (data != null)
data.setIslandCreationCount(amt + 1);
Island island = new Island(player);
island.setStructure(structure.getName());
@ -811,7 +812,7 @@ public class IslandManager {
scoreboard.run();
}
} catch (IllegalPluginAccessException e) {
} catch (Exception e) {
}
}

View File

@ -20,7 +20,7 @@ public class PermissionManager {
private final SkyBlock plugin;
private final List<BasicPermission> registeredPermissions = new ArrayList<>();
private final Map<String, BasicPermission> registeredPermissions = new HashMap<>();
private List<HandlerWrapper> registeredHandlers = new LinkedList<>();
public PermissionManager(SkyBlock plugin) {
@ -109,7 +109,7 @@ public class PermissionManager {
}
public boolean registerPermission(BasicPermission permission) {
registeredPermissions.add(permission);
registeredPermissions.put(permission.getName().toUpperCase(), permission);
Set<Method> methods;
try {
Method[] publicMethods = permission.getClass().getMethods();
@ -198,17 +198,15 @@ public class PermissionManager {
}
public BasicPermission getPermission(String permissionName) {
return registeredPermissions.stream()
.filter(p -> p.getName().equalsIgnoreCase(permissionName))
.findFirst().orElse(null);
return registeredPermissions.get(permissionName.toUpperCase());
}
public List<BasicPermission> getPermissions() {
return new ArrayList<>(registeredPermissions);
return new ArrayList<>(registeredPermissions.values());
}
public List<ListeningPermission> getListeningPermissions() {
return registeredPermissions.stream()
return registeredPermissions.values().stream()
.filter(p -> p instanceof ListeningPermission)
.map(p -> (ListeningPermission) p)
.collect(Collectors.toList());

View File

@ -63,6 +63,15 @@ public class WorldManager {
Bukkit.getServer().getScheduler().runTask(skyblock, () -> registerMultiverse(endWorldName, endWorldEnvironment));
}
if (normalWorld != null)
normalWorld.setDifficulty(Difficulty.valueOf(configLoad.getString("Island.World.Normal.Difficulty")));
if (netherWorld != null)
netherWorld.setDifficulty(Difficulty.valueOf(configLoad.getString("Island.World.Nether.Difficulty")));
if (endWorld != null)
endWorld.setDifficulty(Difficulty.valueOf(configLoad.getString("Island.World.End.Difficulty")));
}
public void registerMultiverse(String worldName, World.Environment environment) {

View File

@ -1681,7 +1681,6 @@ challenges:
require:
- 'NEAR:CHICKEN 1'
- 'NEAR:COW 1'
- 'NEAR:POLAR_BEAR 1'
- 'NEAR:RABBIT 1'
- 'NEAR:WOLF 1'
- 'NEAR:DONKEY 1'
@ -1690,7 +1689,6 @@ challenges:
- 'NEAR:OCELOT 1'
- 'NEAR:MUSHROOM_COW 1'
- 'NEAR:SHEEP 1'
- 'NEAR:PARROT 1'
- 'NEAR:VILLAGER 1'
- 'NEAR:SKELETON_HORSE 1'
reward:
@ -1709,7 +1707,6 @@ challenges:
- '&e- within a radius of 30 blocks:'
- '&e - 1 Chicken'
- '&e - 1 Cow'
- '&e - 1 Polar Bear'
- '&e - 1 Rabbit'
- '&e - 1 Wolf'
- '&e - 1 Donkey'
@ -1718,7 +1715,6 @@ challenges:
- '&e - 1 Ocelot'
- '&e - 1 Mooshroom cow'
- '&e - 1 Sheep'
- '&e - 1 Parrot'
- '&e - 1 Villager'
- '&e - 1 Skeleton Horse'
- '&c&lRewards:'

View File

@ -41,10 +41,12 @@ Island:
# If lava disabled, the world will be a water world.
# -1 to disable Nether and End unlock prices.
# Valid Environments: NORMAL, NETHER, THE_END
# Valid Difficulties: PEACEFUL, EASY, NORMAL, HARD
Normal:
Name: "island_normal_world"
IslandSpawnHeight: 72
Environment: NORMAL
Difficulty: NORMAL
Liquid:
Enable: false
Lava: false
@ -55,6 +57,7 @@ Island:
Environment: NETHER
UnlockPrice: 10000
Enable: true
Difficulty: NORMAL
Liquid:
Enable: false
Lava: true
@ -65,6 +68,7 @@ Island:
Environment: THE_END
UnlockPrice: 50000
Enable: true
Difficulty: NORMAL
Liquid:
Enable: false
Lava: false