-
-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b581285
commit 9b94273
Showing
4 changed files
with
97 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
...ain/java/com/iridium/iridiumskyblock/commands/supersecretcommands/IsMyComputerOnFire.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
46 changes: 46 additions & 0 deletions
46
src/main/java/com/iridium/iridiumskyblock/commands/supersecretcommands/IsThisWorking.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters