Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
74dbf7e827
@ -42,6 +42,9 @@ import mineplex.core.blockrestore.BlockRestore;
|
||||
import mineplex.core.blood.Blood;
|
||||
import mineplex.core.chat.Chat;
|
||||
import mineplex.core.common.Rank;
|
||||
import mineplex.core.common.jsonchat.ChildJsonMessage;
|
||||
import mineplex.core.common.jsonchat.ClickEvent;
|
||||
import mineplex.core.common.jsonchat.JsonMessage;
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.NautHashMap;
|
||||
@ -346,7 +349,21 @@ public class ArcadeManager extends MiniPlugin implements IRelation
|
||||
{
|
||||
_resourcePackNoResponse.remove(player.getName());
|
||||
|
||||
returnHubNoResPack(player, "You need to accept the resource pack!");
|
||||
UtilPlayer.message(player, " ");
|
||||
JsonMessage message = new JsonMessage("")
|
||||
.color("gold")
|
||||
.bold()
|
||||
.extra("You need to accept the resource pack!\n"
|
||||
+ "Click me for instructions on how to fix this!")
|
||||
|
||||
.click(ClickEvent.OPEN_URL,
|
||||
|
||||
"http://mineplex.com/forums/m/11929946/viewthread/21554536-wizards-resource-pack-help");
|
||||
|
||||
message.sendToPlayer(player);
|
||||
UtilPlayer.message(player, " ");
|
||||
|
||||
returnHubNoResPack(player);
|
||||
}
|
||||
else if (response == EnumResourcePackStatus.FAILED_DOWNLOAD)
|
||||
{
|
||||
@ -1320,7 +1337,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation
|
||||
{
|
||||
Entry<String, Long> entry = itel.next();
|
||||
|
||||
if (UtilTime.elapsed(entry.getValue(), 10000))
|
||||
if (UtilTime.elapsed(entry.getValue(), 20000))
|
||||
{
|
||||
Player player = Bukkit.getPlayerExact(entry.getKey());
|
||||
|
||||
@ -1364,14 +1381,19 @@ public class ArcadeManager extends MiniPlugin implements IRelation
|
||||
}
|
||||
}
|
||||
|
||||
private void returnHubNoResPack(Player player)
|
||||
{
|
||||
player.playSound(player.getLocation(), Sound.ENDERDRAGON_GROWL, 10f, 1f);
|
||||
GetPortal().sendPlayerToServer(player, "Lobby");
|
||||
}
|
||||
|
||||
private void returnHubNoResPack(Player player, String message)
|
||||
{
|
||||
UtilPlayer.message(player, " ");
|
||||
UtilPlayer.message(player, C.cGold + C.Bold + message);
|
||||
UtilPlayer.message(player, " ");
|
||||
|
||||
player.playSound(player.getLocation(), Sound.ENDERDRAGON_GROWL, 10f, 1f);
|
||||
GetPortal().sendPlayerToServer(player, "Lobby");
|
||||
returnHubNoResPack(player);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
@ -35,7 +35,6 @@ import mineplex.core.packethandler.IPacketHandler;
|
||||
import mineplex.core.packethandler.PacketInfo;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.minecraft.game.core.combat.CombatManager.AttackReason;
|
||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
import mineplex.minecraft.game.core.explosion.CustomExplosion;
|
||||
import nautilus.game.arcade.ArcadeManager;
|
||||
@ -178,7 +177,7 @@ public class Wizards extends SoloGame
|
||||
}
|
||||
|
||||
Manager.getCosmeticManager().setHideParticles(true);
|
||||
Manager.GetDamage().GetCombatManager().setUseWeaponName(AttackReason.DefaultWeaponName);
|
||||
// Manager.GetDamage().GetCombatManager().setUseWeaponName(AttackReason.DefaultWeaponName);
|
||||
|
||||
createLoot();
|
||||
|
||||
@ -307,6 +306,31 @@ public class Wizards extends SoloGame
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onWandHit(CustomDamageEvent event)
|
||||
{
|
||||
// Damager is ENTITY
|
||||
if (event.GetDamagerEntity(true) != null)
|
||||
{
|
||||
if (event.GetReason() == null)
|
||||
{
|
||||
if (event.GetDamagerPlayer(false) != null)
|
||||
{
|
||||
Player damager = event.GetDamagerPlayer(false);
|
||||
|
||||
if (damager.getInventory().getHeldItemSlot() < 5)
|
||||
{
|
||||
Wizard wizard = getWizard(damager);
|
||||
|
||||
String reason = damager.getInventory().getHeldItemSlot() < wizard.getWandsOwned() ? "Wand" : "Fist";
|
||||
|
||||
event.AddMod(reason, reason, 0, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onDamage(CustomDamageEvent event)
|
||||
{
|
||||
@ -1587,7 +1611,7 @@ public class Wizards extends SoloGame
|
||||
|
||||
UtilPlayer.message(event.getViewers().get(0), C.cRed + "You may not craft weapons");
|
||||
}
|
||||
else if (mat == Material.STICK || mat.name().contains("_HOE"))
|
||||
else if (mat == Material.STICK || mat == Material.BUCKET || mat.name().contains("_HOE"))
|
||||
{
|
||||
event.getInventory().setResult(new ItemStack(Material.AIR));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user