feat: duo roles support
This commit is contained in:
parent
ba72073bb1
commit
1b736b5e31
@ -48,8 +48,14 @@ public class LGConfiguration extends Command {
|
||||
if (integer==null) integer = 0;
|
||||
|
||||
switch (event.getClickType()) {
|
||||
case LEFT_CLICK -> integer = Math.min(integer+1, role.get().getRoleMaxCount());
|
||||
case RIGHT_CLICK -> integer = Math.max(integer-1, 0);
|
||||
case LEFT_CLICK -> {
|
||||
if (role.get().isDuo()) integer = 2;
|
||||
else integer = Math.min(integer+1, role.get().getRoleMaxCount());
|
||||
}
|
||||
case RIGHT_CLICK -> {
|
||||
if (role.get().isDuo()) integer = 0;
|
||||
else integer = Math.max(integer-1, 0);
|
||||
}
|
||||
}
|
||||
|
||||
if (integer > 0) guiItem.setItemStack(guiItem.getItemStack().withMaterial(Material.GREEN_TERRACOTTA).withAmount(integer));
|
||||
|
Loading…
Reference in New Issue
Block a user