mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-30 14:43:39 +01:00
Compatibility with DungeonsXL build 939 and up
This commit is contained in:
parent
a4914d99b4
commit
83b391315f
@ -17,34 +17,34 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
|
||||
import de.erethon.dungeonsxl.event.dgroup.DGroupCreateEvent;
|
||||
import de.erethon.dungeonsxl.event.dgroup.DGroupDisbandEvent;
|
||||
import de.erethon.dungeonsxl.event.dplayer.DPlayerJoinDGroupEvent;
|
||||
import de.erethon.dungeonsxl.event.dplayer.DPlayerLeaveDGroupEvent;
|
||||
import de.erethon.dungeonsxl.api.event.group.GroupCreateEvent;
|
||||
import de.erethon.dungeonsxl.api.event.group.GroupDisbandEvent;
|
||||
import de.erethon.dungeonsxl.api.event.group.GroupPlayerJoinEvent;
|
||||
import de.erethon.dungeonsxl.api.event.group.GroupPlayerLeaveEvent;
|
||||
|
||||
import me.blackvein.quests.util.Lang;
|
||||
|
||||
public class DungeonsListener implements Listener {
|
||||
|
||||
@EventHandler
|
||||
public void onGroupCreate(DGroupCreateEvent event) {
|
||||
public void onGroupCreate(GroupCreateEvent event) {
|
||||
if (Lang.get("questDungeonsCreate").length() > 0) {
|
||||
event.getCreator().sendMessage(ChatColor.YELLOW + Lang.get("questDungeonsCreate"));
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onGroupDisbandEvent(DGroupDisbandEvent event) {
|
||||
public void onGroupDisbandEvent(GroupDisbandEvent event) {
|
||||
if (Lang.get("questDungeonsDisband").length() > 0) {
|
||||
event.getDisbander().sendMessage(ChatColor.RED + Lang.get("questDungeonsDisband"));
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onPlayerJoinEvent(DPlayerJoinDGroupEvent event) {
|
||||
if (event.getDGroup() != null && event.getDPlayer() != null) {
|
||||
Player i = event.getDGroup().getLeader();
|
||||
Player p = event.getDPlayer().getPlayer();
|
||||
public void onPlayerJoinEvent(GroupPlayerJoinEvent event) {
|
||||
if (event.getGroup() != null && event.getPlayer() != null) {
|
||||
Player i = event.getGroup().getLeader();
|
||||
Player p = event.getPlayer().getPlayer();
|
||||
if (i != null && p != null) {
|
||||
if (Lang.get("questDungeonsInvite").length() > 0) {
|
||||
i.sendMessage(ChatColor.GREEN + Lang.get(i, "questDungeonsInvite")
|
||||
@ -58,10 +58,10 @@ public class DungeonsListener implements Listener {
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onPlayerLeaveEvent(DPlayerLeaveDGroupEvent event) {
|
||||
if (event.getDGroup() != null && event.getDPlayer() != null) {
|
||||
Player k = event.getDGroup().getLeader();
|
||||
Player p = event.getDPlayer().getPlayer();
|
||||
public void onPlayerLeaveEvent(GroupPlayerLeaveEvent event) {
|
||||
if (event.getGroup() != null && event.getPlayer() != null) {
|
||||
Player k = event.getGroup().getLeader();
|
||||
Player p = event.getPlayer().getPlayer();
|
||||
if (k != null && p != null) {
|
||||
if (Lang.get("questDungeonsKicked").length() > 0) {
|
||||
k.sendMessage(ChatColor.RED + Lang.get(k, "questDungeonsKicked").replace("<player>", k.getName()));
|
||||
|
Loading…
Reference in New Issue
Block a user