Merge branch 'master' of ssh://dev1.mineplex.com:7999/min/mineplex
This commit is contained in:
commit
27f554ab61
@ -40,67 +40,11 @@
|
||||
</jar>
|
||||
<copy file="../bin/Dominate.jar" todir="../../Testing/Dominate/plugins"/>
|
||||
</target>
|
||||
<target name ="CaptureThePig" description="CaptureThePig">
|
||||
<jar jarfile="../bin/CaptureThePig.jar">
|
||||
<fileset dir="../Nautilus.Game.CaptureThePig/bin">
|
||||
<include name="**/*.class"/>
|
||||
</fileset>
|
||||
<fileset dir="../Core/bin">
|
||||
<include name="**/*.class"/>
|
||||
</fileset>
|
||||
<fileset dir="../Nautilus.Core/bin">
|
||||
<include name="**/*.class"/>
|
||||
</fileset>
|
||||
<fileset dir="../Nautilus.Game.Core/bin">
|
||||
<include name="**/*.class"/>
|
||||
</fileset>
|
||||
<fileset dir="../Nautilus.Game.CaptureThePig">
|
||||
<include name="*.yml"/>
|
||||
</fileset>
|
||||
|
||||
<zipfileset src="../Libraries/httpclient-4.2.jar" />
|
||||
<zipfileset src="../Libraries/httpcore-4.2.jar" />
|
||||
<zipfileset src="../Libraries/httpclient-cache-4.2.jar" />
|
||||
<zipfileset src="../Libraries/httpmime-4.2.jar" />
|
||||
<zipfileset src="../Libraries/gson-2.2.1.jar" />
|
||||
<zipfileset src="../Libraries/commons-logging-1.1.1.jar" />
|
||||
<zipfileset src="../Libraries/commons-codec-1.6.jar" />
|
||||
</jar>
|
||||
<copy file="../bin/CaptureThePig.jar" todir="../../Testing/CaptureThePig/plugins"/>
|
||||
</target>
|
||||
<target name ="PvP" description="PvP">
|
||||
<jar jarfile="../bin/PvP.jar">
|
||||
<fileset dir="../Nautilus.Game.PvP/bin">
|
||||
<include name="**/*.class"/>
|
||||
</fileset>
|
||||
<fileset dir="../Core/bin">
|
||||
<include name="**/*.class"/>
|
||||
</fileset>
|
||||
<fileset dir="../Nautilus.Core/bin">
|
||||
<include name="**/*.class"/>
|
||||
</fileset>
|
||||
<fileset dir="../Nautilus.Game.PvP">
|
||||
<include name="*.yml"/>
|
||||
</fileset>
|
||||
|
||||
<zipfileset src="../Libraries/httpclient-4.2.jar" />
|
||||
<zipfileset src="../Libraries/httpcore-4.2.jar" />
|
||||
<zipfileset src="../Libraries/httpclient-cache-4.2.jar" />
|
||||
<zipfileset src="../Libraries/httpmime-4.2.jar" />
|
||||
<zipfileset src="../Libraries/gson-2.2.1.jar" />
|
||||
<zipfileset src="../Libraries/commons-logging-1.1.1.jar" />
|
||||
<zipfileset src="../Libraries/commons-codec-1.6.jar" />
|
||||
</jar>
|
||||
<copy file="../bin/PvP.jar" todir="../../Testing/PvP/plugins"/>
|
||||
</target>
|
||||
<target name ="Arcade" description="Arcade">
|
||||
<jar jarfile="../bin/Arcade.jar">
|
||||
<fileset dir="../Nautilus.Game.Arcade/bin">
|
||||
<include name="**/*.class"/>
|
||||
</fileset>
|
||||
<fileset dir="../Core/bin">
|
||||
<include name="**/*.class"/>
|
||||
</fileset>
|
||||
<fileset dir="../Nautilus.Core/bin">
|
||||
<include name="**/*.class"/>
|
||||
</fileset>
|
||||
@ -137,9 +81,6 @@
|
||||
<fileset dir="../Mineplex.Hub/bin">
|
||||
<include name="**/*.class"/>
|
||||
</fileset>
|
||||
<fileset dir="../Core/bin">
|
||||
<include name="**/*.class"/>
|
||||
</fileset>
|
||||
<fileset dir="../Nautilus.Core/bin">
|
||||
<include name="**/*.class"/>
|
||||
</fileset>
|
||||
@ -176,9 +117,6 @@
|
||||
<fileset dir="../Nautilus.Game.MineKart/bin">
|
||||
<include name="**/*.class"/>
|
||||
</fileset>
|
||||
<fileset dir="../Core/bin">
|
||||
<include name="**/*.class"/>
|
||||
</fileset>
|
||||
<fileset dir="../Nautilus.Core/bin">
|
||||
<include name="**/*.class"/>
|
||||
</fileset>
|
||||
|
@ -1,14 +1,22 @@
|
||||
package mineplex.minecraft.game.classcombat.shop;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import mineplex.core.account.CoreClientManager;
|
||||
import mineplex.core.donation.DonationManager;
|
||||
import mineplex.core.shop.ShopBase;
|
||||
import mineplex.core.shop.page.ShopPageBase;
|
||||
|
||||
public class ClassCombatCustomBuildShop extends ClassCombatShop
|
||||
{
|
||||
public ClassCombatCustomBuildShop(ClassShopManager plugin, CoreClientManager clientManager, DonationManager donationManager, String name)
|
||||
{
|
||||
super(plugin, clientManager, donationManager, name);
|
||||
|
||||
Customizing = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ShopPageBase<ClassShopManager, ? extends ShopBase<ClassShopManager>> BuildPagesFor(Player player)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -1,14 +0,0 @@
|
||||
package mineplex.minecraft.game.classcombat.shop;
|
||||
|
||||
import mineplex.core.account.CoreClientManager;
|
||||
import mineplex.core.donation.DonationManager;
|
||||
|
||||
public class ClassCombatPurchaseShop extends ClassCombatShop
|
||||
{
|
||||
public ClassCombatPurchaseShop(ClassShopManager plugin, CoreClientManager clientManager, DonationManager donationManager, String name)
|
||||
{
|
||||
super(plugin, clientManager, donationManager, name);
|
||||
|
||||
Purchasing = true;
|
||||
}
|
||||
}
|
@ -7,38 +7,20 @@ import org.bukkit.inventory.ItemStack;
|
||||
import mineplex.core.account.CoreClientManager;
|
||||
import mineplex.core.donation.DonationManager;
|
||||
import mineplex.core.shop.ShopBase;
|
||||
import mineplex.core.shop.page.ShopPageBase;
|
||||
import mineplex.core.common.CurrencyType;
|
||||
import mineplex.core.common.util.NautHashMap;
|
||||
import mineplex.minecraft.game.classcombat.Class.ClientClass;
|
||||
import mineplex.minecraft.game.classcombat.Class.IPvpClass;
|
||||
import mineplex.minecraft.game.classcombat.shop.page.ArmorPage;
|
||||
import mineplex.minecraft.game.classcombat.shop.page.CustomBuildPage;
|
||||
|
||||
public class ClassCombatShop extends ShopBase<ClassShopManager>
|
||||
public abstract class ClassCombatShop extends ShopBase<ClassShopManager>
|
||||
{
|
||||
private NautHashMap<String, ItemStack[]> _inventoryStorage = new NautHashMap<String, ItemStack[]>();
|
||||
private NautHashMap<String, ItemStack[]> _armorStorage = new NautHashMap<String, ItemStack[]>();
|
||||
|
||||
protected boolean Purchasing = false;
|
||||
protected boolean Customizing = false;
|
||||
|
||||
public ClassCombatShop(ClassShopManager plugin, CoreClientManager clientManager, DonationManager donationManager, String name)
|
||||
{
|
||||
super(plugin, clientManager, donationManager, name, CurrencyType.Gems);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ShopPageBase<ClassShopManager, ClassCombatShop> BuildPagesFor(Player player)
|
||||
{
|
||||
return new ArmorPage(Plugin, this, ClientManager, DonationManager, player, Purchasing);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ShopPageBase<ClassShopManager, ? extends ShopBase<ClassShopManager>> GetOpeningPageForPlayer(Player player)
|
||||
{
|
||||
return new ArmorPage(Plugin, this, ClientManager, DonationManager, player, Purchasing);
|
||||
}
|
||||
|
||||
public boolean attemptShopOpen(Player player)
|
||||
{
|
||||
@ -55,7 +37,6 @@ public class ClassCombatShop extends ShopBase<ClassShopManager>
|
||||
|
||||
if (!PlayerPageMap.containsKey(player.getName()))
|
||||
{
|
||||
System.out.println("PlayerPageMap doesn't have this player");
|
||||
PlayerPageMap.put(player.getName(), buildPage);
|
||||
}
|
||||
|
||||
@ -70,16 +51,13 @@ public class ClassCombatShop extends ShopBase<ClassShopManager>
|
||||
@Override
|
||||
protected void OpenShopForPlayer(Player player)
|
||||
{
|
||||
if (Purchasing || Customizing)
|
||||
{
|
||||
_inventoryStorage.put(player.getName(), player.getInventory().getContents());
|
||||
_armorStorage.put(player.getName(), player.getInventory().getArmorContents());
|
||||
|
||||
player.getInventory().clear();
|
||||
player.getInventory().setArmorContents(new ItemStack[4]);
|
||||
|
||||
((CraftPlayer)player).getHandle().updateInventory(((CraftPlayer)player).getHandle().defaultContainer);
|
||||
}
|
||||
_inventoryStorage.put(player.getName(), player.getInventory().getContents());
|
||||
_armorStorage.put(player.getName(), player.getInventory().getArmorContents());
|
||||
|
||||
player.getInventory().clear();
|
||||
player.getInventory().setArmorContents(new ItemStack[4]);
|
||||
|
||||
((CraftPlayer)player).getHandle().updateInventory(((CraftPlayer)player).getHandle().defaultContainer);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -94,12 +72,9 @@ public class ClassCombatShop extends ShopBase<ClassShopManager>
|
||||
|
||||
if (player.isOnline())
|
||||
{
|
||||
if (Purchasing || Customizing)
|
||||
{
|
||||
player.getInventory().setContents(_inventoryStorage.get(player.getName()));
|
||||
player.getInventory().setArmorContents(_armorStorage.get(player.getName()));
|
||||
}
|
||||
|
||||
player.getInventory().setContents(_inventoryStorage.get(player.getName()));
|
||||
player.getInventory().setArmorContents(_armorStorage.get(player.getName()));
|
||||
|
||||
((CraftPlayer)player).getHandle().updateInventory(((CraftPlayer)player).getHandle().defaultContainer);
|
||||
}
|
||||
|
||||
|
@ -91,7 +91,7 @@ public class CustomBuildPage extends ShopPageBase<ClassShopManager, ClassCombatS
|
||||
|
||||
if (customBuild != null)
|
||||
{
|
||||
AddButton(slot, new ShopItem(Material.INK_SACK, itemData, customBuild.Name, lockedText, 1, locked, true), new SelectCustomBuildButton(this, customBuild));
|
||||
AddButton(slot, new ShopItem(Material.INK_SACK, itemData, "Apply " + customBuild.Name, lockedText, 1, locked, true), new SelectCustomBuildButton(this, customBuild));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -110,15 +110,13 @@ public class CustomBuildPage extends ShopPageBase<ClassShopManager, ClassCombatS
|
||||
|
||||
if (i != 0)
|
||||
{
|
||||
AddButton(slot + 9, new ShopItem(Material.ANVIL, "Edit & Save Build", new String[] { }, 1, locked, true), new EditAndSaveCustomBuildButton(this, customBuild));
|
||||
AddButton(slot + 18, new ShopItem(Material.WORKBENCH, "Edit & Don't Save Build", new String[] { }, 1, locked, true), new EditAndDontSaveCustomBuildButton(this, customBuild));
|
||||
AddButton(slot + 18, new ShopItem(Material.ANVIL, "Edit Build", new String[] { }, 1, locked, true), new EditAndSaveCustomBuildButton(this, customBuild));
|
||||
AddButton(slot + 36, new ShopItem(Material.FIRE, "Delete Build", new String[] { "§rIt will never come back..."}, 1, locked, true), new DeleteCustomBuildButton(this, customBuild));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
getInventory().setItem(slot + 9, new ShopItem(Material.ANVIL, "Edit & Save Build", new String[] { }, 1, locked, true).getHandle());
|
||||
getInventory().setItem(slot + 18, new ShopItem(Material.WORKBENCH, "Edit & Don't Save Build", new String[] { }, 1, locked, true).getHandle());
|
||||
getInventory().setItem(slot + 18, new ShopItem(Material.ANVIL, "Edit Build", new String[] { }, 1, locked, true).getHandle());
|
||||
getInventory().setItem(slot + 36, new ShopItem(Material.FIRE, "Delete Build", new String[] { "§rIt will never come back..."}, 1, locked, true).getHandle());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user