forked from retromcorg/Project-Poseidon
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Minor overhauls and version change to 2.0.0
- Loading branch information
1 parent
4cb9752
commit e70c4d8
Showing
7 changed files
with
98 additions
and
30 deletions.
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
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
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
2 changes: 1 addition & 1 deletion
2
...and/defaults/CrackedAllowlistCommand.java → ...kkit/command/CrackedAllowlistCommand.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
2 changes: 1 addition & 1 deletion
2
...kit/command/defaults/FlushInvCommand.java → ...t/uberbukkit/command/FlushInvCommand.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
23 changes: 23 additions & 0 deletions
23
src/main/java/uk/betacraft/uberbukkit/command/UberBukkitCommand.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,23 @@ | ||
package uk.betacraft.uberbukkit.command; | ||
|
||
import org.bukkit.Bukkit; | ||
import org.bukkit.ChatColor; | ||
import org.bukkit.command.Command; | ||
import org.bukkit.command.CommandSender; | ||
import uk.betacraft.uberbukkit.Uberbukkit; | ||
|
||
public class UberBukkitCommand extends Command { | ||
public UberBukkitCommand() { | ||
super("uberbukkit"); | ||
this.description = "Shows information about the UberBukkit version ran on the server"; | ||
this.usageMessage = "/uberbukkit"; | ||
} | ||
|
||
@Override | ||
public boolean execute(CommandSender sender, String commandLabel, String[] args) { | ||
sender.sendMessage(ChatColor.GRAY + "This server is running " + ChatColor.RED + "UberBukkit " + ChatColor.GOLD + Uberbukkit.getVersion()); | ||
sender.sendMessage(ChatColor.GRAY + "Based on Project Poseidon " + ChatColor.AQUA + Bukkit.getServer().getPoseidonVersion()); | ||
|
||
return true; | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
src/main/java/uk/betacraft/uberbukkit/command/UuidLookupCommand.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,40 @@ | ||
package uk.betacraft.uberbukkit.command; | ||
|
||
import com.projectposeidon.api.PoseidonUUID; | ||
import com.projectposeidon.api.UUIDType; | ||
import org.bukkit.ChatColor; | ||
import org.bukkit.command.Command; | ||
import org.bukkit.command.CommandSender; | ||
|
||
import java.util.UUID; | ||
|
||
public class UuidLookupCommand extends Command { | ||
public UuidLookupCommand() { | ||
super("uuidlookup"); | ||
this.usageMessage = "/uuidlookup <username>"; | ||
} | ||
|
||
@Override | ||
public boolean execute(CommandSender sender, String commandLabel, String[] args) { | ||
if (args.length != 1) { | ||
sender.sendMessage(ChatColor.GRAY + "Usage: " + ChatColor.WHITE + "/uuidlookup " + ChatColor.AQUA + "<username>"); | ||
return true; | ||
} | ||
|
||
UUID uuid = PoseidonUUID.getPlayerUUIDFromCache(args[0], true); | ||
if (uuid == null) { | ||
uuid = PoseidonUUID.getPlayerUUIDFromCache(args[0], false); | ||
} | ||
|
||
if (uuid == null) { | ||
sender.sendMessage(ChatColor.GRAY + "Unable to locate the UUID of the player called " + ChatColor.AQUA + args[0] + ChatColor.GRAY + "! Please remember usernames are cap sensitive"); | ||
return true; | ||
} | ||
|
||
UUIDType uuidType = PoseidonUUID.getPlayerUUIDCacheStatus(args[0]); | ||
sender.sendMessage(ChatColor.GRAY + "uuidlookup > " + ChatColor.AQUA + args[0] + ChatColor.GRAY + " - " + ChatColor.GOLD + "UUID Type: " + ChatColor.YELLOW + uuidType.toString()); | ||
sender.sendMessage(ChatColor.GRAY + "uuidlookup > " + ChatColor.YELLOW + "UUID: " + ChatColor.WHITE + uuid); | ||
|
||
return true; | ||
} | ||
} |