Map Parser voxel update
Disabled spec GUI in bridges other minor changes
This commit is contained in:
parent
10ab390bd7
commit
f80e640d34
@ -15,6 +15,7 @@ public enum Rank
|
||||
MODERATOR("Mod", ChatColor.GOLD),
|
||||
HELPER("Helper", ChatColor.DARK_AQUA),
|
||||
MAPDEV("Mapper", ChatColor.BLUE),
|
||||
MAPLEAD("MapKing", ChatColor.DARK_PURPLE),
|
||||
|
||||
//Staff ^^
|
||||
|
||||
|
@ -37,8 +37,16 @@ public class UtilTextBottom
|
||||
|
||||
public static void displayProgress(String prefix, double amount, String suffix, Player... players)
|
||||
{
|
||||
displayProgress(prefix, amount, suffix, false, players);
|
||||
}
|
||||
|
||||
public static void displayProgress(String prefix, double amount, String suffix, boolean progressDirectionSwap, Player... players)
|
||||
{
|
||||
if (progressDirectionSwap)
|
||||
amount = 1 - amount;
|
||||
|
||||
//Generate Bar
|
||||
int bars = 12;
|
||||
int bars = 24;
|
||||
String progressBar = C.cGreen + "";
|
||||
boolean colorChange = false;
|
||||
for (int i=0 ; i<bars ; i++)
|
||||
@ -49,7 +57,7 @@ public class UtilTextBottom
|
||||
colorChange = true;
|
||||
}
|
||||
|
||||
progressBar += "█";
|
||||
progressBar += "▌";
|
||||
}
|
||||
|
||||
//Send to Player
|
||||
|
@ -6,7 +6,6 @@ import java.util.LinkedList;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.entity.PlayerDeathEvent;
|
||||
import org.bukkit.event.player.PlayerQuitEvent;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import mineplex.core.MiniPlugin;
|
||||
@ -204,6 +203,17 @@ public class Recharge extends MiniPlugin
|
||||
_recharge.get(player.getName()).get(ability).DisplayForce = displayForce;
|
||||
}
|
||||
|
||||
public void setCountdown(Player player, String ability, boolean countdown)
|
||||
{
|
||||
if (!_recharge.containsKey(player.getName()))
|
||||
return;
|
||||
|
||||
if (!_recharge.get(player.getName()).containsKey(ability))
|
||||
return;
|
||||
|
||||
_recharge.get(player.getName()).get(ability).Countdown = countdown;
|
||||
}
|
||||
|
||||
public void Reset(Player player)
|
||||
{
|
||||
_recharge.put(player.getName(), new NautHashMap<String, RechargeData>());
|
||||
|
@ -30,6 +30,7 @@ public class RechargeData
|
||||
public ItemStack Item;
|
||||
|
||||
public boolean DisplayForce = false;
|
||||
public boolean Countdown = false; //This will make the output a countdown, instead of a recharge.
|
||||
public boolean AttachItem;
|
||||
public boolean AttachDurability;
|
||||
|
||||
@ -62,11 +63,15 @@ public class RechargeData
|
||||
{
|
||||
if (!UtilTime.elapsed(Time, Recharge))
|
||||
{
|
||||
UtilTextBottom.displayProgress(C.Bold + Name, percent, UtilTime.MakeStr(Recharge - (System.currentTimeMillis() - Time)), Player);
|
||||
UtilTextBottom.displayProgress(C.Bold + Name, percent, UtilTime.MakeStr(Recharge - (System.currentTimeMillis() - Time)), Countdown, Player);
|
||||
}
|
||||
else
|
||||
{
|
||||
UtilTextBottom.display(C.cGreen + C.Bold + Name + " Recharged", Player);
|
||||
|
||||
if (!Countdown)
|
||||
UtilTextBottom.display(C.cGreen + C.Bold + Name + " Recharged", Player);
|
||||
else
|
||||
UtilTextBottom.display(C.cRed + C.Bold + Name + " Ended", Player);
|
||||
|
||||
//PLING!
|
||||
if (Recharge > 4000)
|
||||
|
@ -1,13 +0,0 @@
|
||||
package mineplex.core.scoreboard;
|
||||
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import mineplex.core.MiniPlugin;
|
||||
|
||||
public class EasyScoreboard extends MiniPlugin
|
||||
{
|
||||
public EasyScoreboard(JavaPlugin plugin)
|
||||
{
|
||||
super("EasyScoreboard", plugin);
|
||||
}
|
||||
}
|
@ -81,6 +81,8 @@ public class MapParser extends JavaPlugin implements Listener
|
||||
private List<BaseCommand> _commands = new ArrayList<BaseCommand>();
|
||||
private Location _spawnLocation;
|
||||
|
||||
private HashMap<Player, Boolean> _permissionMap = new HashMap<Player, Boolean>();
|
||||
|
||||
@Override
|
||||
public void onEnable()
|
||||
{
|
||||
@ -127,11 +129,37 @@ public class MapParser extends JavaPlugin implements Listener
|
||||
ResetInventory(event.getPlayer());
|
||||
|
||||
DisplayHelp(player);
|
||||
|
||||
for (Plugin plugin : Bukkit.getPluginManager().getPlugins())
|
||||
player.addAttachment(plugin, "worldedit.*", true);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void permissionUpdate(TickEvent event)
|
||||
{
|
||||
for (Player player : UtilServer.getPlayers())
|
||||
{
|
||||
permissionSet(player);
|
||||
}
|
||||
}
|
||||
|
||||
public void permissionSet(Player player)
|
||||
{
|
||||
boolean hasPermission = GetData(player.getWorld().getName()).HasAccess(player);
|
||||
|
||||
if (!_permissionMap.containsKey(player) || _permissionMap.get(player) != hasPermission)
|
||||
{
|
||||
for (Plugin plugin : Bukkit.getPluginManager().getPlugins())
|
||||
{
|
||||
player.addAttachment(plugin, "worldedit.*", hasPermission);
|
||||
player.addAttachment(plugin, "voxelsniper.sniper", hasPermission);
|
||||
player.addAttachment(plugin, "voxelsniper.brush.*", hasPermission);
|
||||
}
|
||||
|
||||
_permissionMap.put(player, hasPermission);
|
||||
|
||||
UtilPlayer.message(player, "Plugin Permissions: " + F.tf(hasPermission));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void DisplayHelp(Player player)
|
||||
{
|
||||
UtilPlayer.message(player, F.main("Parser", "Listing Commands;"));
|
||||
@ -491,7 +519,7 @@ public class MapParser extends JavaPlugin implements Listener
|
||||
System.out.println(world + ChatColor.RESET + " " + name + ChatColor.RESET + " " + event.getMessage());
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@EventHandler(priority = EventPriority.LOWEST)
|
||||
public void InteractCancel(PlayerInteractEvent event)
|
||||
{
|
||||
//Permission
|
||||
@ -501,17 +529,23 @@ public class MapParser extends JavaPlugin implements Listener
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void WorldeditCancel(PlayerCommandPreprocessEvent event)
|
||||
@EventHandler(priority = EventPriority.LOWEST)
|
||||
public void commandCancel(PlayerCommandPreprocessEvent event)
|
||||
{
|
||||
if (event.getMessage().startsWith("//"))
|
||||
if (event.getMessage().startsWith("/tp") ||
|
||||
event.getMessage().startsWith("/hub") ||
|
||||
event.getMessage().startsWith("/list") ||
|
||||
event.getMessage().startsWith("/map") ||
|
||||
event.getMessage().startsWith("/create") ||
|
||||
event.getMessage().startsWith("/copy") ||
|
||||
event.getMessage().startsWith("/delete"))
|
||||
return;
|
||||
|
||||
//Permission
|
||||
if (!GetData(event.getPlayer().getWorld().getName()).HasAccess(event.getPlayer()))
|
||||
{
|
||||
//Permission
|
||||
if (!GetData(event.getPlayer().getWorld().getName()).HasAccess(event.getPlayer()))
|
||||
{
|
||||
UtilPlayer.message(event.getPlayer(), F.main("Parser", "You do not have Build-Access for this Map."));
|
||||
event.setCancelled(true);
|
||||
}
|
||||
UtilPlayer.message(event.getPlayer(), F.main("Parser", "You do not have Build-Access for this Map."));
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -594,19 +594,9 @@ public class ArcadeManager extends MiniPlugin implements IRelation
|
||||
@EventHandler
|
||||
public void MessageJoin(PlayerJoinEvent event)
|
||||
{
|
||||
if (_game == null || _game.AnnounceJoinQuit)
|
||||
{
|
||||
Player player = event.getPlayer();
|
||||
if (_game != null && _game.AnnounceJoinQuit)
|
||||
event.setJoinMessage(F.sys("Join", GetColor(event.getPlayer()) + event.getPlayer().getName()));
|
||||
|
||||
if (_clientManager.Get(player).GetRank() != Rank.LEGEND)
|
||||
event.setJoinMessage(null);
|
||||
else
|
||||
{
|
||||
event.setJoinMessage(C.cGreen + C.Bold + "Legend " + player.getName() + " has joined!");
|
||||
UtilFirework.playFirework(player.getEyeLocation(), org.bukkit.FireworkEffect.Type.BALL_LARGE, Color.LIME, true, true);
|
||||
player.getWorld().playSound(player.getEyeLocation(), Sound.WITHER_SPAWN, 2f, 1f);
|
||||
}
|
||||
}
|
||||
else
|
||||
event.setJoinMessage(null);
|
||||
}
|
||||
|
@ -149,6 +149,8 @@ public class Bridge extends TeamGame implements OreObsfucation
|
||||
"The last team alive wins!"
|
||||
});
|
||||
|
||||
this.CompassSpectatorMenu = false;
|
||||
|
||||
_ore = new OreHider();
|
||||
|
||||
// Flags
|
||||
|
@ -1,36 +0,0 @@
|
||||
package nautilus.game.arcade.game.games.smash.kits;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import nautilus.game.arcade.ArcadeManager;
|
||||
import nautilus.game.arcade.kit.KitAvailability;
|
||||
import nautilus.game.arcade.kit.Perk;
|
||||
import nautilus.game.arcade.kit.SmashKit;
|
||||
|
||||
public class KitComingSoon extends SmashKit
|
||||
{
|
||||
public KitComingSoon(ArcadeManager manager)
|
||||
{
|
||||
super(manager, C.cRed + "Coming Soon", KitAvailability.Gem, 5000,
|
||||
|
||||
new String[]
|
||||
{
|
||||
},
|
||||
|
||||
new Perk[]
|
||||
{
|
||||
},
|
||||
EntityType.VILLAGER,
|
||||
new ItemStack(Material.IRON_SWORD));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void GiveItems(Player player)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user