Creation a CreationPlayer with the jailname and cellname.
This commit is contained in:
parent
d85b2db190
commit
b5133842c0
@ -248,7 +248,7 @@ public class JailManager {
|
|||||||
if(isCreatingACell(player)) {
|
if(isCreatingACell(player)) {
|
||||||
return false;
|
return false;
|
||||||
}else {
|
}else {
|
||||||
this.cellCreators.put(player.toLowerCase(), new CreationPlayer(cellName));
|
this.cellCreators.put(player.toLowerCase(), new CreationPlayer(jailName, cellName));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,6 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import com.graywolf336.jail.JailManager;
|
import com.graywolf336.jail.JailManager;
|
||||||
import com.graywolf336.jail.beans.Cell;
|
|
||||||
import com.graywolf336.jail.beans.Jail;
|
import com.graywolf336.jail.beans.Jail;
|
||||||
import com.graywolf336.jail.command.Command;
|
import com.graywolf336.jail.command.Command;
|
||||||
import com.graywolf336.jail.command.CommandInfo;
|
import com.graywolf336.jail.command.CommandInfo;
|
||||||
@ -46,10 +45,8 @@ public class CellCreateCommand implements Command {
|
|||||||
|
|
||||||
//If they didn't provide a cell name, let's provide one ourself.
|
//If they didn't provide a cell name, let's provide one ourself.
|
||||||
if(cell.isEmpty()) cell = "cell_n" + (j.getCellCount() + 1);
|
if(cell.isEmpty()) cell = "cell_n" + (j.getCellCount() + 1);
|
||||||
Cell c = j.getCell(cell);
|
|
||||||
|
|
||||||
//No cell found
|
if(j.getCell(cell) == null) {
|
||||||
if(c == null) {
|
|
||||||
if(jm.addCreatingCell(name, jail, cell)) {
|
if(jm.addCreatingCell(name, jail, cell)) {
|
||||||
jm.getCellCreationSteps().startStepping(player);
|
jm.getCellCreationSteps().startStepping(player);
|
||||||
}else {
|
}else {
|
||||||
|
Loading…
Reference in New Issue
Block a user