SpongeDocs icon indicating copy to clipboard operation
SpongeDocs copied to clipboard

Ongoing Minor Issue List SpongeDocs Edition

Open Inscrutable opened this issue 7 years ago • 12 comments

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!

Inscrutable avatar Jun 02 '18 06:06 Inscrutable

  • [ ] 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

ST-DDT avatar Jul 09 '18 21:07 ST-DDT

  • [ ] 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

ST-DDT avatar Jul 29 '18 08:07 ST-DDT

  • [ ] 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 {

ST-DDT avatar Aug 31 '18 21:08 ST-DDT

  • [ ] 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()) {

ST-DDT avatar Aug 31 '18 21:08 ST-DDT

  • [ ] Differently named references to PluginContainers / Plugins

  • plugin

  • myplugin

  • yourPluginInstance

Should probably use plugin all the time.

ST-DDT avatar Aug 31 '18 21:08 ST-DDT

  • Under Tasks -> Build, click on jar should be
  • Under Tasks -> Build, double- click on jar

Grauldon avatar Feb 09 '19 16:02 Grauldon

  • [x] Update Ore entry in Sponge Glossary to just The Official Sponge plugin hosting site. (Could provide a link to the site.)

Grauldon avatar Mar 10 '19 02:03 Grauldon

  • [ ] Locate and update branch names from stable and bleeding to api-# as appropriate.

Grauldon avatar May 05 '19 15:05 Grauldon

  • [ ] 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

MinusKube avatar Jun 04 '19 00:06 MinusKube

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.

Inscrutable avatar Jun 06 '19 11:06 Inscrutable

  • [ ] https://github.com/SpongePowered/SpongeDocs/blame/stable/source/server/spongineer/logs.rst#L8

screenshot

It looks like it is meant to say "Table of Contents"

Originally reported by 3TUSK on Discord

ST-DDT avatar Jun 15 '19 08:06 ST-DDT

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();
}

mjra007 avatar Sep 15 '20 14:09 mjra007