ResourcePackCode: Fixed the return to hub sender displaying the wrong message. Bad downloads are now sent back to hub.
This commit is contained in:
parent
c2b7001fcc
commit
497550549b
@ -348,16 +348,14 @@ public class ArcadeManager extends MiniPlugin implements IRelation
|
|||||||
{
|
{
|
||||||
_resourcePackNoResponse.remove(player.getName());
|
_resourcePackNoResponse.remove(player.getName());
|
||||||
|
|
||||||
returnHubNoResPack(player);
|
returnHubNoResPack(player, "Failed to download resource pack!");
|
||||||
}
|
}
|
||||||
else if (response == EnumResourcePackStatus.FAILED_DOWNLOAD)
|
else if (response == EnumResourcePackStatus.FAILED_DOWNLOAD)
|
||||||
{
|
{
|
||||||
System.out.println(player.getName() + " failed to download resource pack, trying again..");
|
_resourcePackNoResponse.remove(player.getName());
|
||||||
|
|
||||||
_resourcePackNoResponse.put(player.getName(), System.currentTimeMillis());
|
returnHubNoResPack(player, "Failed to download resource pack!");
|
||||||
|
|
||||||
player.setResourcePack(_resourcePackUrl);
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1368,14 +1366,14 @@ public class ArcadeManager extends MiniPlugin implements IRelation
|
|||||||
for (Player player : UtilServer.getPlayers())
|
for (Player player : UtilServer.getPlayers())
|
||||||
{
|
{
|
||||||
if (!UtilPlayer.is1_8(player))
|
if (!UtilPlayer.is1_8(player))
|
||||||
returnHubNoResPack(player);
|
returnHubNoResPack(player, "You need to be using 1.8 to play " + GetGame().GetName() + "!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void returnHubNoResPack(Player player)
|
private void returnHubNoResPack(Player player, String message)
|
||||||
{
|
{
|
||||||
UtilPlayer.message(player, " ");
|
UtilPlayer.message(player, " ");
|
||||||
UtilPlayer.message(player, C.cGold + C.Bold + "You need to be using 1.8 to play " + GetGame().GetName() + "!");
|
UtilPlayer.message(player, C.cGold + C.Bold + message);
|
||||||
UtilPlayer.message(player, " ");
|
UtilPlayer.message(player, " ");
|
||||||
|
|
||||||
player.playSound(player.getLocation(), Sound.ENDERDRAGON_GROWL, 10f, 1f);
|
player.playSound(player.getLocation(), Sound.ENDERDRAGON_GROWL, 10f, 1f);
|
||||||
@ -1389,7 +1387,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation
|
|||||||
|
|
||||||
if (!UtilPlayer.is1_8(player) && _resourcePackRequired)
|
if (!UtilPlayer.is1_8(player) && _resourcePackRequired)
|
||||||
{
|
{
|
||||||
returnHubNoResPack(player);
|
returnHubNoResPack(player, "You need to be using 1.8 to play " + GetGame().GetName() + "!");
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user