Conversation
zefir-git
left a comment
There was a problem hiding this comment.
any way to cancel an invite?
missing final and @NotNull/@Nullable. dont think anyone wants to debug null pointer exceptions
|
|
||
| import java.io.File; | ||
|
|
||
| public enum Messages { |
There was a problem hiding this comment.
why not just use FileConfiguration with saveDefault() on enable, and here we could have methods that we can add typed placeholders to like Component nationNotFound(Nation nation) -> getConfig errors.nation-not-found, Placeholder.unparsed(nation.name)
| if (!isPlayer()) { | ||
| sendMessage(t(Messages.ONLY_PLAYERS)); | ||
| return; | ||
| } |
There was a problem hiding this comment.
console should also be able to create/delete/etc. nations
There was a problem hiding this comment.
nation by default is bound to a leader which is a player, force-delete might be the only one then
There was a problem hiding this comment.
would be useful to be able to handle all of these from console, perhaps by supplying an additional <player> arg like /nation create test Player123 or just /nation create test then /nation add Player123 and first player by default becomes leader
| if (args.length == 0) { | ||
| //@todo: send help message | ||
| sendMessage("<yellow>Usage: <white>/" + label + " [create|invite|kick|list]"); | ||
| help(sender, label, args); | ||
| return; | ||
| } |
There was a problem hiding this comment.
imo args length 0 should send general plugin info like version etc. and send help with /<command> help
| import java.util.Objects; | ||
| import java.util.UUID; | ||
|
|
||
| public class Nation { |
There was a problem hiding this comment.
should also have a description I think
There was a problem hiding this comment.
i don't think that's displayed anywhere
There was a problem hiding this comment.
could be displayed in list (maybe hover) and nation info
There was a problem hiding this comment.
oh you mean of the nation itself, i thought of like a javadoc class
| import java.util.Objects; | ||
| import java.util.UUID; | ||
|
|
||
| public class NationManager { |
There was a problem hiding this comment.
I dont think we need these. These should just be static methods on Nation
| import java.util.UUID; | ||
|
|
||
| public class NationManager { | ||
| public static HashMap<UUID, Nation> nations = new HashMap<>(); |
There was a problem hiding this comment.
no need to cache nations at all
This PR adds basic nation functionality (create, invite, kick, etc)
There is yet to add more functionality, as such, here is a TODO list.
messages.ymland have it as the first priority)LOOHP/InteractiveChat supportThis will close #2 and #3