From 7be849da2ad80cf440a1df29f23c9b4fdc1a8c98 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sun, 6 Oct 2019 01:16:27 +0100 Subject: [PATCH] Fix compilation warnings --- .../com/gmail/nossr50/commands/skills/SkillCommand.java | 4 ++-- .../gmail/nossr50/util/player/NotificationManager.java | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mcmmo-core/src/main/java/com/gmail/nossr50/commands/skills/SkillCommand.java b/mcmmo-core/src/main/java/com/gmail/nossr50/commands/skills/SkillCommand.java index f78457075..68026f00c 100644 --- a/mcmmo-core/src/main/java/com/gmail/nossr50/commands/skills/SkillCommand.java +++ b/mcmmo-core/src/main/java/com/gmail/nossr50/commands/skills/SkillCommand.java @@ -223,10 +223,10 @@ public abstract class SkillCommand implements TabExecutor { String statDescriptionKey = !isExtra ? subSkillType.getLocaleKeyStatDescription(pluginRef) : subSkillType.getLocaleKeyStatExtraDescription(pluginRef); if (isCustom) - return pluginRef.getLocaleManager().getString(templateKey, pluginRef.getLocaleManager().getString(statDescriptionKey, vars)); + return pluginRef.getLocaleManager().getString(templateKey, pluginRef.getLocaleManager().getString(statDescriptionKey, (Object[]) vars)); else { String[] mergedList = pluginRef.getNotificationManager().addItemToFirstPositionOfArray(pluginRef.getLocaleManager().getString(statDescriptionKey), vars); - return pluginRef.getLocaleManager().getString(templateKey, mergedList); + return pluginRef.getLocaleManager().getString(templateKey, (Object[]) mergedList); } } diff --git a/mcmmo-core/src/main/java/com/gmail/nossr50/util/player/NotificationManager.java b/mcmmo-core/src/main/java/com/gmail/nossr50/util/player/NotificationManager.java index 5978049d9..42546f032 100644 --- a/mcmmo-core/src/main/java/com/gmail/nossr50/util/player/NotificationManager.java +++ b/mcmmo-core/src/main/java/com/gmail/nossr50/util/player/NotificationManager.java @@ -214,12 +214,12 @@ public class NotificationManager { //Send the notification switch (sensitiveCommandType) { case XPRATE_MODIFY: - sendAdminNotification(pluginRef.getLocaleManager().getString("Notifications.Admin.XPRate.Start.Others", addItemToFirstPositionOfArray(senderName, args))); - sendAdminCommandConfirmation(commandSender, pluginRef.getLocaleManager().getString("Notifications.Admin.XPRate.Start.Self", args)); + sendAdminNotification(pluginRef.getLocaleManager().getString("Notifications.Admin.XPRate.Start.Others", (Object[]) addItemToFirstPositionOfArray(senderName, args))); + sendAdminCommandConfirmation(commandSender, pluginRef.getLocaleManager().getString("Notifications.Admin.XPRate.Start.Self", (Object[]) args)); break; case XPRATE_END: - sendAdminNotification(pluginRef.getLocaleManager().getString("Notifications.Admin.XPRate.End.Others", addItemToFirstPositionOfArray(senderName, args))); - sendAdminCommandConfirmation(commandSender, pluginRef.getLocaleManager().getString("Notifications.Admin.XPRate.End.Self", args)); + sendAdminNotification(pluginRef.getLocaleManager().getString("Notifications.Admin.XPRate.End.Others", (Object[]) addItemToFirstPositionOfArray(senderName, args))); + sendAdminCommandConfirmation(commandSender, pluginRef.getLocaleManager().getString("Notifications.Admin.XPRate.End.Self", (Object[]) args)); break; } }