-
Notifications
You must be signed in to change notification settings - Fork 0
Add basic nations functionality #1
base: master
Are you sure you want to change the base?
Conversation
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
console should also be able to create/delete/etc. nations
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should also have a description I think
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.
i don't think that's displayed anywhere
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.
could be displayed in list (maybe hover) and nation info
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.yml
and have it as the first priority)LOOHP/InteractiveChat supportThis will close #2 and #3