Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public boolean checkPermission(String playerName, String perm) {
@Override
public void sendMessage(String playerName, String message) {
if (playerName.equals("console")) {
caller.getLogger().info(message);
loader.getGame().getServer().getConsole().sendMessage(((SpongeServerCaller)getCaller()).addColorSponge(message));
return;
}
loader.getGame().getServer().getPlayer(playerName).get().sendMessage(((SpongeServerCaller)getCaller()).addColorSponge(message));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
import org.spongepowered.api.text.format.TextColors;
import org.spongepowered.api.text.format.TextStyle;
import org.spongepowered.api.text.format.TextStyles;
import org.spongepowered.api.world.Location;
import org.spongepowered.api.world.World;

import java.io.File;
import java.util.ArrayList;
Expand Down Expand Up @@ -73,7 +75,7 @@ public Text addColorSponge(String message) {
TextColor color = null;
TextStyle.Base style = null;
while (m.find()) {

String entry = m.group();
if (entry.contains("{{")) {
color = null;
Expand Down Expand Up @@ -205,7 +207,7 @@ public CommandResult process(CommandSource source, String arguments) throws Comm
}

@Override
public List<String> getSuggestions(CommandSource source, String arguments) throws CommandException {
public List<String> getSuggestions(CommandSource source, String arguments, Location<World> targetPosition) throws CommandException {
List<String> list = new ArrayList<>();
list.addAll(subCommand.getSubCommandKeys());
return list;
Expand All @@ -217,12 +219,12 @@ public boolean testPermission(CommandSource source) {
}

@Override
public java.util.Optional<? extends Text> getShortDescription(CommandSource source) {
public java.util.Optional<Text> getShortDescription(CommandSource source) {
return Optional.empty();
}

@Override
public java.util.Optional<? extends Text> getHelp(CommandSource source) {
public java.util.Optional<Text> getHelp(CommandSource source) {
return Optional.empty();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
import java.io.InputStreamReader;
import java.util.logging.Level;

@Plugin(id = "GreatmancodeToolsLoader", name = "GreatmancodeToolsLoader", version = "1.0")
@Plugin(id = "greatmancodetoolsloader", name = "greatmancodetoolsloader", version = "1.0")
public class SpongeLoader implements Loader {

@Getter
Expand Down Expand Up @@ -87,6 +87,8 @@ public void onEnable() {
serverCaller.getLogger().log(Level.SEVERE, "Unable to load the main class!", e);
} catch (IllegalAccessException e) {
serverCaller.getLogger().log(Level.SEVERE, "Unable to load the main class!", e);
} catch (ArrayIndexOutOfBoundsException e) {
serverCaller.getLogger().log(Level.SEVERE, "Unable to load the main class!", e);
}
}

Expand Down