Major revamp of Upgrade Waves.
Using a node setup similar to that of the classes-section, it is now possible to make complex Upgrade Waves that update weapons and armor on-the-fly. This also means 'permissions' upgrades.
This commit is contained in:
@@ -1061,6 +1061,17 @@ public class ArenaImpl implements Arena
|
||||
}
|
||||
p.recalculatePermissions();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addPermission(Player p, String perm, boolean value) {
|
||||
PermissionAttachment pa = attachments.get(p);
|
||||
if (pa == null) {
|
||||
pa = p.addAttachment(plugin);
|
||||
attachments.put(p, pa);
|
||||
}
|
||||
pa.setPermission(perm, value);
|
||||
p.recalculatePermissions();
|
||||
}
|
||||
|
||||
private void cleanup() {
|
||||
removeMonsters();
|
||||
|
||||
Reference in New Issue
Block a user