Skip to content

Ajout du wrapper OMCPlayer#1343

Draft
AxenoDev wants to merge 8 commits into
ServerOpenMC:masterfrom
AxenoDev:feat/omcplayer
Draft

Ajout du wrapper OMCPlayer#1343
AxenoDev wants to merge 8 commits into
ServerOpenMC:masterfrom
AxenoDev:feat/omcplayer

Conversation

@AxenoDev

Copy link
Copy Markdown
Member

Petit résumé de la PR:

Étape nécessaire afin que la PR soit fini (si PR en draft)

  • Suivre le Code de Conduite
  • Enlever tous les imports non utilisés
  • Bien documenter la feature
  • Fournir un profileur (si besoin/demandé par un admin)
  • Avoir une milestone associée à la PR
  • Valider tout les checks
  • Tester et valider la feature/changement

Decrivez vos changements

@AxenoDev AxenoDev added this to the 2.5.0-beta-1 milestone Jul 11, 2026
@AxenoDev AxenoDev self-assigned this Jul 11, 2026
@AxenoDev AxenoDev added the 📦 Feature Ajout d'une fonctionnalité label Jul 11, 2026
@AxenoDev AxenoDev linked an issue Jul 11, 2026 that may be closed by this pull request
@AxenoDev

AxenoDev commented Jul 11, 2026

Copy link
Copy Markdown
Member Author

Plop ! des avis ? sur ce que je doit ajouter / ameliorer, etc ?

Comment thread src/main/java/fr/openmc/api/entity/player/OMCPlayer.java Outdated
Comment thread src/main/java/fr/openmc/api/entity/player/OMCPlayer.java Outdated
Comment thread src/main/java/fr/openmc/api/entity/player/OMCPlayer.java Outdated
return city;
}

public class Message {

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.

Pour devoir rallonger la ligne en faisant des omcplayer.message().send au lieu de faire OMCPlayer.sendMessagz ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

parcequ'il y a deja les sendMessage de Player

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.

Mhh c'est vrai mais tu peux faire des méthodes différentes genre OMCPlayer.sendMessage(Component, Prefix, MessageType, bool)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

dans ce cas la pourquoi faire un OMCPlayer.sendMessage
autant utiliser le MessageManager quoi

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.

?

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.

Tu penses vraiment que des gens vont faire send(Component) et qu'ils vont savoir que ça envoie avec un prefix OPEN_MC ? Fin je trouve c'est ce complexifier la vie pour rien.
Quand tu utilises cette méthode les gens ne savent pas forcément de quoi il s'agit et de quoi il est utilisé avant de regarder le code de la méthode

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 vrai stv ping nirbose et toutouchien pour leur demander leur avis car le mien est différent des autres je suppose

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Tu penses vraiment que des gens vont faire send(Component) et qu'ils vont savoir que ça envoie avec un prefix OPEN_MC ? Fin je trouve c'est ce complexifier la vie pour rien. Quand tu utilises cette méthode les gens ne savent pas forcément de quoi il s'agit et de quoi il est utilisé avant de regarder le code de la méthode

bah c'est pour ca que j'ai mis dans une sous class message, et que c'est une methode custom qui vient de OMCPlayer et pas de Player, donc bon...
apres je peux ajouter la JavaDoc hein

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.

On va attendre d'autres review ptet

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 veux voir les avis des autres contributeur


public class City {
@Nullable
public fr.openmc.core.features.city.City getCity() {

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.

Mhh y'a pas pourtant plusieures classes City 🙃

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

? pas compris ?

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.

Ben je crois que une IA a mis le package entier de la classe fr.openmc.core.features.city.models.City

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

hein

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.

Screenshot_20260712_121316_GitHub.jpg

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

CityManager.getCity return fr.openmc.core.features.city.City

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.

Pourquoi avoir mis le package entier pour détecter la classe City ??

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

parceque dans ma class OMCPlayer j'ai deja une class City

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

J'aurais pus la rename c'est vrai, mais j'me suis dis ca que maintenant

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.

Ahh oui tes sous classes

Comment thread src/main/java/fr/openmc/api/entity/player/OMCPlayer.java Outdated
@iambibi

iambibi commented Jul 12, 2026

Copy link
Copy Markdown
Member

Je vais redodo, je chercherais des choses à mettre, (je regarderai le code pour avoir des idées, j'avais pensé à certaines utiles comme PlayerUtils.hasEnough ou .removeItems ect

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] Creation d'un OMCPlayer

2 participants