Restructure project and fix JavaDoc generation
This commit is contained in:
parent
268ff80226
commit
514aa6c725
12 changed files with 21 additions and 12 deletions
|
|
@ -31,11 +31,7 @@ import com.intellectualsites.commands.sender.CommandSender;
|
|||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.*;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
/**
|
||||
|
|
@ -100,6 +96,9 @@ public class Command<C extends CommandSender, M extends CommandMeta> {
|
|||
* Create a new command builder
|
||||
*
|
||||
* @param commandName Base command component
|
||||
* @param commandMeta Command meta instance
|
||||
* @param <C> Command sender type
|
||||
* @param <M> Command meta type
|
||||
* @return Command builder
|
||||
*/
|
||||
@Nonnull
|
||||
|
|
@ -163,6 +162,7 @@ public class Command<C extends CommandSender, M extends CommandMeta> {
|
|||
* Get the longest chain of similar components for
|
||||
* two commands
|
||||
*
|
||||
* @param other Command to compare to
|
||||
* @return List containing the longest shared component chain
|
||||
*/
|
||||
public List<CommandComponent<C, ?>> getSharedComponentChain(@Nonnull final Command<C, M> other) {
|
||||
|
|
@ -216,7 +216,8 @@ public class Command<C extends CommandSender, M extends CommandMeta> {
|
|||
public <T> Builder<C, M> withComponent(@Nonnull final CommandComponent<C, T> component) {
|
||||
final List<CommandComponent<C, ?>> commandComponents = new LinkedList<>(this.commandComponents);
|
||||
commandComponents.add(component);
|
||||
return new Builder<>(this.commandMeta, this.senderType, commandComponents, this.commandExecutionHandler, this.commandPermission);
|
||||
return new Builder<>(this.commandMeta, this.senderType, commandComponents, this.commandExecutionHandler,
|
||||
this.commandPermission);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -245,7 +246,8 @@ public class Command<C extends CommandSender, M extends CommandMeta> {
|
|||
*/
|
||||
@Nonnull
|
||||
public Builder<C, M> withHandler(@Nonnull final CommandExecutionHandler<C> commandExecutionHandler) {
|
||||
return new Builder<>(this.commandMeta, this.senderType, this.commandComponents, commandExecutionHandler, this.commandPermission);
|
||||
return new Builder<>(this.commandMeta, this.senderType, this.commandComponents, commandExecutionHandler,
|
||||
this.commandPermission);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -256,7 +258,8 @@ public class Command<C extends CommandSender, M extends CommandMeta> {
|
|||
*/
|
||||
@Nonnull
|
||||
public Builder<C, M> withSenderType(@Nonnull final Class<? extends C> senderType) {
|
||||
return new Builder<>(this.commandMeta, senderType, this.commandComponents, this.commandExecutionHandler, this.commandPermission);
|
||||
return new Builder<>(this.commandMeta, senderType, this.commandComponents, this.commandExecutionHandler,
|
||||
this.commandPermission);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -267,7 +270,8 @@ public class Command<C extends CommandSender, M extends CommandMeta> {
|
|||
*/
|
||||
@Nonnull
|
||||
public Builder<C, M> withPermission(@Nonnull final String permission) {
|
||||
return new Builder<>(this.commandMeta, this.senderType, this.commandComponents, this.commandExecutionHandler, permission);
|
||||
return new Builder<>(this.commandMeta, this.senderType, this.commandComponents, this.commandExecutionHandler,
|
||||
permission);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ public interface CommandSender {
|
|||
* Check if the command sender has a given permission node
|
||||
*
|
||||
* @param permission Permission node
|
||||
* @return {@code true} if the sender has the given permission node, else {@code false}
|
||||
*/
|
||||
boolean hasPermission(@Nonnull String permission);
|
||||
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<relativePath>../../</relativePath>
|
||||
<artifactId>cloud</artifactId>
|
||||
<groupId>com.intellectualsites</groupId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
5
pom.xml
5
pom.xml
|
|
@ -9,7 +9,7 @@
|
|||
<version>1.0-SNAPSHOT</version>
|
||||
<modules>
|
||||
<module>cloud-jline</module>
|
||||
<module>cloud-bukkit</module>
|
||||
<module>cloud-minecraft/cloud-bukkit</module>
|
||||
<module>cloud-core</module>
|
||||
</modules>
|
||||
<packaging>pom</packaging>
|
||||
|
|
@ -95,6 +95,9 @@
|
|||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue