mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-11-09 20:31:28 +01:00
Send dungeon and map name on enter
This commit is contained in:
parent
c8708e8bc8
commit
df8e45a8b4
@ -222,6 +222,13 @@ public class DGroup {
|
||||
for (Player player : getPlayers()) {
|
||||
DPlayer dplayer = DPlayer.get(player);
|
||||
dplayer.respawn();
|
||||
if (dungeonName != null) {
|
||||
MessageUtil.sendScreenMessage(player, "&b&l" + dungeonName.replaceAll("_", " "), "&4&l" + mapName.replaceAll("_", ""));
|
||||
|
||||
} else {
|
||||
MessageUtil.sendScreenMessage(player, "&4&l" + mapName.replaceAll("_", ""));
|
||||
}
|
||||
|
||||
if ( !DungeonsXL.getPlugin().getMainConfig().enableEconomy()) {
|
||||
continue;
|
||||
}
|
||||
|
@ -1,7 +1,9 @@
|
||||
package io.github.dre2n.dungeonsxl.util;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
public class MessageUtil {
|
||||
@ -102,6 +104,26 @@ public class MessageUtil {
|
||||
sendCenteredMessage(sender, "&4&l[ &6" + plugin.getDescription().getName() + " &4&l]");
|
||||
}
|
||||
|
||||
public static void sendScreenMessage(Player player, String title, String subtitle, long fadeIn, long show, long fadeOut) {
|
||||
subtitle = ChatColor.translateAlternateColorCodes('&', subtitle);
|
||||
title = ChatColor.translateAlternateColorCodes('&', title);
|
||||
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "title " + player.getName() + " time " + fadeIn + " " + show + " " + fadeOut);
|
||||
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "title " + player.getName() + " subtitle " + subtitle);
|
||||
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "title " + player.getName() + " title " + title);
|
||||
}
|
||||
|
||||
public static void sendScreenMessage(Player player, String title, String subtitle) {
|
||||
subtitle = ChatColor.translateAlternateColorCodes('&', subtitle);
|
||||
title = ChatColor.translateAlternateColorCodes('&', title);
|
||||
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "title " + player.getName() + " subtitle \"" + subtitle + "\"");
|
||||
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "title " + player.getName() + " title \"" + title + "\"");
|
||||
}
|
||||
|
||||
public static void sendScreenMessage(Player player, String title) {
|
||||
title = ChatColor.translateAlternateColorCodes('&', title);
|
||||
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "title " + player.getName() + " title \"" + title + "\"");
|
||||
}
|
||||
|
||||
public static final String[] BIG_A = {
|
||||
"IIIIIIIIIIII ",
|
||||
" IIII IIII ",
|
||||
|
Loading…
Reference in New Issue
Block a user