mirror of
https://github.com/PikaMug/Quests.git
synced 2024-12-25 10:38:21 +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;
|
none = null;
|
||||||
}
|
}
|
||||||
if (player.isOnline()) {
|
for (int i = 0; i < rews.getPermissions().size(); i++) {
|
||||||
for (String s : rews.getPermissions()) {
|
if (plugin.getDependencies().getVaultPermission() != null) {
|
||||||
if (plugin.getDependencies().getVaultPermission() != null) {
|
String perm = rews.getPermissions().get(i);
|
||||||
plugin.getDependencies().getVaultPermission().playerAdd((Player)player, s);
|
plugin.getDependencies().getVaultPermission().playerAdd(null, player, perm);
|
||||||
}
|
/*String world = rews.getPermissionWorlds().get(i);
|
||||||
none = null;
|
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()) {
|
for (String s : rews.getMcmmoSkills()) {
|
||||||
UserManager.getOfflinePlayer(player).getProfile().addLevels(Quests.getMcMMOSkill(s),
|
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> commands = new LinkedList<String>();
|
||||||
private List<String> commandsOverrideDisplay = new LinkedList<String>();
|
private List<String> commandsOverrideDisplay = new LinkedList<String>();
|
||||||
private List<String> permissions = 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<ItemStack> items = new LinkedList<ItemStack>();
|
||||||
private List<String> mcmmoSkills = new LinkedList<String>();
|
private List<String> mcmmoSkills = new LinkedList<String>();
|
||||||
private List<Integer> mcmmoAmounts = new LinkedList<Integer>();
|
private List<Integer> mcmmoAmounts = new LinkedList<Integer>();
|
||||||
@ -70,6 +71,12 @@ public class Rewards {
|
|||||||
public void setPermissions(List<String> permissions) {
|
public void setPermissions(List<String> permissions) {
|
||||||
this.permissions = permissions;
|
this.permissions = permissions;
|
||||||
}
|
}
|
||||||
|
public List<String> getPermissionWorlds() {
|
||||||
|
return permissionWorlds;
|
||||||
|
}
|
||||||
|
public void setPermissionWorlds(List<String> worldNames) {
|
||||||
|
this.permissionWorlds = worldNames;
|
||||||
|
}
|
||||||
public List<ItemStack> getItems() {
|
public List<ItemStack> getItems() {
|
||||||
return items;
|
return items;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user