You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -163,7 +162,7 @@ public void playerJoin(PlayerJoinEvent event) {
163
162
}
164
163
165
164
if (!foundAMech) {
166
-
event.getPlayer().sendMessage(ChatColor.RED + "[CraftBook] Warning! You have no mechanics enabled, the plugin will appear to do nothing until a feature is enabled!");
165
+
event.getPlayer().sendMessage(Component.text("[CraftBook] Warning! You have no mechanics enabled, the plugin will appear to do nothing until a feature is enabled!", NamedTextColor.RED));
167
166
}
168
167
}
169
168
}, this);
@@ -179,7 +178,7 @@ public void playerJoin(PlayerJoinEvent event) {
179
178
180
179
if (!foundAMech) {
181
180
Bukkit.getScheduler().runTaskTimer(this,
182
-
() -> getLogger().warning(ChatColor.RED + "Warning! You have no mechanics enabled, the plugin will appear to do nothing until a feature is enabled!"), 20L, 20 * 60 * 5);
181
+
() -> getComponentLogger().warn(Component.text("Warning! You have no mechanics enabled, the plugin will appear to do nothing until a feature is enabled!", NamedTextColor.RED)), 20L, 20 * 60 * 5);
183
182
}
184
183
}
185
184
@@ -306,37 +305,6 @@ public String[] getGroups(Player player) {
306
305
}
307
306
}
308
307
309
-
/**
310
-
* Gets the name of a command sender. This is a unique name and this
311
-
* method should never return a "display name".
312
-
*
313
-
* @param sender The sender to get the name of
314
-
* @return The unique name of the sender.
315
-
*/
316
-
publicStringtoUniqueName(CommandSendersender) {
317
-
if (senderinstanceofConsoleCommandSender) {
318
-
return"*Console*";
319
-
} else {
320
-
returnsender.getName();
321
-
}
322
-
}
323
-
324
-
/**
325
-
* Gets the name of a command sender. This play be a display name.
326
-
*
327
-
* @param sender The CommandSender to get the name of.
0 commit comments