Ongoing Minor Issue List SpongeDocs Edition
Rather than push trivial fixes as PRs, we prefer to collect them together and push them in batches. Please let us know of any minor corrections, nitpicks, and errors in spelling, grammar or punctuation that are needed, and we shall do our best to see they are dealt with.
This is a reincarnation of the humungous list at #437 - thanks to everyone so far!
- [ ] https://github.com/SpongePowered/SpongeDocs/blame/stable/source/server/management/exploit-patches.rst#L16
Exploits Patched implemented in Sponge
Should be
Exploit Patches Implemented In Sponge
or
Exploits Patched In Sponge
- [ ] https://github.com/SpongePowered/SpongeDocs/blame/stable/source/plugin/commands/childcommands.rst#L63
If a command has child commands, a :javadoc:
CommandExecutor, set through :javadoc:CommandSpec.Builder#executor(CommandExecutor)and their associated :javadoc:CommandSpec.Builder#arguments(CommandElement)are optional. The behavior of error in selection and argument parsing of child commands is dependent on whether this parent executor exists.
This section is hard to understand
- [ ] https://github.com/SpongePowered/SpongeDocs/blame/stable/source/plugin/commands/commandcallable.rst#L63
public List<String> getSuggestions(CommandSource source, String arguments) throws CommandException {
This method is now defined like this:
public List<String> getSuggestions(CommandSource source, String arguments, @Nullable Location<World> targetPosition) throws CommandException {
- [ ] https://github.com/SpongePowered/SpongeDocs/blame/stable/source/plugin/items/creating.rst#L111
try (StackFrame frame = Sponge.getCauseStackManager().pushStackFrame()) {
Should be
try (StackFrame frame = Sponge.getCauseStackManager().pushCauseFrame()) {
-
[ ] Differently named references to
PluginContainers /Plugins -
plugin -
myplugin -
yourPluginInstance
Should probably use plugin all the time.
- Under
Tasks->Build, click onjarshould be - Under
Tasks->Build, double- click onjar
- [x] Update Ore entry in Sponge Glossary to just
The Official Sponge plugin hosting site.(Could provide a link to the site.)
- [ ] Locate and update branch names from
stableandbleedingtoapi-#as appropriate.
- [ ] https://github.com/SpongePowered/SpongeDocs/blame/stable/source/plugin/optional/basic.rst#L15
- [ ] https://github.com/SpongePowered/SpongeDocs/blame/stable/source/plugin/optional/basic.rst#L94
These two titles are available for translation on Crowdin, but are not getting translated on the final page, example: https://docs.spongepowered.org/stable/fr/plugin/optional/basic.html#implicit-nullable-contracts-and-why-they-suck
Good catch. That's another issue caused by a title leading with a number and fooling the ReST / Sphinx formatting. We edited out the last few, and this one got missed somehow.
- [ ] https://github.com/SpongePowered/SpongeDocs/blame/stable/source/server/spongineer/logs.rst#L8
It looks like it is meant to say "Table of Contents"
Originally reported by 3TUSK on Discord
This was pointed out originally on discord. There is a very minor "issue" with a code block to access a data manipulator for a block.
import org.spongepowered.api.data.key.Keys;
import org.spongepowered.api.data.manipulator.mutable.block.DirectionalData;
public boolean isFacingNorth(Location<World> blockLoc) {
Optional<DirectionalData> optionalData = blockLoc.get(DirectionalData.class);
if (!optionalData.isPresent()) {
return false;
}
DirectionalData data = optionalData.get();
if (data.get(Keys.DIRECTION).get().equals(Direction.NORTH)) {
return true;
}
return false;
}
It might be that the code gets optimized after it is compiled, especially the last if statement (don't know). However, this could be easily be written like this:
import org.spongepowered.api.data.key.Keys;
import org.spongepowered.api.data.manipulator.mutable.block.DirectionalData;
public boolean isFacingNorth(Location<World> blockLoc) {
return blockLoc.get(DirectionalData.class)
.filter(dir -> dir.direction().get().equals(Direction.NORTH))
.isPresent();
}
