From 7c978bab0ccd8881550e4dcd1cc1f920565a8d20 Mon Sep 17 00:00:00 2001 From: Grafe Date: Fri, 18 Jan 2013 02:21:23 +0100 Subject: [PATCH] Added Spout sounds --- src/com/dre/dungeonsxl/game/GameMessage.java | 19 +++++++++++++++++-- src/com/dre/dungeonsxl/game/GameWorld.java | 8 +++++++- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/src/com/dre/dungeonsxl/game/GameMessage.java b/src/com/dre/dungeonsxl/game/GameMessage.java index d1901c6e..76aecf49 100644 --- a/src/com/dre/dungeonsxl/game/GameMessage.java +++ b/src/com/dre/dungeonsxl/game/GameMessage.java @@ -3,6 +3,9 @@ package com.dre.dungeonsxl.game; import java.util.concurrent.CopyOnWriteArrayList; import org.bukkit.block.Block; +import org.getspout.spoutapi.Spout; +import org.getspout.spoutapi.SpoutManager; +import org.getspout.spoutapi.player.SpoutPlayer; import com.dre.dungeonsxl.DPlayer; import com.dre.dungeonsxl.P; @@ -17,12 +20,14 @@ public class GameMessage { public String msg; public GameWorld gworld; public int radius; + public boolean isSpoutSoundMsg; - public GameMessage(Block block, int msgid,GameWorld gworld,int radius){ + public GameMessage(Block block, int msgid,GameWorld gworld,int radius,boolean isSpoutSoundMsg){ this.block=block; this.msg=gworld.config.getMsg(msgid); this.gworld=gworld; this.radius=radius; + this.isSpoutSoundMsg=isSpoutSoundMsg; if(this.msg!=null){ gmessages.add(this); @@ -37,8 +42,18 @@ public class GameMessage { for(DPlayer dplayer:DPlayer.get(gmessage.gworld.world)){ if(!gmessage.playerDone.contains(dplayer)){ if(dplayer.player.getLocation().distance(gmessage.block.getLocation())