mirror of
https://github.com/sekwah41/Advanced-Portals.git
synced 2024-11-22 02:25:49 +01:00
Changed messages
This commit is contained in:
parent
725c6b68f6
commit
fba9880548
@ -64,6 +64,8 @@ portal.error.invalidselection=You must have both pos1 and pos2 selected to creat
|
||||
portal.error.takenname=The name given for the portal is already taken.
|
||||
portal.error.selection.differentworlds=Both the selected points need to be in the same world.
|
||||
|
||||
desti.info.noargs=\u00A7cNo tags were given
|
||||
|
||||
command.error.noname= No name has been given.
|
||||
|
||||
desti.error.takenname=The name given for the portal is already taken.
|
||||
|
@ -113,4 +113,8 @@ public class AdvancedPortal {
|
||||
public void setTriggerBlocks(String[] triggerBlocks) {
|
||||
this.triggerBlocks = triggerBlocks;
|
||||
}
|
||||
|
||||
public String[] getTriggerBlocks() {
|
||||
return triggerBlocks;
|
||||
}
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ public abstract class CreateSubCommand {
|
||||
boolean partingValueWithSpaces = false;
|
||||
String argBeingParsed = "";
|
||||
String currentParsedValue = "";
|
||||
for (int i = 2; i < args.length; i++) {
|
||||
for (int i = 1; i < args.length; i++) {
|
||||
if(partingValueWithSpaces) {
|
||||
if(args[i].charAt(args[i].length() - 1) == '"') {
|
||||
args[i] = args[i].substring(0, args[i].length() - 1);
|
||||
|
@ -29,8 +29,14 @@ public class CreateDestiSubCommand extends CreateSubCommand implements SubComman
|
||||
if(desti != null) {
|
||||
sender.sendMessage(Lang.translateColor("messageprefix.positive") + Lang.translateColor("command.createdesti.complete"));
|
||||
sender.sendMessage(Lang.translateColor("command.create.tags"));
|
||||
for (DataTag tag : desti.getArgs()) {
|
||||
sender.sendMessage(tag.NAME + ":" + tag.VALUE);
|
||||
ArrayList<DataTag> destiArgs = desti.getArgs();
|
||||
if(destiArgs.size() == 0) {
|
||||
sender.sendMessage(Lang.translateColor("desti.info.noargs"));
|
||||
}
|
||||
else {
|
||||
for (DataTag tag : destiArgs) {
|
||||
sender.sendMessage(tag.NAME + ":" + tag.VALUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (PortalException portalTagExeption) {
|
||||
|
@ -11,6 +11,7 @@ import com.sekwah.advancedportals.coreconnector.container.CommandSenderContainer
|
||||
import com.sekwah.advancedportals.coreconnector.container.PlayerContainer;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class CreatePortalSubCommand extends CreateSubCommand implements SubCommand {
|
||||
@ -29,6 +30,7 @@ public class CreatePortalSubCommand extends CreateSubCommand implements SubComma
|
||||
if(portal != null) {
|
||||
sender.sendMessage(Lang.translateColor("messageprefix.positive") + Lang.translateColor("command.create.complete"));
|
||||
sender.sendMessage(Lang.translateColor("command.create.tags"));
|
||||
sender.sendMessage("triggerBlock:" + Arrays.toString(portal.getTriggerBlocks()));
|
||||
for (DataTag tag: portal.getArgs()) {
|
||||
sender.sendMessage(tag.NAME + ":" + tag.VALUE);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user