1
0
mirror of https://e.coding.net/circlecloud/YumCore.git synced 2024-11-16 00:48:54 +00:00

fix: 修复兼容性工具错误

Signed-off-by: 502647092 <admin@yumc.pw>
This commit is contained in:
502647092 2016-08-09 12:20:56 +08:00
parent cb814583ca
commit 91e0cc4b0e

View File

@ -204,9 +204,9 @@ public class C {
try { try {
// getOnlinePlayers start // getOnlinePlayers start
getOnlinePlayers = Bukkit.class.getDeclaredMethod("getOnlinePlayers"); getOnlinePlayers = Bukkit.class.getDeclaredMethod("getOnlinePlayers");
if (getOnlinePlayers.getReturnType() != Player[].class) { if (getOnlinePlayers.getReturnType() != org.bukkit.entity.Player[].class) {
for (final Method method : Bukkit.class.getDeclaredMethods()) { for (final Method method : Bukkit.class.getDeclaredMethods()) {
if (method.getReturnType() == Player[].class && method.getName().endsWith("getOnlinePlayers")) { if (method.getReturnType() == org.bukkit.entity.Player[].class && method.getName().endsWith("getOnlinePlayers")) {
getOnlinePlayers = method; getOnlinePlayers = method;
} }
} }
@ -273,7 +273,7 @@ public class C {
* @throws Exception * @throws Exception
* 异常 * 异常
*/ */
public static void reset(final Player recoverPlayer) throws Exception { public static void reset(final org.bukkit.entity.Player recoverPlayer) throws Exception {
// Send timings first // Send timings first
final Object player = getHandle.invoke(recoverPlayer); final Object player = getHandle.invoke(recoverPlayer);
final Object connection = playerConnection.get(player); final Object connection = playerConnection.get(player);
@ -292,7 +292,7 @@ public class C {
* @param subtitle * @param subtitle
* 子标题 * 子标题
*/ */
public static void send(final Player receivingPacket, final String title, final String subtitle) { public static void send(final org.bukkit.entity.Player receivingPacket, final String title, final String subtitle) {
send(receivingPacket, title, subtitle, 1, 2, 1); send(receivingPacket, title, subtitle, 1, 2, 1);
} }
@ -312,7 +312,7 @@ public class C {
* @param fadeOutTime * @param fadeOutTime
* 淡出时间 * 淡出时间
*/ */
public static void send(final Player receivingPacket, final String title, final String subtitle, final int fadeInTime, final int stayTime, final int fadeOutTime) { public static void send(final org.bukkit.entity.Player receivingPacket, final String title, final String subtitle, final int fadeInTime, final int stayTime, final int fadeOutTime) {
if (packetTitle != null) { if (packetTitle != null) {
try { try {
// First reset previous settings // First reset previous settings