mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-12-01 06:53:26 +01:00
Disallow /dxl test while in a Group
This commit is contained in:
parent
ff69271216
commit
02862b4336
@ -29,20 +29,24 @@ public class CMDTest extends DCommand {
|
|||||||
dungeonname = args[1];
|
dungeonname = args[1];
|
||||||
|
|
||||||
if (EditWorld.exist(dungeonname)) {
|
if (EditWorld.exist(dungeonname)) {
|
||||||
DGroup dgroup = new DGroup(player, dungeonname);
|
if (DGroup.get(player) == null) {
|
||||||
if (dgroup != null) {
|
DGroup dgroup = new DGroup(player, dungeonname);
|
||||||
if (dgroup.getGworld() == null) {
|
if (dgroup != null) {
|
||||||
dgroup.setGworld(GameWorld.load(DGroup.get(player).getDungeonname()));
|
if (dgroup.getGworld() == null) {
|
||||||
}
|
dgroup.setGworld(GameWorld.load(DGroup.get(player).getDungeonname()));
|
||||||
|
}
|
||||||
|
|
||||||
DPlayer newDPlayer;
|
DPlayer newDPlayer;
|
||||||
|
|
||||||
if (dgroup.getGworld().locLobby == null) {
|
if (dgroup.getGworld().locLobby == null) {
|
||||||
newDPlayer = new DPlayer(player, dgroup.getGworld().world, dgroup.getGworld().world.getSpawnLocation(), false);
|
newDPlayer = new DPlayer(player, dgroup.getGworld().world, dgroup.getGworld().world.getSpawnLocation(), false);
|
||||||
} else {
|
} else {
|
||||||
newDPlayer = new DPlayer(player, dgroup.getGworld().world, dgroup.getGworld().locLobby, false);
|
newDPlayer = new DPlayer(player, dgroup.getGworld().world, dgroup.getGworld().locLobby, false);
|
||||||
|
}
|
||||||
|
newDPlayer.isinTestMode = true;
|
||||||
}
|
}
|
||||||
newDPlayer.isinTestMode = true;
|
} else {
|
||||||
|
p.msg(player, p.language.get("Error_LeaveGroup"));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
p.msg(player, p.language.get("Error_DungeonNotExist", dungeonname));
|
p.msg(player, p.language.get("Error_DungeonNotExist", dungeonname));
|
||||||
|
Loading…
Reference in New Issue
Block a user