Update to Java 10/11
This commit is contained in:
parent
cc6c477add
commit
013287cb47
9 changed files with 19 additions and 22 deletions
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_10">
|
||||
<output url="file://$MODULE_DIR$/target/classes" />
|
||||
<output-test url="file://$MODULE_DIR$/target/test-classes" />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
|
|
6
pom.xml
6
pom.xml
|
@ -30,14 +30,14 @@
|
|||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
<source>10</source>
|
||||
<target>10</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>2.4.2</version>
|
||||
<version>3.2.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
package buttondevteam.chat;
|
||||
|
||||
import buttondevteam.lib.ChromaUtils;
|
||||
import buttondevteam.lib.TBMCChatEvent;
|
||||
import buttondevteam.lib.ThorpeUtils;
|
||||
import lombok.var;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
|
@ -50,7 +49,7 @@ public final class ChatUtils {
|
|||
*/
|
||||
public static void sendChatMessage(TBMCChatEvent e, Function<String, String> modifier) {
|
||||
var str = "[" + e.getChannel().DisplayName().get() + "] <"
|
||||
+ ThorpeUtils.getDisplayName(e.getSender()) + "> " + e.getMessage();
|
||||
+ ChromaUtils.getDisplayName(e.getSender()) + "> " + e.getMessage();
|
||||
str = modifier.apply(str);
|
||||
for (Player p : Bukkit.getOnlinePlayers())
|
||||
if (e.shouldSendTo(p))
|
||||
|
|
|
@ -5,7 +5,6 @@ import buttondevteam.lib.chat.ChatMessage;
|
|||
import buttondevteam.lib.chat.Command2;
|
||||
import buttondevteam.lib.chat.CommandClass;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.experimental.var;
|
||||
import lombok.val;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
|
|
|
@ -3,10 +3,10 @@ package buttondevteam.chat.components.fun;
|
|||
import buttondevteam.chat.ChatPlayer;
|
||||
import buttondevteam.chat.PluginMain;
|
||||
import buttondevteam.core.component.channel.Channel;
|
||||
import buttondevteam.lib.ChromaUtils;
|
||||
import buttondevteam.lib.TBMCChatEventBase;
|
||||
import buttondevteam.lib.TBMCCommandPreprocessEvent;
|
||||
import buttondevteam.lib.TBMCSystemChatEvent;
|
||||
import buttondevteam.lib.ThorpeUtils;
|
||||
import buttondevteam.lib.architecture.Component;
|
||||
import buttondevteam.lib.architecture.ConfigData;
|
||||
import buttondevteam.lib.chat.TBMCChatAPI;
|
||||
|
@ -155,7 +155,7 @@ public class FunComponent extends Component<PluginMain> implements Listener {
|
|||
val user = ChromaGamerBase.getFromSender(event.getSender());
|
||||
target.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, 10 * 20, 5, false, false));
|
||||
val chan = user.channel().get();
|
||||
TBMCChatAPI.SendSystemMessage(chan, chan.getRTR(event.getSender()), ThorpeUtils.getDisplayName(event.getSender()) + " un" + s
|
||||
TBMCChatAPI.SendSystemMessage(chan, chan.getRTR(event.getSender()), ChromaUtils.getDisplayName(event.getSender()) + " un" + s
|
||||
+ "'d " + target.getDisplayName(), unlolTarget);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,15 +1,13 @@
|
|||
package buttondevteam.chat.components.fun;
|
||||
|
||||
import buttondevteam.core.component.channel.Channel;
|
||||
import buttondevteam.core.component.restart.RestartComponent;
|
||||
import buttondevteam.core.component.restart.ScheduledRestartCommand;
|
||||
import buttondevteam.lib.ChromaUtils;
|
||||
import buttondevteam.lib.ScheduledServerRestartEvent;
|
||||
import buttondevteam.lib.ThorpeUtils;
|
||||
import buttondevteam.lib.chat.Command2;
|
||||
import buttondevteam.lib.chat.CommandClass;
|
||||
import buttondevteam.lib.chat.ICommand2MC;
|
||||
import buttondevteam.lib.chat.TBMCChatAPI;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
|
@ -33,7 +31,7 @@ public class PressCommand extends ICommand2MC implements Listener {
|
|||
return;
|
||||
}
|
||||
pressers.add(sender);
|
||||
TBMCChatAPI.SendSystemMessage(Channel.GlobalChat, Channel.RecipientTestResult.ALL, String.format("§b-- %s §bpressed at %.0fs", ThorpeUtils.getDisplayName(sender), command.getRestartCounter() / 20f), command.getComponent().getRestartBroadcast());
|
||||
TBMCChatAPI.SendSystemMessage(Channel.GlobalChat, Channel.RecipientTestResult.ALL, String.format("§b-- %s §bpressed at %.0fs", ChromaUtils.getDisplayName(sender), command.getRestartCounter() / 20f), command.getComponent().getRestartBroadcast());
|
||||
command.setRestartCounter(startTicks);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
package buttondevteam.chat.components.fun;
|
||||
|
||||
import buttondevteam.core.component.channel.Channel;
|
||||
import buttondevteam.lib.ChromaUtils;
|
||||
import buttondevteam.lib.TBMCChatEventBase;
|
||||
import buttondevteam.lib.TBMCSystemChatEvent;
|
||||
import buttondevteam.lib.ThorpeUtils;
|
||||
import buttondevteam.lib.chat.*;
|
||||
import buttondevteam.lib.chat.Command2;
|
||||
import buttondevteam.lib.chat.CommandClass;
|
||||
import buttondevteam.lib.chat.ICommand2MC;
|
||||
import buttondevteam.lib.chat.TBMCChatAPI;
|
||||
import lombok.Data;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.potion.PotionEffect;
|
||||
|
@ -39,9 +41,9 @@ public final class UnlolCommand extends ICommand2MC {
|
|||
if (lol.Lolowner instanceof Player)
|
||||
((Player) lol.Lolowner)
|
||||
.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, 2 * 20, 5, false, false));
|
||||
String msg = ThorpeUtils.getDisplayName(sender)
|
||||
String msg = ChromaUtils.getDisplayName(sender)
|
||||
+ (lol.Lolornot ? " unlolled " : " unlaughed ")
|
||||
+ ThorpeUtils.getDisplayName(lol.Lolowner);
|
||||
+ ChromaUtils.getDisplayName(lol.Lolowner);
|
||||
TBMCChatAPI.SendSystemMessage(Channel.GlobalChat, Channel.RecipientTestResult.ALL, msg, target);
|
||||
Lastlol.remove(lol.Chatevent.getChannel());
|
||||
return true;
|
||||
|
|
|
@ -15,7 +15,6 @@ import com.earth2me.essentials.User;
|
|||
import com.palmergames.bukkit.towny.exceptions.NotRegisteredException;
|
||||
import com.palmergames.bukkit.towny.object.Nation;
|
||||
import lombok.Getter;
|
||||
import lombok.experimental.var;
|
||||
import lombok.val;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
|
|
|
@ -10,10 +10,10 @@ import buttondevteam.chat.components.towncolors.TownColorComponent;
|
|||
import buttondevteam.core.ComponentManager;
|
||||
import buttondevteam.core.component.channel.Channel;
|
||||
import buttondevteam.core.component.channel.ChatRoom;
|
||||
import buttondevteam.lib.ChromaUtils;
|
||||
import buttondevteam.lib.TBMCChatEvent;
|
||||
import buttondevteam.lib.TBMCCoreAPI;
|
||||
import buttondevteam.lib.TBMCSystemChatEvent;
|
||||
import buttondevteam.lib.ThorpeUtils;
|
||||
import buttondevteam.lib.chat.ChatMessage;
|
||||
import buttondevteam.lib.chat.TBMCChatAPI;
|
||||
import buttondevteam.lib.player.ChromaGamerBase;
|
||||
|
@ -100,7 +100,7 @@ public class PlayerListener implements Listener {
|
|||
} else if (cmd.equalsIgnoreCase("minecraft:me")) {
|
||||
if (!(sender instanceof Player) || !PluginMain.essentials.getUser((Player) sender).isMuted()) {
|
||||
String msg = message.substring(index + 1);
|
||||
TBMCChatAPI.SendSystemMessage(Channel.GlobalChat, Channel.RecipientTestResult.ALL, String.format("* %s %s", ThorpeUtils.getDisplayName(sender), msg), TBMCSystemChatEvent.BroadcastTarget.ALL); //TODO: Don't send to all
|
||||
TBMCChatAPI.SendSystemMessage(Channel.GlobalChat, Channel.RecipientTestResult.ALL, String.format("* %s %s", ChromaUtils.getDisplayName(sender), msg), TBMCSystemChatEvent.BroadcastTarget.ALL); //TODO: Don't send to all
|
||||
return true;
|
||||
} else {
|
||||
sender.sendMessage("§cCan't use /minecraft:me while muted.");
|
||||
|
|
Loading…
Reference in a new issue