Skip to content

Ajout du /profil#1341

Open
ar1hurgit wants to merge 6 commits into
ServerOpenMC:masterfrom
ar1hurgit:profil
Open

Ajout du /profil#1341
ar1hurgit wants to merge 6 commits into
ServerOpenMC:masterfrom
ar1hurgit:profil

Conversation

@ar1hurgit

@ar1hurgit ar1hurgit commented Jul 10, 2026

Copy link
Copy Markdown

close #303

ajout

  • add la commande /profile
  • Ouverture du profil shift + clic droit
  • Affichage statut, amis, mailbox, ville et temps de jeu
  • Intégration au menu principal (sup l'antien message)
image image

@gab4000

gab4000 commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Yeeeee enfin

@gab4000

gab4000 commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Par contre rename ta PR correctement stp

@ar1hurgit ar1hurgit changed the title feat(/profil): add interactif player profile menu [feat]: (/profil) add interactif player profile menu Jul 10, 2026
@iambibi iambibi changed the title [feat]: (/profil) add interactif player profile menu Ajout du /profil Jul 10, 2026
@iambibi iambibi added the 📦 Feature Ajout d'une fonctionnalité label Jul 10, 2026
Comment thread src/main/java/fr/openmc/core/features/profile/ProfileManager.java Outdated
private static final int IDENTITY_SLOT = 13;
private static final int CITY_SLOT = 15;
private static final int PLAYTIME_SLOT = 17;
private static final int CLOSE_SLOT = 35;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pas obligé de mettre les slots comme ça en static final, tu peux directement les mettre dans la map

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

j'aime bien ça fait plus clair

: TranslationManager.translation("feature.profile.status.offline")
.color(NamedTextColor.GRAY);

content.put(IDENTITY_SLOT, new ItemMenuBuilder(this, getHead(target), meta -> {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ptet vaut mieux utiliser la méthode ItemUtils.getPlayerHead

meta.lore(TranslationManager.translationLore(
"feature.profile.item.identity.lore",
status
).stream().map(line -> line.color(NamedTextColor.GRAY)).toList());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change directement la couleur dans les translations, et fais ça pour tout

content.put(IDENTITY_SLOT, createIdentityItem());
content.put(CITY_SLOT, createCityItem());
content.put(PLAYTIME_SLOT, createPlaytimeItem());
content.put(CLOSE_SLOT, createCloseItem());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw tu peux simplement mettre le contenu des méthodes dans la map

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

en fonction de la taille des methodes ça peut être un peu plus clean comme ça

Comment thread src/main/java/fr/openmc/core/features/profile/menu/ProfileMenu.java
Comment thread src/main/java/fr/openmc/core/features/profile/menu/ProfileMenu.java
@gab4000

gab4000 commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Ah oui et tu peux aussi respecter le template qu'on a fait pour les PRs

Comment thread src/main/java/fr/openmc/core/features/profile/ProfileManager.java
Comment thread src/main/java/fr/openmc/core/features/profile/menu/ProfileMenu.java
Comment on lines +260 to +266
private String getTargetName() {
String name = target.getName();
if (name != null && !name.isBlank()) {
return name;
}
return TranslationManager.translationString("feature.profile.player.unknown");
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

je vois pas tellement l'utilité on a un PlayerNameCache qui fait le meme travail

import java.util.Set;

@Credit(developers = {"ar1hurgit"})
public class ProfileManager extends Feature implements HasCommands, HasListeners {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

enleve ItemsAdder de ton serveur est dit moi si le serveur charge bien?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a me redire pls

Comment thread src/main/resources/translations/default/profile.properties Outdated
ar1hurgit and others added 2 commits July 11, 2026 13:36
Co-authored-by: iambibi_ <89582596+iambibi@users.noreply.github.com>
@ar1hurgit ar1hurgit marked this pull request as ready for review July 11, 2026 16:23
@iambibi

iambibi commented Jul 14, 2026

Copy link
Copy Markdown
Member

je re review cette PR

@iambibi iambibi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ça me parait ok, juste enleve items adder comme plugin et envoie moi le log de ton serveur pls (via mclogs)

import java.util.Set;

@Credit(developers = {"ar1hurgit"})
public class ProfileManager extends Feature implements HasCommands, HasListeners {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a me redire pls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📦 Feature Ajout d'une fonctionnalité

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] /profile

5 participants