Improve create warps flag.
Rename the flag to PLACE_WARP as it is a more proper name. Also, add a click handler that limits setting value from member to owner, as visitors should not be allowed. Also, set default value outside island range as false.
This commit is contained in:
parent
8be844b59f
commit
363a628244
|
@ -155,9 +155,13 @@ public class Warp extends Addon {
|
|||
this.setState(State.DISABLED);
|
||||
}
|
||||
|
||||
this.createWarpFlag = new Flag.Builder("SET-WARP", Material.OAK_SIGN)
|
||||
this.createWarpFlag = new Flag.Builder("PLACE_WARP", Material.OAK_SIGN)
|
||||
.addon(this)
|
||||
.defaultRank(RanksManager.MEMBER_RANK)
|
||||
.clickHandler(new CycleClick("PLACE_WARP",
|
||||
RanksManager.MEMBER_RANK,
|
||||
RanksManager.OWNER_RANK)).
|
||||
.defaultSetting(false).
|
||||
.mode(Flag.Mode.EXPERT)
|
||||
.build();
|
||||
|
||||
|
|
Loading…
Reference in New Issue