Reorganized lots of stuff (components) #86
3 changed files with 20 additions and 3 deletions
18
pom.xml
18
pom.xml
|
@ -106,6 +106,7 @@
|
|||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<branch>master</branch> <!-- Should be master if building ButtonCore locally -->
|
||||
</properties>
|
||||
|
||||
<repositories>
|
||||
|
@ -173,7 +174,7 @@
|
|||
<dependency>
|
||||
<groupId>com.github.TBMCPlugins.ButtonCore</groupId>
|
||||
<artifactId>ButtonCore</artifactId>
|
||||
<version>${env.TRAVIS_BRANCH}-SNAPSHOT</version>
|
||||
<version>${branch}-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
@ -225,4 +226,19 @@
|
|||
<version>4.0.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>ci</id>
|
||||
<activation>
|
||||
<property>
|
||||
<name>env.TRAVIS_BRANCH</name>
|
||||
</property>
|
||||
</activation>
|
||||
<properties>
|
||||
<!-- Override only if necessary -->
|
||||
<branch>${env.TRAVIS_BRANCH}</branch>
|
||||
</properties>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
|
|
@ -51,6 +51,7 @@ public abstract class DiscordSenderBase implements CommandSender {
|
|||
public void sendMessage(String message) {
|
||||
try {
|
||||
final boolean broadcast = new Exception().getStackTrace()[2].getMethodName().contains("broadcast");
|
||||
//if (broadcast && DiscordPlugin.hooked) - TODO: What should happen if unhooked
|
||||
if (broadcast)
|
||||
return;
|
||||
final String sendmsg = DPUtils.sanitizeString(message);
|
||||
|
|
|
@ -39,8 +39,8 @@ import sx.blah.discord.util.MissingPermissionsException;
|
|||
import javax.annotation.Nullable;
|
||||
import java.awt.*;
|
||||
import java.time.Instant;
|
||||
import java.util.*;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
import java.util.concurrent.TimeoutException;
|
||||
import java.util.function.Consumer;
|
||||
|
@ -81,7 +81,7 @@ public class MCChatListener implements Listener, IListener<MessageReceivedEvent>
|
|||
time = se.getValue();
|
||||
|
||||
final String authorPlayer = "[" + DPUtils.sanitizeStringNoEscape(e.getChannel().DisplayName) + "] " //
|
||||
+ ("Minecraft".equals(e.getOrigin()) ? "" : "[" + e.getOrigin() + "]") //
|
||||
+ ("Minecraft".equals(e.getOrigin()) ? "" : "[" + e.getOrigin().substring(0, 1) + "]") //
|
||||
+ (DPUtils.sanitizeStringNoEscape(e.getSender() instanceof Player //
|
||||
? ((Player) e.getSender()).getDisplayName() //
|
||||
: e.getSender().getName()));
|
||||
|
|
Loading…
Reference in a new issue