Added patron badges & changed wait what

And fixed Votifier repo
This commit is contained in:
Norbi Peti 2018-04-22 23:13:24 +02:00
parent 2de3f1f6e7
commit 991ca23918
No known key found for this signature in database
GPG key ID: DBA4C4549A927E56
6 changed files with 37 additions and 51 deletions

View file

@ -115,7 +115,7 @@
</repository>
<repository>
<id>Votifier</id>
<url>http://repo.howaner.de/</url>
<url>https://dl.bintray.com/nuvotifier/maven/</url>
</repository>
<repository>
<id>Minigames</id>
@ -167,8 +167,8 @@
</dependency>
<dependency>
<groupId>com.vexsoftware</groupId>
<artifactId>votifier</artifactId>
<version>1.9</version>
<artifactId>nuvotifier-universal</artifactId>
<version>2.3.4</version>
</dependency>
<!-- <dependency> <groupId>au.com.mineauz</groupId> <artifactId>Minigames</artifactId>
<version>1.8.0</version> </dependency> -->

View file

@ -197,6 +197,12 @@ public class ChatProcessing {
new TellrawPart((sender instanceof IDiscordSender ? "From Discord\n" : "")
+ "Copy message").setColor(Color.Blue)))
.setClickEvent(TellrawEvent.create(TellrawEvent.ClickAction.SUGGEST_COMMAND, message)));
if (PluginMain.permission.has(player, "tbmc.badge.diamond"))
json.addExtra(new TellrawPart("[P]").setColor(Color.Aqua).setBold(true)
.setHoverEvent(TellrawEvent.create(TellrawEvent.HoverAction.SHOW_TEXT, "Diamond Patreon supporter")));
else if (PluginMain.permission.has(player, "tbmc.badge.gold"))
json.addExtra(new TellrawPart("[P]").setColor(Color.Gold).setBold(true)
.setHoverEvent(TellrawEvent.create(TellrawEvent.HoverAction.SHOW_TEXT, "Gold Patreon supporter")));
json.addExtra(new TellrawPart(" <"));
TellrawPart hovertp = new TellrawPart("");
if (mp != null)

View file

@ -109,8 +109,8 @@ public class PluginMain extends JavaPlugin { // Translated to Java: 2015.07.15.
setTownColor(dtp, entry.getKey(), entry.getValue());
});
if (!setupChat() || !setupEconomy() || !setupPermissions())
getLogger().warning("Failed to set up chat or economy or permissions!");
if (!setupEconomy() || !setupPermissions())
TBMCCoreAPI.SendException("We're in trouble", new Exception("Failed to set up economy or permissions!"));
new Thread(this::FlairGetterThreadMethod).start();
new Thread(new AnnouncerThread()).start();

View file

@ -1,45 +0,0 @@
package buttondevteam.chat.commands;
import java.util.Arrays;
import java.util.stream.Collectors;
import org.bukkit.command.CommandSender;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.entity.Player;
import buttondevteam.chat.ChatPlayer;
import buttondevteam.chat.listener.PlayerListener;
import buttondevteam.lib.chat.Channel;
import buttondevteam.lib.chat.CommandClass;
import buttondevteam.lib.chat.TBMCChatAPI;
import buttondevteam.lib.chat.TBMCCommandBase;
import buttondevteam.lib.player.TBMCPlayer;
@CommandClass(modOnly = false)
public class WaitWhatCommand extends TBMCCommandBase {
@Override
public boolean OnCommand(CommandSender sender, String alias, String[] args) {
Channel channel;
if (sender instanceof Player && ((Player) sender).isOnline())
channel = TBMCPlayer.getPlayer(((Player) sender).getUniqueId(), ChatPlayer.class).CurrentChannel;
else if (sender instanceof ConsoleCommandSender)
channel = PlayerListener.ConsoleChannel;
else
channel = Channel.GlobalChat;
final String message;
if (args.length == 0)
message = "wait what";
else
message = "wait " + Arrays.stream(args).collect(Collectors.joining(" ")) + " what";
TBMCChatAPI.SendChatMessage(channel, sender, message);
return true;
}
@Override
public String[] GetHelpText(String alias) {
return new String[] { //
"§6--- Wait what ----", //
"Wait what" //
};
}
}

View file

@ -0,0 +1,19 @@
package buttondevteam.chat.commands.appendtext;
import buttondevteam.lib.chat.CommandClass;
@CommandClass(modOnly = false)
public class WaitWhatCommand extends AppendTextCommandBase {
@Override
public String[] GetHelpText(String alias) {
return new String[] { //
"§6--- Wait what ----", //
"Wait what" //
};
}
@Override
public String GetAppendedText() {
return "wait what";
}
}

View file

@ -44,4 +44,10 @@ permissions:
tbmc.admin:
description: Gives access to /un- commands and /u admin commands
tbmc.rainbow:
description: Gives access to rainbow colors (/u c).
description: Gives access to rainbow colors (/u c).
tbmc.badge.gold:
description: Gives a patron badge.
default: false
tbmc.badge.diamond:
description: Gives a cool patron badge.
default: false