mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-12 13:43:57 +01:00
Grant permission rewards to offline players
This commit is contained in:
parent
bde9eae68f
commit
6eb71d6021
@ -498,13 +498,18 @@ public class Quest {
|
||||
}
|
||||
none = null;
|
||||
}
|
||||
if (player.isOnline()) {
|
||||
for (String s : rews.getPermissions()) {
|
||||
if (plugin.getDependencies().getVaultPermission() != null) {
|
||||
plugin.getDependencies().getVaultPermission().playerAdd((Player)player, s);
|
||||
}
|
||||
none = null;
|
||||
for (int i = 0; i < rews.getPermissions().size(); i++) {
|
||||
if (plugin.getDependencies().getVaultPermission() != null) {
|
||||
String perm = rews.getPermissions().get(i);
|
||||
plugin.getDependencies().getVaultPermission().playerAdd(null, player, perm);
|
||||
/*String world = rews.getPermissionWorlds().get(i);
|
||||
if (world == null) {
|
||||
plugin.getDependencies().getVaultPermission().playerAdd(null, player, perm);
|
||||
} else {
|
||||
plugin.getDependencies().getVaultPermission().playerAdd(world, player, perm);
|
||||
}*/
|
||||
}
|
||||
none = null;
|
||||
}
|
||||
for (String s : rews.getMcmmoSkills()) {
|
||||
UserManager.getOfflinePlayer(player).getProfile().addLevels(Quests.getMcMMOSkill(s),
|
||||
|
@ -26,6 +26,7 @@ public class Rewards {
|
||||
private List<String> commands = new LinkedList<String>();
|
||||
private List<String> commandsOverrideDisplay = new LinkedList<String>();
|
||||
private List<String> permissions = new LinkedList<String>();
|
||||
private List<String> permissionWorlds = new LinkedList<String>();
|
||||
private List<ItemStack> items = new LinkedList<ItemStack>();
|
||||
private List<String> mcmmoSkills = new LinkedList<String>();
|
||||
private List<Integer> mcmmoAmounts = new LinkedList<Integer>();
|
||||
@ -70,6 +71,12 @@ public class Rewards {
|
||||
public void setPermissions(List<String> permissions) {
|
||||
this.permissions = permissions;
|
||||
}
|
||||
public List<String> getPermissionWorlds() {
|
||||
return permissionWorlds;
|
||||
}
|
||||
public void setPermissionWorlds(List<String> worldNames) {
|
||||
this.permissionWorlds = worldNames;
|
||||
}
|
||||
public List<ItemStack> getItems() {
|
||||
return items;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user