-
Notifications
You must be signed in to change notification settings - Fork 31
Changements sur les grades #1056
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
iambibi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Arrete voir avec tes fourres tout (c'est vraiment pas du tout mais du tout compréhesible par les joueurs)
Met ta pr en draft si pas encore testé
| if (edit) { | ||
| map.put(52, new ItemBuilder(this, Material.RED_DYE, itemMeta -> { | ||
| itemMeta.displayName(Component.text("§cTout retirer")); | ||
| itemMeta.lore(List.of(Component.text("§7Cliquez pour retirer toutes les permissions du membre"))); | ||
| }).setOnClick(inventoryClickEvent -> { | ||
| if (!edit) | ||
| MessagesManager.sendMessage(getOwner(), Component.text("§cVous n'avez pas la permission de modifier les permissions des membres"), Prefix.CITY, MessageType.ERROR, true); | ||
| else { | ||
| CityPermsCommands.removeAll(getOwner(), CacheOfflinePlayer.getOfflinePlayer(memberUUID)); | ||
| new CityPermsMenu(getOwner(), memberUUID, true).open(); | ||
| } | ||
| })); | ||
|
|
||
| map.put(53, new ItemBuilder(this, Material.GREEN_DYE, itemMeta -> { | ||
| itemMeta.displayName(Component.text("§aTout ajouter")); | ||
| itemMeta.lore(List.of(Component.text("§7Cliquez pour ajouter toutes les permissions au membre"))); | ||
| }).setOnClick(inventoryClickEvent -> { | ||
| if (!edit) | ||
| MessagesManager.sendMessage(getOwner(), Component.text("§cVous n'avez pas la permission de modifier les permissions des membres"), Prefix.CITY, MessageType.ERROR, true); | ||
| else { | ||
| CityPermsCommands.addAll(getOwner(), CacheOfflinePlayer.getOfflinePlayer(memberUUID)); | ||
| new CityPermsMenu(getOwner(), memberUUID, true).open(); | ||
| } | ||
| })); | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fait un unique bouton (tout ajouter, tout retirer) genre clique gauche tu ajoutes tout, clique droit tu retires tt
| if (canEdit) { | ||
| map.put(52, new ItemBuilder(this, Material.RED_DYE, itemMeta -> { | ||
| itemMeta.displayName(Component.text("§cTout retirer")); | ||
| itemMeta.lore(List.of(Component.text("§7Cliquez pour retirer toutes les permissions du membre"))); | ||
| }).setOnClick(inventoryClickEvent -> { | ||
| if (!canEdit) | ||
| MessagesManager.sendMessage(getOwner(), Component.text("§cVous n'avez pas la permission de modifier les permissions des grades"), Prefix.CITY, MessageType.ERROR, true); | ||
| else { | ||
| CityRankCommands.removeAllPermissions(getOwner(), newRank); | ||
| new CityRankPermsMenu(getOwner(), oldRank, newRank, true, page).open(); | ||
| } | ||
| })); | ||
|
|
||
| map.put(53, new ItemBuilder(this, Material.GREEN_DYE, itemMeta -> { | ||
| itemMeta.displayName(Component.text("§aTout ajouter")); | ||
| itemMeta.lore(List.of(Component.text("§7Cliquez pour ajouter toutes les permissions au membre"))); | ||
| }).setOnClick(inventoryClickEvent -> { | ||
| if (!canEdit) | ||
| MessagesManager.sendMessage(getOwner(), Component.text("§cVous n'avez pas la permission de modifier les permissions des grades"), Prefix.CITY, MessageType.ERROR, true); | ||
| else { | ||
| CityRankCommands.addAllPermissions(getOwner(), newRank); | ||
| new CityRankPermsMenu(getOwner(), oldRank, newRank, true, page).open(); | ||
| } | ||
| })); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
idem
|
PR en pause pendant qq semaines |
Petit résumé de la PR:
Étape nécessaire afin que la PR soit fini (si PR en draft)
Decrivez vos changements