Use a better podium for NPC, reenable boosters
This commit is contained in:
parent
77e9de0f8f
commit
8bf26dbc11
@ -7,8 +7,9 @@ import com.google.gson.Gson;
|
||||
*/
|
||||
public class ApiEndpoint
|
||||
{
|
||||
private static final String API_HOST = "10.33.53.12";
|
||||
private static final int API_PORT = 7979;
|
||||
// private static final String API_HOST = "10.33.53.12";
|
||||
private static final String API_HOST = "localhost";
|
||||
private static final int API_PORT = 3000;
|
||||
|
||||
private ApiWebCall _webCall;
|
||||
|
||||
|
@ -174,7 +174,7 @@ public class Arcade extends JavaPlugin
|
||||
|
||||
//Arcade Manager
|
||||
PollManager pollManager = new PollManager(this, _clientManager, _donationManager);
|
||||
_gameManager = new ArcadeManager(this, serverStatusManager, ReadServerConfig(), _clientManager, _donationManager, _damageManager, statsManager, incognito, achievementManager, disguiseManager, creature, teleport, new Blood(this), chat, portal, preferenceManager, inventoryManager, packetHandler, cosmeticManager, projectileManager, petManager, hologramManager, webServerAddress, pollManager, npcmanager, customDataManager, punish, eloManager);
|
||||
_gameManager = new ArcadeManager(this, serverStatusManager, ReadServerConfig(), _clientManager, _donationManager, _damageManager, statsManager, incognito, achievementManager, disguiseManager, creature, teleport, new Blood(this), chat, portal, preferenceManager, inventoryManager, packetHandler, cosmeticManager, projectileManager, petManager, hologramManager, webServerAddress, pollManager, npcmanager, customDataManager, punish, eloManager, boosterManager);
|
||||
|
||||
new GlobalPacketManager(this, _clientManager, serverStatusManager, inventoryManager, _donationManager, petManager, statsManager, _gameManager.getBonusManager().getRewardManager());
|
||||
|
||||
|
@ -10,6 +10,7 @@ import mineplex.core.achievement.AchievementManager;
|
||||
import mineplex.core.blockrestore.BlockRestore;
|
||||
import mineplex.core.blood.Blood;
|
||||
import mineplex.core.bonuses.BonusManager;
|
||||
import mineplex.core.boosters.BoosterManager;
|
||||
import mineplex.core.chat.Chat;
|
||||
import mineplex.core.common.Rank;
|
||||
import mineplex.core.common.util.C;
|
||||
@ -73,6 +74,7 @@ import mineplex.minecraft.game.core.fire.Fire;
|
||||
import nautilus.game.arcade.addons.SoupAddon;
|
||||
import nautilus.game.arcade.addons.TeamArmorAddon;
|
||||
import nautilus.game.arcade.addons.compass.CompassAddon;
|
||||
import nautilus.game.arcade.booster.GameBoosterManager;
|
||||
import nautilus.game.arcade.command.DisguiseCommand;
|
||||
import nautilus.game.arcade.command.GameCmdModeCommand;
|
||||
import nautilus.game.arcade.command.GameCommand;
|
||||
@ -219,11 +221,11 @@ public class ArcadeManager extends MiniPlugin implements IRelation
|
||||
private boolean _gameCommandMode;
|
||||
|
||||
public ArcadeManager(Arcade plugin, ServerStatusManager serverStatusManager, GameServerConfig serverConfig,
|
||||
CoreClientManager clientManager, DonationManager donationManager, DamageManager damageManager,
|
||||
StatsManager statsManager, IncognitoManager incognitoManager, AchievementManager achievementManager, DisguiseManager disguiseManager, Creature creature, Teleport teleport, Blood blood, Chat chat,
|
||||
Portal portal, PreferencesManager preferences, InventoryManager inventoryManager, PacketHandler packetHandler,
|
||||
CosmeticManager cosmeticManager, ProjectileManager projectileManager, PetManager petManager, HologramManager hologramManager, String webAddress, PollManager pollManager,
|
||||
NpcManager npcManager, CustomDataManager customDataManager, Punish punish, EloManager eloManager)
|
||||
CoreClientManager clientManager, DonationManager donationManager, DamageManager damageManager,
|
||||
StatsManager statsManager, IncognitoManager incognitoManager, AchievementManager achievementManager, DisguiseManager disguiseManager, Creature creature, Teleport teleport, Blood blood, Chat chat,
|
||||
Portal portal, PreferencesManager preferences, InventoryManager inventoryManager, PacketHandler packetHandler,
|
||||
CosmeticManager cosmeticManager, ProjectileManager projectileManager, PetManager petManager, HologramManager hologramManager, String webAddress, PollManager pollManager,
|
||||
NpcManager npcManager, CustomDataManager customDataManager, Punish punish, EloManager eloManager, BoosterManager boosterManager)
|
||||
{
|
||||
super("Game Manager", plugin);
|
||||
|
||||
@ -317,6 +319,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation
|
||||
new ValentinesGiftManager(plugin, clientManager, _bonusManager.getRewardManager(), inventoryManager, _cosmeticManager.getGadgetManager(), statsManager);
|
||||
new GameTestingManager(this);
|
||||
new PlayerDisguiseManager(plugin, _clientManager);
|
||||
new GameBoosterManager(plugin, boosterManager, disguiseManager, hologramManager, serverConfig);
|
||||
|
||||
// Game Addons
|
||||
new CompassAddon(plugin, this);
|
||||
|
@ -16,6 +16,7 @@ import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.ArmorStand;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
@ -24,6 +25,8 @@ import org.bukkit.event.player.PlayerInteractAtEntityEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import java.util.HashSet;
|
||||
|
||||
/**
|
||||
* @author Shaun Bennett
|
||||
*/
|
||||
@ -47,22 +50,10 @@ public class BoosterPodium extends MiniPlugin
|
||||
_hologramManager = hologramManager;
|
||||
_podiumLocation = podiumLocation;
|
||||
|
||||
addPodium();
|
||||
setPodium(_podiumLocation, Material.EMERALD_BLOCK.getId(), (byte) 0);
|
||||
updateNpcs();
|
||||
}
|
||||
|
||||
public void addPodium()
|
||||
{
|
||||
for(int x = 0; x < 2; x++)
|
||||
{
|
||||
for (int z = 0; z < 2; z++)
|
||||
{
|
||||
Location location = _podiumLocation.clone().add(x - 0.5, 0, z - 0.5);
|
||||
location.getBlock().setType(Material.STEP);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void updateNpcs()
|
||||
{
|
||||
System.out.println("Updating Npcs.");
|
||||
@ -75,7 +66,7 @@ public class BoosterPodium extends MiniPlugin
|
||||
_activeArmorStand.remove();
|
||||
}
|
||||
|
||||
Location armorStandLocation = _podiumLocation.clone();
|
||||
Location armorStandLocation = _podiumLocation.clone().add(0, 1.5, 0);
|
||||
ArmorStand armorStand = _podiumLocation.getWorld().spawn(armorStandLocation, ArmorStand.class);
|
||||
armorStand.setVisible(true);
|
||||
armorStand.setCustomNameVisible(false);
|
||||
@ -94,7 +85,7 @@ public class BoosterPodium extends MiniPlugin
|
||||
|
||||
if (_hologram == null)
|
||||
{
|
||||
_hologram = new Hologram(_hologramManager, armorStandLocation.clone().add(0, 2, 0), getHologramText(activeBooster));
|
||||
_hologram = new Hologram(_hologramManager, armorStandLocation.clone().add(0, 1.75, 0), getHologramText(activeBooster));
|
||||
_hologram.start();
|
||||
}
|
||||
|
||||
@ -207,4 +198,66 @@ public class BoosterPodium extends MiniPlugin
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
|
||||
public void setPodium(Location loc, int id, byte data)
|
||||
{
|
||||
HashSet<Block> blockSet = new HashSet<>();
|
||||
//Coloring
|
||||
Block block = loc.clone().add( 0.5, 0, 0.5).getBlock();
|
||||
blockSet.add(block);
|
||||
MapUtil.QuickChangeBlockAt(block.getLocation(), id, data);
|
||||
|
||||
block = loc.clone().add(-0.5, 0, 0.5).getBlock();
|
||||
blockSet.add(block);
|
||||
MapUtil.QuickChangeBlockAt(block.getLocation(), id, data);
|
||||
|
||||
block = loc.clone().add( 0.5, 0, -0.5).getBlock();
|
||||
blockSet.add(block);
|
||||
MapUtil.QuickChangeBlockAt(block.getLocation(), id, data);
|
||||
|
||||
block = loc.clone().add(-0.5, 0, -0.5).getBlock();
|
||||
blockSet.add(block);
|
||||
MapUtil.QuickChangeBlockAt(block.getLocation(), id, data);
|
||||
|
||||
//Top
|
||||
block = loc.clone().add( 0.5, 1, 0.5).getBlock();
|
||||
blockSet.add(block);
|
||||
MapUtil.QuickChangeBlockAt(block.getLocation(), 44, (byte)5);
|
||||
|
||||
block = loc.clone().add(-0.5, 1, 0.5).getBlock();
|
||||
blockSet.add(block);
|
||||
MapUtil.QuickChangeBlockAt(block.getLocation(), 44, (byte)5);
|
||||
|
||||
block = loc.clone().add( 0.5, 1, -0.5).getBlock();
|
||||
blockSet.add(block);
|
||||
MapUtil.QuickChangeBlockAt(block.getLocation(), 44, (byte)5);
|
||||
|
||||
block = loc.clone().add(-0.5, 1, -0.5).getBlock();
|
||||
blockSet.add(block);
|
||||
MapUtil.QuickChangeBlockAt(block.getLocation(), 44, (byte)5);
|
||||
|
||||
//Floor
|
||||
for (int x=-2 ; x<2 ; x++)
|
||||
{
|
||||
for (int z=-2 ; z<2 ; z++)
|
||||
{
|
||||
block = loc.clone().add(x + 0.5, -1, z + 0.5).getBlock();
|
||||
blockSet.add(block);
|
||||
|
||||
MapUtil.QuickChangeBlockAt(block.getLocation(), id, data);
|
||||
}
|
||||
}
|
||||
|
||||
//Outline
|
||||
for (int x=-3 ; x<3 ; x++)
|
||||
{
|
||||
for (int z=-3 ; z<3 ; z++)
|
||||
{
|
||||
block = loc.clone().add(x + 0.5, -1, z + 0.5).getBlock();
|
||||
if (blockSet.contains(block)) continue;
|
||||
|
||||
MapUtil.QuickChangeBlockAt(block.getLocation(), 35, (byte)15);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user