Skip to content

Commit

Permalink
Remove some malformed javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed May 12, 2019
1 parent 0f8b5ae commit eba2270
Show file tree
Hide file tree
Showing 13 changed files with 70 additions and 55 deletions.
11 changes: 6 additions & 5 deletions src/main/java/net/citizensnpcs/api/CitizensAPI.java
Expand Up @@ -28,7 +28,7 @@ private CitizensAPI() {
* @since 2.0.8
* @param store
* The {@link NPCDataStore} to use with the registry
* @return A new anonymous NPCRegistry that is not accessible via {@link #getPluginNPCRegistry(String)}
* @return A new anonymous NPCRegistry that is not accessible via {@link #getNamedNPCRegistry(String)}
*/
public static NPCRegistry createAnonymousNPCRegistry(NPCDataStore store) {
return getImplementation().createAnonymousNPCRegistry(store);
Expand All @@ -43,7 +43,7 @@ public static NPCRegistry createAnonymousNPCRegistry(NPCDataStore store) {
* @param store
* The {@link NPCDataStore} to use with the registry
* @since 2.0.8
* @return A new NPCRegistry, that can also be retrieved via {@link #getPluginNPCRegistry(String)}
* @return A new NPCRegistry, that can also be retrieved via {@link #getNamedNPCRegistry(String)}
*/
public static NPCRegistry createNamedNPCRegistry(String name, NPCDataStore store) {
return getImplementation().createNamedNPCRegistry(name, store);
Expand Down Expand Up @@ -74,13 +74,14 @@ private static ClassLoader getImplementationClassLoader() {
}

/**
* Retrieves the {@link NPCRegistry} previously created via {@link #createNamedNPCRegistry(String)} with the given
* name, or null if not found.
* Retrieves the {@link NPCRegistry} previously created via {@link #createNamedNPCRegistry(String, NPCDataStore)}
* with the given name, or null if not found.
*
* @param name
* The registry name
* @since 2.0.8
* @return A NPCRegistry previously created via {@link #createNamedNPCRegistry(String)}, or null if not found
* @return A NPCRegistry previously created via {@link #createNamedNPCRegistry(String, NPCDataStore)}, or null if
* not found
*/
public static NPCRegistry getNamedNPCRegistry(String name) {
return getImplementation().getNamedNPCRegistry(name);
Expand Down
26 changes: 19 additions & 7 deletions src/main/java/net/citizensnpcs/api/CitizensPlugin.java
Expand Up @@ -12,31 +12,40 @@

public interface CitizensPlugin extends Plugin {
/**
* @param The
* data store of the registry
* @param store
* The data store of the registry
* @return A new anonymous NPCRegistry that is not accessible via {@link #getNamedNPCRegistry(String)}
*/
public NPCRegistry createAnonymousNPCRegistry(NPCDataStore store);

/**
* @param pluginName
* @param name
* The plugin name
* @param store
* The data store for the registry
* @return A new NPCRegistry, that can also be retrieved via {@link #getNamedNPCRegistry(String)}
*/
public NPCRegistry createNamedNPCRegistry(String name, NPCDataStore store);

/**
* @return The default {@link NPCSelector} for managing player/server NPC selection
*/
public NPCSelector getDefaultNPCSelector();

/**
*
* @param pluginName
* @param name
* The plugin name
* @return A NPCRegistry previously created via {@link #createNamedNPCRegistry(String)}, or null if not found
* @return A NPCRegistry previously created via {@link #createNamedNPCRegistry(String, NPCDataStore)}, or null if
* not found
*/
public NPCRegistry getNamedNPCRegistry(String name);

/**
* Get all registered {@link NPCRegistry}s.
*
* @return
*/
public Iterable<NPCRegistry> getNPCRegistries();

/**
Expand All @@ -53,6 +62,9 @@ public interface CitizensPlugin extends Plugin {
*/
public File getScriptFolder();

/**
* @return The Skull ItemMeta provider
*/
public SkullMetaProvider getSkullMetaProvider();

/**
Expand Down Expand Up @@ -82,8 +94,8 @@ public interface CitizensPlugin extends Plugin {
/**
* Sets the default NPC data store. Should be set during onEnable.
*
* @param The
* new default store
* @param store
* The new default store
*/
public void setDefaultNPCDataStore(NPCDataStore store);
}
Expand Up @@ -2,7 +2,6 @@

import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Callable;

import org.bukkit.Location;
import org.bukkit.entity.Entity;
Expand Down Expand Up @@ -300,7 +299,7 @@ public BlockExaminer[] examiners() {
}

/**
* @see #lookAtFunction(Callable)
* @see #lookAtFunction(Function)
*/
public Function<Navigator, Location> lookAtFunction() {
return this.lookAtFunction;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/net/citizensnpcs/api/ai/flocking/Flocker.java
Expand Up @@ -13,8 +13,8 @@
* Implements a simple flocking controller as a {@link Runnable}. This should be run every tick, for example as part of
* an overridden {@link Trait#run}.
*
* @see {@link NPCFlock}
* @see {@link FlockBehavior}
* @see NPCFlock
* @see FlockBehavior
* @see <a href=
* "https://en.wikipedia.org/wiki/Flocking_(behavior)">https://en.wikipedia.org/wiki/Flocking_(behavior)</a>
*/
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/net/citizensnpcs/api/ai/flocking/NPCFlock.java
Expand Up @@ -7,8 +7,8 @@
/**
* Represents a 'flock' of NPCs to be used as input to a {@link Flocker}.
*
* @see {@link RadiusNPCFlock}
* @see {@link GroupNPCFlock}
* @see RadiusNPCFlock
* @see GroupNPCFlock
*/
public interface NPCFlock {
/**
Expand Down
Expand Up @@ -54,7 +54,7 @@ public SpeechContext(String message, LivingEntity recipient) {
* Adds a direct {@link Talkable} recipient. The {@link VocalChord} should use this information to correctly direct
* the message. Note: depending on the VocalChord, this list may not be inclusive as to who gets the message.
*
* @param talkable
* @param entity
* Talkable entity
* @return the speech context
*
Expand All @@ -75,8 +75,8 @@ public SpeechContext addRecipient(LivingEntity entity) {
* Adds a list of {@link Talkable} recipients. The {@link VocalChord} should use this information to correctly
* direct the message. Note: depending on the VocalChord, this list may not be inclusive as to who gets the message.
*
* @param talkable
* Talkable entity
* @param talkables
* Talkable entities
* @return the Tongue
*
*/
Expand Down
29 changes: 16 additions & 13 deletions src/main/java/net/citizensnpcs/api/ai/speech/Talkable.java
Expand Up @@ -4,45 +4,48 @@

/**
* Talkable provides an interface for talking to Players, Entities and NPCs.
*
*
*/
public interface Talkable extends Comparable<Object> {

/**
* Gets the LivingEntity associated with this Talkable
*
*
* @return a LivingEntity
*/
public Entity getEntity();

/**
* Gets the name of the Talkable LivingEntity
*
*
* @return name
*/
public String getName();

/**
* Called by a {@link VocalChord} when talking near this Talkable Entity to provide a universal method to getting an
* event/output.
*
* @param talker
* The {@link Talkable} entity doing the talking
* @param text
* The message to talk
*
*
* @param context
* the Speech context
* @param message
* The message to send
* @param vocalChord
* The chord to use
*
*/
public void talkNear(SpeechContext context, String message, VocalChord vocalChord);

/**
* Called by a {@link VocalChord} when talking to this Talkable Entity to provide a universal method to getting an
* event/output.
*
* @param talker
* The {@link Talkable} entity doing the talking
* @param context
* the Speech context
* @param message
* The text to talk
*
* The message to send
* @param vocalChord
* The chord to use
*/
public void talkTo(SpeechContext context, String message, VocalChord vocalChord);

Expand Down
@@ -1,22 +1,23 @@
package net.citizensnpcs.api.ai.speech.event;

import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;

import net.citizensnpcs.api.CitizensAPI;
import net.citizensnpcs.api.ai.speech.SpeechContext;
import net.citizensnpcs.api.ai.speech.VocalChord;
import net.citizensnpcs.api.event.NPCEvent;

import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;

/**
* Represents an event where an NPC speaks, with {@link SpeechContext}. This event takes place before being sent to the
* {@link VocalChord}.
*
* {@link VocalChord}
*
*/
public class NPCSpeechEvent extends NPCEvent implements Cancellable {

private boolean cancelled = false;

private SpeechContext context;
private final SpeechContext context;
private String vocalChordName;

public NPCSpeechEvent(SpeechContext context, String vocalChordName) {
Expand All @@ -27,7 +28,7 @@ public NPCSpeechEvent(SpeechContext context, String vocalChordName) {

/**
* Returns the {@link SpeechContext} that will be sent to the VocalChord.
*
*
* @return the SpeechContext
*/
public SpeechContext getContext() {
Expand Down Expand Up @@ -58,17 +59,17 @@ public void setCancelled(boolean cancelled) {

/**
* Sets the name of the {@link VocalChord} to be used.
*
*
* @param vocalChordName
* A valid registered VocalChord name
*/
public void setVocalChord(String name) {
this.vocalChordName = name;
}

private static final HandlerList handlers = new HandlerList();

public static HandlerList getHandlerList() {
return handlers;
}

private static final HandlerList handlers = new HandlerList();
}
2 changes: 1 addition & 1 deletion src/main/java/net/citizensnpcs/api/ai/tree/Selectors.java
Expand Up @@ -39,7 +39,7 @@ public static Function<List<Behavior>, Behavior> prioritySelectionFunction() {
}

/**
* @see {@link #prioritySelector(Comparator, Collection)}
* @see #prioritySelector(Comparator, Collection)
*/
public static Selector.Builder prioritySelector(Comparator<Behavior> comparator, Behavior... behaviors) {
return prioritySelector(comparator, Arrays.asList(behaviors));
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/net/citizensnpcs/api/command/Command.java
Expand Up @@ -24,8 +24,8 @@
String flags() default "";

/**
* A longer description of the command and any flags it uses which will be displayed in addition to {@link desc} in
* help commands. Translatable.
* A longer description of the command and any flags it uses which will be displayed in addition to {@link #desc()}
* in help commands. Translatable.
*/
String help() default "";

Expand Down
8 changes: 4 additions & 4 deletions src/main/java/net/citizensnpcs/api/npc/NPC.java
Expand Up @@ -359,19 +359,19 @@ public interface NPC extends Agent, Cloneable {
*/
public static final String NAMEPLATE_VISIBLE_METADATA = "nameplate-visible";
/**
* @see {@link Skinnable}
* @see Skinnable
*/
public static final String PLAYER_SKIN_TEXTURE_PROPERTIES_METADATA = "player-skin-textures";
/**
* @see {@link Skinnable}
* @see Skinnable
*/
public static final String PLAYER_SKIN_TEXTURE_PROPERTIES_SIGN_METADATA = "player-skin-signature";
/**
* @see {@link Skinnable}
* @see Skinnable
*/
public static final String PLAYER_SKIN_USE_LATEST = "player-skin-use-latest-skin";
/**
* @see {@link Skinnable}
* @see Skinnable
*/
public static final String PLAYER_SKIN_UUID_METADATA = "player-skin-name";
/**
Expand Down
Expand Up @@ -24,9 +24,9 @@
import net.citizensnpcs.api.util.DataKey;

/**
* The main registry for managing reflective, recursive {@link NPC} persistence.
* The main registry for managing reflective, recursive {@link net.citizensnpcs.api.npc.NPC} persistence.
*
* @see {@link Persist}
* @see Persist
* @see #registerPersistDelegate(Class, Class)
*/
public class PersistenceLoader {
Expand Down
Expand Up @@ -37,7 +37,7 @@
import net.citizensnpcs.api.util.Messaging;

/**
* Compiles files into {@link ScriptFactory}s. Intended for use as a separate thread - {@link ScriptCompiler#run()} will
* Compiles files into {@link ScriptFactory}s. Intended for use as a separate thread - {@link #run(String, String)} will
* block while waiting for new tasks to compile.
*/
public class ScriptCompiler {
Expand Down Expand Up @@ -301,7 +301,6 @@ public Reader getReader() throws FileNotFoundException {

private static final Map<String, ScriptFactory> CACHE = new MapMaker().weakValues().makeMap();
private static boolean CLASSLOADER_OVERRIDE_ENABLED;

private static Method GET_APPLICATION_CLASS_LOADER, GET_GLOBAL, INIT_APPLICATION_CLASS_LOADER;

static {
Expand Down

0 comments on commit eba2270

Please sign in to comment.