mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-11-02 17:00:19 +01:00
/dxl group show: Allow player names instead of group names
This commit is contained in:
parent
7abca6543b
commit
1a7dbfd434
@ -26,6 +26,7 @@ import io.github.dre2n.dungeonsxl.event.dplayer.DPlayerKickEvent;
|
||||
import io.github.dre2n.dungeonsxl.player.DGamePlayer;
|
||||
import io.github.dre2n.dungeonsxl.player.DGroup;
|
||||
import io.github.dre2n.dungeonsxl.player.DPermissions;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@ -99,7 +100,12 @@ public class GroupCommand extends BRCommand {
|
||||
return;
|
||||
|
||||
} else if (args[1].equalsIgnoreCase("show") && DPermissions.hasPermission(sender, DPermissions.GROUP_ADMIN)) {
|
||||
showGroup(DGroup.getByName(args[2]));
|
||||
DGroup group = DGroup.getByName(args[2]);
|
||||
Player player = Bukkit.getPlayer(args[2]);
|
||||
if (group == null && player != null) {
|
||||
group = DGroup.getByPlayer(player);
|
||||
}
|
||||
showGroup(group);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user