-
Notifications
You must be signed in to change notification settings - Fork 14
GroupAlgo #31
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?
GroupAlgo #31
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| package fr.ph1lou.werewolfplugin.configs; | ||
|
|
||
| import fr.ph1lou.werewolfapi.annotations.Configuration; | ||
| import fr.ph1lou.werewolfapi.annotations.ConfigurationBasic; | ||
| import fr.ph1lou.werewolfapi.basekeys.ConfigBase; | ||
|
|
||
| @Configuration(config = @ConfigurationBasic(key = "werewolf.configurations.group_algo.name", loreKey = "werewolf.configurations.group_algo.description", | ||
| appearInMenu = false)) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. une raison particulière pour ne pas le faire apparaitre dans le menu ? |
||
| public class GroupAlgo { | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| package fr.ph1lou.werewolfplugin.listeners; | ||
|
|
||
| import fr.ph1lou.werewolfapi.basekeys.ConfigBase; | ||
| import fr.ph1lou.werewolfapi.basekeys.Prefix; | ||
| import fr.ph1lou.werewolfapi.basekeys.TimerBase; | ||
| import fr.ph1lou.werewolfapi.enums.Day; | ||
|
|
@@ -41,7 +42,9 @@ public void onDay(DayEvent event) { | |
|
|
||
| Bukkit.broadcastMessage(game.translate(Prefix.ORANGE, "werewolf.announcement.day", | ||
| Formatter.number(event.getNumber()))); | ||
| groupSizeChange(); | ||
| if(game.getConfig().isConfigActive("werewolf.configurations.group_algo.name")){ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. la clef doit être mise en constante dans la classe ConfigBase dans Werewolfapi There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. J'ai pull request sur l'api There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Sterll mais du coup la constante que tu as créé tu l'utilise ms pas dans l'annotation ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. C'est pck j'attendais que tu acceptais la pull request de l'api There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok tu vas le changer bientot ? |
||
| groupSizeChange(); | ||
| } | ||
|
|
||
|
|
||
| long duration = game.getConfig().getTimerValue(TimerBase.POWER_DURATION); | ||
|
|
@@ -76,7 +79,9 @@ public void onNight(NightEvent event) { | |
|
|
||
| Bukkit.broadcastMessage(game.translate(Prefix.YELLOW, "werewolf.announcement.night", | ||
| Formatter.number(event.getNumber()))); | ||
| groupSizeChange(); | ||
| if(game.getConfig().isConfigActive("werewolf.configurations.group_algo.name")){ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. idem utilisez la constante définie plus haut |
||
| groupSizeChange(); | ||
| } | ||
|
|
||
| if (duration > 0) { | ||
| BukkitUtils.scheduleSyncDelayedTask(game, () -> Bukkit.getPluginManager().callEvent(new DayWillComeEvent()), duration * 20); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <module version="4"> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. il ne faut pas commit ce fichier à supprimer |
||
| <component name="FacetManager"> | ||
| <facet type="minecraft" name="Minecraft"> | ||
| <configuration> | ||
| <autoDetectTypes> | ||
| <platformType>MCP</platformType> | ||
| <platformType>SPIGOT</platformType> | ||
| </autoDetectTypes> | ||
| <projectReimportVersion>1</projectReimportVersion> | ||
| </configuration> | ||
| </facet> | ||
| </component> | ||
| <component name="McpModuleSettings"> | ||
| <option name="srgType" value="SRG" /> | ||
| </component> | ||
| </module> | ||
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.
dans key: utilisez une constante à définir dans ConfigBase dans werewolfapi