mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-01-23 16:41:42 +01:00
Fix settings panel bug NPE.
The parent needs to be set before it can be used.
This commit is contained in:
parent
be9b429308
commit
edd7bcfbd2
@ -54,9 +54,8 @@ public class SettingsTab implements Tab, ClickHandler {
|
||||
*/
|
||||
public SettingsTab(User user, Type type) {
|
||||
this.user = user;
|
||||
this.island = parent.getIsland();
|
||||
this.type = type;
|
||||
this.world = island.getWorld();
|
||||
// Island and world are set when the parent is set.
|
||||
}
|
||||
|
||||
/**
|
||||
@ -234,6 +233,9 @@ public class SettingsTab implements Tab, ClickHandler {
|
||||
@Override
|
||||
public void setParentPanel(TabbedPanel parent) {
|
||||
this.parent = parent;
|
||||
this.island = parent.getIsland();
|
||||
this.world = island.getWorld();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user