coping so hard ngl

blaot 😩 
still waiting for add to sex config ngl
This commit is contained in:
Eva 2022-03-22 20:55:57 +00:00 committed by GitHub
parent fafbda40cd
commit 105b3f37ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -10,7 +10,7 @@ import org.bukkit.entity.Player;
import java.util.UUID; import java.util.UUID;
@CommandPermissions(level = AdminLevel.SUPER, source = SourceType.ONLY_IN_GAME) @CommandPermissions(level = AdminLevel.SUPER, source = SourceType.ONLY_IN_GAME)
@CommandParameters(description = "Manages your admin login message and other various utilities.", usage = "/<command> <clear <variable> | setlogin <message>>") @CommandParameters(description = "Manages your admin login message and other utilities.", usage = "/<command> <clearloginmsg | setlogin <message>>")
public class Command_myadmin extends FreedomCommand { public class Command_myadmin extends FreedomCommand {
@Override @Override
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole) { public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole) {
@ -26,8 +26,7 @@ public class Command_myadmin extends FreedomCommand {
AdminList.updateIndexLists(); // Update and refresh configuration. AdminList.updateIndexLists(); // Update and refresh configuration.
return true; return true;
} else if ("clear".equalsIgnoreCase(args[0])) { } else if ("clearloginmsg".equalsIgnoreCase(args[0])) {
if("loginmsg".equalsIgnoreCase(args[1])) {
playerMsg(ChatColor.GRAY + "Cleared your custom login message."); // Notify player that the login message has been set. playerMsg(ChatColor.GRAY + "Cleared your custom login message."); // Notify player that the login message has been set.
AdminList.getEntry(uuid).setCustomLoginMessage(""); // Set the custom login message to the value. AdminList.getEntry(uuid).setCustomLoginMessage(""); // Set the custom login message to the value.
@ -35,10 +34,6 @@ public class Command_myadmin extends FreedomCommand {
AdminList.updateIndexLists(); // Update and refresh configuration. AdminList.updateIndexLists(); // Update and refresh configuration.
return true; return true;
} else {
playerMsg(ChatColor.GRAY + "Invalid option, options are: loginmsg.");
return true;
}
} else { } else {
return false; return false;
} }