Fixes I thought were merged

This commit is contained in:
Norbi Peti 2018-05-15 23:34:34 +02:00
parent 739276e797
commit eb8dff3a41
No known key found for this signature in database
GPG key ID: DBA4C4549A927E56
9 changed files with 41 additions and 50 deletions

View file

@ -46,11 +46,6 @@
<configuration>
<artifactSet>
</artifactSet>
<pluginExecution>
<action>
<execute />
</action>
</pluginExecution>
</configuration>
</execution>
</executions>

View file

@ -56,7 +56,7 @@ public class CommandCaller implements CommandExecutor {
cmd = TBMCChatAPI.GetCommands().get(path);
}
if (cmd == null) {
if (subcmds == null || subcmds.length > 0)
if (subcmds.length > 0) //Subcmds will always have value here (see assignment above)
sender.sendMessage(subcmds);
else {
final String errormsg = "§cYou don't have access to any of this command's subcommands or it doesn't have any.";

View file

@ -19,7 +19,6 @@ import java.nio.file.Files;
import java.nio.file.StandardCopyOption;
import java.util.Arrays;
import java.util.logging.Logger;
import java.util.stream.Collectors;
public class MainPlugin extends JavaPlugin {
public static MainPlugin Instance;

View file

@ -7,7 +7,7 @@ import org.bukkit.event.HandlerList;
/**
* <p>
* This event gets called (ideally) each time an exception occurs in a TBMC plugin. To call it, use {@link TBMCCoreAPI#SendException(String, Exception)}.
* This event gets called (ideally) each time an exception occurs in a TBMC plugin. To call it, use {@link TBMCCoreAPI#SendException(String, Throwable)}.
* </p>
*
* @author Norbi

View file

@ -91,7 +91,7 @@ public class Channel {
static void RegisterChannel(Channel channel) {
channels.add(channel);
Bukkit.getScheduler().runTask(Bukkit.getPluginManager().callEvent(new ChatChannelRegisterEvent(channel))); // Wait for server start
Bukkit.getScheduler().runTask(MainPlugin.Instance, () -> Bukkit.getPluginManager().callEvent(new ChatChannelRegisterEvent(channel))); // Wait for server start
}
public static class RecipientTestResult {

View file

@ -66,7 +66,7 @@ public abstract class ChromaGamerBase implements AutoCloseable {
}
/**
* Use {@link #data()} or {@link #data(String)} where possible; the 'id' must be always set
* Use {@link #data(Object)} or {@link #data(String, Object)} where possible; the 'id' must be always set
*/
protected YamlConfiguration plugindata;

View file

@ -1,20 +1,17 @@
package buttondevteam.buttonproc;
import java.util.List;
import java.util.Set;
import java.util.function.Function;
import javax.annotation.processing.AbstractProcessor;
import javax.annotation.processing.RoundEnvironment;
import javax.annotation.processing.SupportedAnnotationTypes;
import javax.annotation.processing.SupportedSourceVersion;
import javax.lang.model.SourceVersion;
import javax.lang.model.element.AnnotationMirror;
import javax.lang.model.element.Element;
import javax.lang.model.element.Modifier;
import javax.lang.model.element.TypeElement;
import javax.lang.model.util.Elements;
import javax.tools.Diagnostic.Kind;
import java.util.List;
import java.util.Set;
import java.util.function.Function;
@SupportedAnnotationTypes("buttondevteam.*")
public class ButtonProcessor extends AbstractProcessor {