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
27 changes: 27 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

.gradle/
.idea/
build
9 changes: 0 additions & 9 deletions .idea/codeStyleSettings.xml

This file was deleted.

11 changes: 0 additions & 11 deletions .idea/compiler.xml

This file was deleted.

19 changes: 0 additions & 19 deletions .idea/gradle.xml

This file was deleted.

11 changes: 0 additions & 11 deletions .idea/libraries/Gradle__aopalliance_aopalliance_1_0.xml

This file was deleted.

13 changes: 0 additions & 13 deletions .idea/libraries/Gradle__com_flowpowered_flow_math_1_0_3.xml

This file was deleted.

This file was deleted.

13 changes: 0 additions & 13 deletions .idea/libraries/Gradle__javax_inject_javax_inject_1.xml

This file was deleted.

9 changes: 0 additions & 9 deletions .idea/misc.xml

This file was deleted.

13 changes: 0 additions & 13 deletions .idea/modules.xml

This file was deleted.

124 changes: 0 additions & 124 deletions .idea/uiDesigner.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.mcsimonflash.sponge.triviaquest.commands;

import com.mcsimonflash.sponge.triviaquest.managers.Config;
import com.mcsimonflash.sponge.triviaquest.managers.Trivia;

import com.mcsimonflash.sponge.triviaquest.managers.Util;
import org.spongepowered.api.command.CommandException;
import org.spongepowered.api.command.CommandResult;
Expand All @@ -14,9 +14,9 @@ public class AnswerTrivia implements CommandExecutor {
@Override
public CommandResult execute(CommandSource src, CommandContext args) throws CommandException {
if (Trivia.trivia == null) {
throw new CommandException(Util.toText("Oh no! There isn't an active trivia question!"));
throw new CommandException(Util.toText(Config.commandAnswerTriviaNoActive));
} else if (!Trivia.processAnswer(src, args.<String>getOne("answer").get())) {
src.sendMessage(Trivia.prefix.concat(Util.toText("Oh no! That wasn't the answer :(")));
src.sendMessage(Trivia.prefix.concat(Util.toText(Config.commandAnswerTriviaWrongAnswer)));
}
return CommandResult.success();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.mcsimonflash.sponge.triviaquest.commands;

import com.mcsimonflash.sponge.triviaquest.managers.Config;
import com.mcsimonflash.sponge.triviaquest.managers.Trivia;

import com.mcsimonflash.sponge.triviaquest.managers.Util;
import org.spongepowered.api.command.CommandException;
import org.spongepowered.api.command.CommandResult;
Expand All @@ -14,7 +14,7 @@ public class PostTrivia implements CommandExecutor {
@Override
public CommandResult execute(CommandSource src, CommandContext args) throws CommandException {
if (Trivia.trivia != null) {
throw new CommandException(Util.toText("A trivia question is currently active!"));
throw new CommandException(Util.toText(Config.answerAlreadyActive));
} else if (Trivia.runnerTask != null) {
Trivia.runnerTask.cancel();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package com.mcsimonflash.sponge.triviaquest.commands;

import com.mcsimonflash.sponge.triviaquest.managers.Config;
import com.mcsimonflash.sponge.triviaquest.managers.Trivia;

import com.mcsimonflash.sponge.triviaquest.managers.Util;
import org.spongepowered.api.command.CommandException;
import org.spongepowered.api.command.CommandResult;
import org.spongepowered.api.command.CommandSource;
import org.spongepowered.api.command.args.CommandContext;
Expand All @@ -16,7 +15,7 @@ public CommandResult execute(CommandSource src, CommandContext args) {
if (Trivia.runnerEnabled = !Trivia.runnerEnabled) {
Trivia.startRunner();
}
src.sendMessage(Trivia.prefix.concat(Util.toText("The trivia runner has been &d" + (Trivia.runnerEnabled ? "enabled" : "disabled") + "&f!")));
src.sendMessage(Trivia.prefix.concat(Util.toText(Trivia.runnerEnabled ? Config.commandTriviaRunnerEnable : Config.commandTriviaRunnerDisable)));
return CommandResult.success();
}

Expand Down
Loading