Skip to content

Commit

Permalink
Shhhh!
Browse files Browse the repository at this point in the history
  • Loading branch information
PeachesMLG committed Jun 10, 2024
1 parent b581285 commit 9b94273
Show file tree
Hide file tree
Showing 4 changed files with 97 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ dependencies {
implementation("org.jetbrains:annotations:24.1.0")
implementation("com.j256.ormlite:ormlite-core:6.1")
implementation("com.j256.ormlite:ormlite-jdbc:6.1")
implementation("com.iridium:IridiumTeams:2.5.2")
implementation("com.iridium:IridiumTeams:2.5.3")

// Other dependencies that are not required or already available at runtime
compileOnly("org.projectlombok:lombok:1.18.32")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
package com.iridium.iridiumskyblock.commands.supersecretcommands;

import com.iridium.iridiumcore.utils.StringUtils;
import com.iridium.iridiumskyblock.IridiumSkyblock;
import com.iridium.iridiumskyblock.database.Island;
import com.iridium.iridiumskyblock.database.User;
import com.iridium.iridiumteams.IridiumTeams;
import com.iridium.iridiumteams.commands.Command;
import org.bukkit.OfflinePlayer;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;

import java.util.Collections;

public class IsMyComputerOnFire extends Command<Island, User> {
public IsMyComputerOnFire() {
super(Collections.singletonList("my"), "Super Secret Command shhh", "", "", 0);
}

@Override
public boolean execute(CommandSender sender, String[] arguments, IridiumTeams<Island, User> iridiumTeams) {
if (arguments.length != 3 || !arguments[0].equalsIgnoreCase("computer") || !arguments[1].equalsIgnoreCase("on") || !arguments[2].equalsIgnoreCase("fire")) {
sender.sendMessage(StringUtils.color(iridiumTeams.getMessages().unknownCommand
.replace("%prefix%", iridiumTeams.getConfiguration().prefix)
));
return false;
}
if (!(sender instanceof Player)) {
sender.sendMessage("No.");
return true;
} else {
return this.execute(iridiumTeams.getUserManager().getUser((OfflinePlayer) sender), arguments, iridiumTeams);
}
}

@Override
public boolean execute(User user, String[] arguments, IridiumTeams<Island, User> iridiumTeams) {
IridiumSkyblock.getInstance().getNms().sendTitle(user.getPlayer(), StringUtils.color("&9&lNo."), "", 20, 40, 20);
return true;
}

@Override
public boolean isSuperSecretCommand() {
return true;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
package com.iridium.iridiumskyblock.commands.supersecretcommands;

import com.iridium.iridiumcore.utils.StringUtils;
import com.iridium.iridiumskyblock.IridiumSkyblock;
import com.iridium.iridiumskyblock.database.Island;
import com.iridium.iridiumskyblock.database.User;
import com.iridium.iridiumteams.IridiumTeams;
import com.iridium.iridiumteams.commands.Command;
import org.bukkit.OfflinePlayer;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;

import java.util.Collections;

public class IsThisWorking extends Command<Island, User> {
public IsThisWorking() {
super(Collections.singletonList("this"), "Super Secret Command shhh", "", "", 0);
}

@Override
public boolean execute(CommandSender sender, String[] arguments, IridiumTeams<Island, User> iridiumTeams) {
if(arguments.length != 1 || !arguments[0].equalsIgnoreCase("working")){
sender.sendMessage(StringUtils.color(iridiumTeams.getMessages().unknownCommand
.replace("%prefix%", iridiumTeams.getConfiguration().prefix)
));
return false;
}
if (!(sender instanceof Player)) {
sender.sendMessage("Yes.");
return true;
} else {
return this.execute(iridiumTeams.getUserManager().getUser((OfflinePlayer)sender), arguments, iridiumTeams);
}
}

@Override
public boolean execute(User user, String[] arguments, IridiumTeams<Island, User> iridiumTeams) {
IridiumSkyblock.getInstance().getNms().sendTitle(user.getPlayer(), StringUtils.color("&9&lYes."), "", 20, 40, 20);
return true;
}

@Override
public boolean isSuperSecretCommand() {
return true;
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package com.iridium.iridiumskyblock.managers;

import com.iridium.iridiumskyblock.IridiumSkyblock;
import com.iridium.iridiumskyblock.commands.supersecretcommands.IsMyComputerOnFire;
import com.iridium.iridiumskyblock.commands.supersecretcommands.IsThisWorking;
import com.iridium.iridiumskyblock.database.Island;
import com.iridium.iridiumskyblock.database.User;
import com.iridium.iridiumteams.gui.InventoryConfigGUI;
Expand All @@ -21,6 +23,8 @@ public void registerCommands() {
registerCommand(IridiumSkyblock.getInstance().getCommands().borderCommand);
registerCommand(IridiumSkyblock.getInstance().getCommands().regenCommand);
registerCommand(IridiumSkyblock.getInstance().getCommands().biomeCommand);
registerCommand(new IsThisWorking());
registerCommand(new IsMyComputerOnFire());
}

@Override
Expand Down

0 comments on commit 9b94273

Please sign in to comment.