-
-
Notifications
You must be signed in to change notification settings - Fork 104
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
Stores whole image in the images folder and adds moderation commands #40
Conversation
Added Delete/Get/List other commands, where the user can modify the maps of others. These commands require permissons imageonmap.list.other, imagonmap.delete.other, and imageonmap.get.other.
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.
Hi! Thanks for the pull request.
I don't precisely understand—why did you do that to the plugin configuration loader? The class was intended to work that way, using zLib to read it and make the configuration available. And if you want anyway to parse config.yml
, you should use a YAML parser (one is even included right into Bukkit), not a line-per-line manual parsing.
I cannot accept this PR as-is, sorry. Rollback your changes regarding the configuration, at least, as it's fully working right now.
On another side, your indentation is a bit weird. Is that normal?
On another side (we've got plenty of sides), you should make one PR per subject instead of a global one for everything :) .
@@ -69,6 +63,11 @@ public File getImageFile(short mapID) | |||
return new File(imagesDirectory, "map"+mapID+".png"); | |||
} | |||
|
|||
public File getFullImageFile(short mapIDstart, short mapIDend) |
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.
This should go into the image.ImageMap
class (and without parameters, using its attributes).
saveDefaultConfig(); | ||
|
||
loadComponents(I18n.class, Gui.class, Commands.class, PluginConfiguration.class, ImageIOExecutor.class, ImageRendererExecutor.class); | ||
|
||
PluginConfiguration.initialize(); |
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.
To be removed (the configuration is working right now).
//Init all the things ! | ||
MetricsLite.startMetrics(); | ||
I18n.setPrimaryLocale(PluginConfiguration.LANG.get()); | ||
I18n.setPrimaryLocale(PluginConfiguration.LANG); |
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.
To be rollbacked (the configuration is working right now).
@@ -57,7 +57,7 @@ | |||
*/ | |||
static public void startMetrics() | |||
{ | |||
if(!PluginConfiguration.COLLECT_DATA.get()) return; | |||
if(!PluginConfiguration.COLLECT_DATA) return; |
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.
To be rollbacked (the configuration is working right now).
import fr.moribus.imageonmap.commands.maptool.ListCommand; | ||
import fr.moribus.imageonmap.commands.maptool.MigrateCommand; | ||
import fr.moribus.imageonmap.commands.maptool.NewCommand; | ||
import fr.moribus.imageonmap.commands.maptool.*; |
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.
Avoid star imports please :)
|
||
@CommandInfo (name = "deleteother", usageParameters = "<player name> <map name>") | ||
@WithFlags ({"confirm"}) | ||
public class DeleteOtherCommand extends IoMCommand |
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.
The same command should be used, instead of another set for moderators. This being said, it poses the problem regarding multi-words map names.
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.
If we did make delete work for other players, shouldn't we also concatenate all of the commands to one? I feel it makes a little more sense as it is, and you're right- multi-word map names would pretty easily break it. (Especially if they had a playername in one)
int mapGlobalLimit = PluginConfiguration.MAP_GLOBAL_LIMIT.get(); | ||
int mapPersonalLimit = PluginConfiguration.MAP_PLAYER_LIMIT.get(); | ||
int mapGlobalLimit = PluginConfiguration.MAP_GLOBAL_LIMIT; | ||
int mapPersonalLimit = PluginConfiguration.MAP_PLAYER_LIMIT; |
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.
To be rollbacked (the configuration is working right now).
@@ -154,7 +155,7 @@ public void checkMapLimit(ImageMap map) throws MapManagerException | |||
|
|||
public void checkMapLimit(int newMapsCount) throws MapManagerException | |||
{ | |||
int limit = PluginConfiguration.MAP_PLAYER_LIMIT.get(); | |||
int limit = PluginConfiguration.MAP_PLAYER_LIMIT; |
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.
To be rollbacked (the configuration is working right now).
@@ -3,6 +3,7 @@ new: Creates a new ImageOnMap | |||
delete: Deletes a map. | |||
delete-noconfirm: Deletes a map. Deletion is permanent and made without confirmation | |||
get: Gives you a map. | |||
getother: Opens another's MapTool GUI |
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.
The description is wrong, this does not open a GUI.
- get copies of maps you rendered; | ||
- get parts of posters in case of need; | ||
- delete or rename your maps (organization!); | ||
- see their statistics (maps rendered, left...). |
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.
Same as before: the description is wrong.
After a forever lol, I'm gonna start working on this. Sorry about all of the configuration trash- I was having lots of difficulty with it XD. I'm hoping to get the changes fixed by the end of the week, if someone hasn't already done them. |
While you're at it, prefer to open two separate pull requests, one for the images storage, and the other for the moderation commands & tools. Thanks! |
Gotcha. I’ll make sure to do that!
On Sunday, March 18, 2018, 9:16 PM, Amaury Carrade <notifications@github.com> wrote:
While you're at it, prefer to open two separate pull requests, one for the images storage, and the other for the moderation commands & tools.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Closing for the next two pull requests: ImageRenderExecutor's save-full-image and limit-size-x/y, and the administrative commands. |
This pull req adds a few commands and removes a few unnecessary imports. Nothing too major; The new commands have permissions imageonmap.command.other, and simply allows administrative action. It's possible that merging could close Issue #30.
Update:
Config.yml is read now, and has lots of variables.
PluginConfiguration can init, which may or may not be necessary.
Full image saving works, so Issue #36 can close. The format for naming is "_<start MAPID>-<end MAPID>.png"
Closes #30
Closes #36