From aa6577db3bf63a9a02694427023ca25a2ab782b7 Mon Sep 17 00:00:00 2001 From: 502647092 Date: Wed, 16 Nov 2016 20:25:56 +0800 Subject: [PATCH] =?UTF-8?q?doc:=20=E8=B0=83=E6=95=B4Javadoc=E6=96=87?= =?UTF-8?q?=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 502647092 --- src/main/java/pw/yumc/YumCore/bukkit/P.java | 4 ++++ .../yumc/YumCore/commands/CommandManager.java | 4 ++++ src/main/java/pw/yumc/YumCore/kit/LogKit.java | 8 +++++--- .../java/pw/yumc/YumCore/reflect/Reflect.java | 19 +++++++++++-------- .../java/pw/yumc/YumCore/tellraw/Tellraw.java | 2 -- 5 files changed, 24 insertions(+), 13 deletions(-) diff --git a/src/main/java/pw/yumc/YumCore/bukkit/P.java b/src/main/java/pw/yumc/YumCore/bukkit/P.java index 5574cf3..33a97e1 100644 --- a/src/main/java/pw/yumc/YumCore/bukkit/P.java +++ b/src/main/java/pw/yumc/YumCore/bukkit/P.java @@ -42,6 +42,8 @@ public class P { } /** + * @param + * 配置源类型 * @return 获得插件配置文件 */ @SuppressWarnings("unchecked") @@ -78,6 +80,8 @@ public class P { } /** + * @param + * 插件源类型 * @return 获得插件 */ @SuppressWarnings("unchecked") diff --git a/src/main/java/pw/yumc/YumCore/commands/CommandManager.java b/src/main/java/pw/yumc/YumCore/commands/CommandManager.java index b842191..67aec15 100644 --- a/src/main/java/pw/yumc/YumCore/commands/CommandManager.java +++ b/src/main/java/pw/yumc/YumCore/commands/CommandManager.java @@ -270,6 +270,7 @@ public class CommandManager implements TabExecutor { * * @param clazzs * 子命令处理类 + * @return {@link CommandManager} */ public CommandManager register(Executor... clazzs) { for (Executor clazz : clazzs) { @@ -343,6 +344,7 @@ public class CommandManager implements TabExecutor { * * @param commandErrorHanlder * 命令错误处理器 + * @return {@link CommandManager} */ public CommandManager setCommandErrorHanlder(ErrorHanlder commandErrorHanlder) { this.commandErrorHanlder = commandErrorHanlder; @@ -354,6 +356,7 @@ public class CommandManager implements TabExecutor { * * @param helpGenerator * 帮助生成器 + * @return {@link CommandManager} */ public CommandManager setHelpGenerator(HelpGenerator helpGenerator) { help.setHelpGenerator(helpGenerator); @@ -365,6 +368,7 @@ public class CommandManager implements TabExecutor { * * @param helpParse * 帮助解析器 + * @return {@link CommandManager} */ public CommandManager setHelpParse(HelpParse helpParse) { if (help.getHelpGenerator() instanceof CommandHelp.DefaultHelpGenerator) { diff --git a/src/main/java/pw/yumc/YumCore/kit/LogKit.java b/src/main/java/pw/yumc/YumCore/kit/LogKit.java index 97c6862..2356fde 100644 --- a/src/main/java/pw/yumc/YumCore/kit/LogKit.java +++ b/src/main/java/pw/yumc/YumCore/kit/LogKit.java @@ -67,16 +67,18 @@ public class LogKit implements Runnable { * 日志 */ public void console(final String s) { - sender(Bukkit.getConsoleSender(), s); + send(Bukkit.getConsoleSender(), s); } /** * 添加日志 - * + * + * @param sender + * 接受者 * @param s * 日志 */ - public void sender(final CommandSender sender, final String s) { + public void send(final CommandSender sender, final String s) { Log.toSender(sender, s); log(ChatColor.stripColor(s)); } diff --git a/src/main/java/pw/yumc/YumCore/reflect/Reflect.java b/src/main/java/pw/yumc/YumCore/reflect/Reflect.java index d64f83d..7aa4871 100644 --- a/src/main/java/pw/yumc/YumCore/reflect/Reflect.java +++ b/src/main/java/pw/yumc/YumCore/reflect/Reflect.java @@ -8,8 +8,8 @@ import java.util.Map; /** * A wrapper for an {@link Object} or {@link Class} upon which reflective calls can be made. *

- * An example of using Reflect is - * + * An example of using Reflect is + * *

  * // Static import all reflection methods to decrease verbosity
  * import static org.joor.Reflect.*;
@@ -21,7 +21,8 @@ import java.util.Map;
  * // Invoke methods using the call() method:
  * .call("toString")
  * // Retrieve the wrapped object
- *
+ * 
+ * * @author Lukas Eder */ public class Reflect { @@ -274,6 +275,8 @@ public class Reflect { /** * Create a proxy for the wrapped object allowing to typesafely invoke methods on it using a custom interface * + * @param

+ * 代理类型 * @param proxyType * The interface type that is implemented by the proxy * @return A proxy for the wrapped object @@ -557,7 +560,9 @@ public class Reflect { * value from an instance member field. *

* If you want to "navigate" to a wrapped version of the field, use {@link #field(String)} instead. - * + * + * @param + * A convenience generic parameter for automatic unsafe casting * @param name * The field name * @return The field value @@ -615,9 +620,6 @@ public class Reflect { } } - /** - * {@inheritDoc} - */ @Override public String toString() { return object.toString(); @@ -625,7 +627,8 @@ public class Reflect { /** * Get the type of the wrapped object. - * + * + * @return 类类型 * @see Object#getClass() */ public Class type() { diff --git a/src/main/java/pw/yumc/YumCore/tellraw/Tellraw.java b/src/main/java/pw/yumc/YumCore/tellraw/Tellraw.java index 37df4cf..2410405 100644 --- a/src/main/java/pw/yumc/YumCore/tellraw/Tellraw.java +++ b/src/main/java/pw/yumc/YumCore/tellraw/Tellraw.java @@ -318,10 +318,8 @@ public class Tellraw { *

  • 消息串的文本.
  • * * 这个方法会丢失点击操作和悬浮操作 所以仅用于最后的手段 - *

    *

    * 颜色和格式可以从返回的字符串中删除 通过{@link ChatColor#stripColor(String)}. - *

    * * @return 发送给老版本客户端以及控制台。 */