Final Changes
This commit is contained in:
parent
ba2bee4f25
commit
1654850e8c
@ -264,7 +264,7 @@ public class InventoryManager extends MiniDbClientPlugin<ClientInventory>
|
|||||||
@EventHandler
|
@EventHandler
|
||||||
public void onInventoryClick(final InventoryClickEvent event)
|
public void onInventoryClick(final InventoryClickEvent event)
|
||||||
{
|
{
|
||||||
if (event.getClickedInventory().getType() != InventoryType.ENCHANTING)
|
if (event.getClickedInventory() == null || event.getClickedInventory().getType() != InventoryType.ENCHANTING)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ import java.util.Map;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* All ID's are assigned by enum order.
|
* All ID's are assigned by enum order.
|
||||||
*
|
* <p>
|
||||||
* Key:
|
* Key:
|
||||||
* Default value: The value this is set at if the user has not toggled it
|
* Default value: The value this is set at if the user has not toggled it
|
||||||
* Category: Determines which sub menu, along with permissions to view, this preference falls to
|
* Category: Determines which sub menu, along with permissions to view, this preference falls to
|
||||||
@ -38,9 +38,9 @@ public enum Preference
|
|||||||
CLAN_TIPS(true, PreferenceCategory.MISC, Material.IRON_SWORD, "Show Clan Tips"),
|
CLAN_TIPS(true, PreferenceCategory.MISC, Material.IRON_SWORD, "Show Clan Tips"),
|
||||||
HUB_MUSIC(true, PreferenceCategory.MISC, Material.NOTE_BLOCK, "Hub Music"),
|
HUB_MUSIC(true, PreferenceCategory.MISC, Material.NOTE_BLOCK, "Hub Music"),
|
||||||
|
|
||||||
AUTO_JOIN_NEXT_GAME(true, PreferenceCategory.GAME_PLAY, Material.DIAMOND_SWORD, "Auto Join Next Game"),
|
//AUTO_JOIN_NEXT_GAME(true, PreferenceCategory.GAME_PLAY, Material.DIAMOND_SWORD, "Auto Join Next Game"),
|
||||||
COUNTDOWN_ON_CLICK(true, PreferenceCategory.GAME_PLAY, Material.EMERALD, "Countdown to Join"),;
|
//COUNTDOWN_ON_CLICK(true, PreferenceCategory.GAME_PLAY, Material.EMERALD, "Countdown to Join"),
|
||||||
|
;
|
||||||
private static final Map<Integer, Preference> PREFERENCE_MAP = Maps.newHashMap();
|
private static final Map<Integer, Preference> PREFERENCE_MAP = Maps.newHashMap();
|
||||||
private static final Map<PreferenceCategory, List<Preference>> PREFERENCES_BY_CATEGORY = Maps.newHashMap();
|
private static final Map<PreferenceCategory, List<Preference>> PREFERENCES_BY_CATEGORY = Maps.newHashMap();
|
||||||
|
|
||||||
|
@ -342,7 +342,7 @@ public class HubManager extends MiniClientPlugin<HubClient>
|
|||||||
scoreboard.get(HubScoreboardLine.SERVER_TITLE).write(C.cAqua + C.Bold + "Server");
|
scoreboard.get(HubScoreboardLine.SERVER_TITLE).write(C.cAqua + C.Bold + "Server");
|
||||||
scoreboard.get(HubScoreboardLine.SERVER_NAME).write(_serverName);
|
scoreboard.get(HubScoreboardLine.SERVER_NAME).write(_serverName);
|
||||||
scoreboard.get(HubScoreboardLine.GEM_TITLE).write(C.cGreen + C.Bold + "Gems");
|
scoreboard.get(HubScoreboardLine.GEM_TITLE).write(C.cGreen + C.Bold + "Gems");
|
||||||
scoreboard.get(HubScoreboardLine.SHARDS_TITLE).write(C.cYellow + C.Bold + "Treasure Shards");
|
scoreboard.get(HubScoreboardLine.SHARDS_TITLE).write(C.cYellow + C.Bold + "Shards");
|
||||||
scoreboard.get(HubScoreboardLine.RANK_TITLE).write(C.cGold + C.Bold + "Rank");
|
scoreboard.get(HubScoreboardLine.RANK_TITLE).write(C.cGold + C.Bold + "Rank");
|
||||||
scoreboard.get(HubScoreboardLine.WEBSITE_TITLE).write(C.cRed + C.Bold + "Website");
|
scoreboard.get(HubScoreboardLine.WEBSITE_TITLE).write(C.cRed + C.Bold + "Website");
|
||||||
scoreboard.get(HubScoreboardLine.WEBSITE_VALUE).write("www.mineplex.com");
|
scoreboard.get(HubScoreboardLine.WEBSITE_VALUE).write("www.mineplex.com");
|
||||||
|
@ -116,7 +116,7 @@ public class ParkourManager extends MiniPlugin
|
|||||||
_parkour.add(new ParkourData("Ruins Parkour", RUINS_DESCRIPTION, RUINS_GEMS,
|
_parkour.add(new ParkourData("Ruins Parkour", RUINS_DESCRIPTION, RUINS_GEMS,
|
||||||
new Location(Manager.GetSpawn().getWorld(), 113.5, 66, -46.5),
|
new Location(Manager.GetSpawn().getWorld(), 113.5, 66, -46.5),
|
||||||
new Location(Manager.GetSpawn().getWorld(), 124, 86, 18),
|
new Location(Manager.GetSpawn().getWorld(), 124, 86, 18),
|
||||||
new Location(Manager.GetSpawn().getWorld(), 105, 57, -48)));
|
new Location(Manager.GetSpawn().getWorld(), 105, 57, -53)));
|
||||||
|
|
||||||
_parkour.add(new ParkourData("G.W.E.N Parkour", GWEN_DESCRIPTION, GWEN_GEMS,
|
_parkour.add(new ParkourData("G.W.E.N Parkour", GWEN_DESCRIPTION, GWEN_GEMS,
|
||||||
new Location(Manager.GetSpawn().getWorld(), 55.5, 68, -94.5),
|
new Location(Manager.GetSpawn().getWorld(), 55.5, 68, -94.5),
|
||||||
@ -124,12 +124,12 @@ public class ParkourManager extends MiniPlugin
|
|||||||
new Location(Manager.GetSpawn().getWorld(), 52, 61, -81)));
|
new Location(Manager.GetSpawn().getWorld(), 52, 61, -81)));
|
||||||
|
|
||||||
_parkour.add(new ParkourData("Lava Parkour", LAVA_DESCRIPTION, LAVA_GEMS,
|
_parkour.add(new ParkourData("Lava Parkour", LAVA_DESCRIPTION, LAVA_GEMS,
|
||||||
new Location(Manager.GetSpawn().getWorld(), -95.5, 67, 3.5),
|
new Location(Manager.GetSpawn().getWorld(), -93.5, 67, 37.5),
|
||||||
new Location(Manager.GetSpawn().getWorld(), -144, 97, -21),
|
new Location(Manager.GetSpawn().getWorld(), -144, 97, -21),
|
||||||
new Location(Manager.GetSpawn().getWorld(), -88, 62, 41)));
|
new Location(Manager.GetSpawn().getWorld(), -88, 62, 41)));
|
||||||
|
|
||||||
_parkour.add(new ParkourData("Desert Village Parkour", DESERT_DESCRIPTION, DESERT_GEMS,
|
_parkour.add(new ParkourData("Desert Village Parkour", DESERT_DESCRIPTION, DESERT_GEMS,
|
||||||
new Location(Manager.GetSpawn().getWorld(), -63.5, 69, 32.5),
|
new Location(Manager.GetSpawn().getWorld(), -63.5, 69, -32.5),
|
||||||
new Location(Manager.GetSpawn().getWorld(), -57, 82, -35),
|
new Location(Manager.GetSpawn().getWorld(), -57, 82, -35),
|
||||||
new Location(Manager.GetSpawn().getWorld(), -122, 45, 57)));
|
new Location(Manager.GetSpawn().getWorld(), -122, 45, 57)));
|
||||||
|
|
||||||
@ -148,6 +148,8 @@ public class ParkourManager extends MiniPlugin
|
|||||||
{
|
{
|
||||||
if (enabled)
|
if (enabled)
|
||||||
{
|
{
|
||||||
|
player.setAllowFlight(false);
|
||||||
|
player.setFlying(false);
|
||||||
_active.put(player.getUniqueId(), data);
|
_active.put(player.getUniqueId(), data);
|
||||||
UtilPlayer.message(player, F.main("Parkour", "You have entered " + F.elem("Parkour Mode") + "."));
|
UtilPlayer.message(player, F.main("Parkour", "You have entered " + F.elem("Parkour Mode") + "."));
|
||||||
|
|
||||||
@ -156,6 +158,7 @@ public class ParkourManager extends MiniPlugin
|
|||||||
player.setVelocity(new Vector(0, -1, 0));
|
player.setVelocity(new Vector(0, -1, 0));
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
|
player.setAllowFlight(true);
|
||||||
_active.remove(player.getUniqueId());
|
_active.remove(player.getUniqueId());
|
||||||
UtilPlayer.message(player, F.main("Parkour", "You have exited " + F.elem("Parkour Mode") + "."));
|
UtilPlayer.message(player, F.main("Parkour", "You have exited " + F.elem("Parkour Mode") + "."));
|
||||||
}
|
}
|
||||||
@ -203,6 +206,7 @@ public class ParkourManager extends MiniPlugin
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
_parkour.stream()
|
_parkour.stream()
|
||||||
.filter(data -> UtilMath.offset(player.getLocation(), data.NPC) < 6)
|
.filter(data -> UtilMath.offset(player.getLocation(), data.NPC) < 6)
|
||||||
.filter(data -> Recharge.Instance.use(player, data.Name + " Info", 300000, false, false))
|
.filter(data -> Recharge.Instance.use(player, data.Name + " Info", 300000, false, false))
|
||||||
|
@ -1,28 +1,6 @@
|
|||||||
package mineplex.hub.modules;
|
package mineplex.hub.modules;
|
||||||
|
|
||||||
import java.util.HashSet;
|
|
||||||
|
|
||||||
import mineplex.core.Managers;
|
import mineplex.core.Managers;
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.GameMode;
|
|
||||||
import org.bukkit.Material;
|
|
||||||
import org.bukkit.Sound;
|
|
||||||
import org.bukkit.block.Block;
|
|
||||||
import org.bukkit.craftbukkit.v1_8_R3.inventory.CraftInventoryCrafting;
|
|
||||||
import org.bukkit.entity.Bat;
|
|
||||||
import org.bukkit.entity.EnderDragon;
|
|
||||||
import org.bukkit.entity.Entity;
|
|
||||||
import org.bukkit.entity.Horse;
|
|
||||||
import org.bukkit.entity.LivingEntity;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
import org.bukkit.entity.Wither;
|
|
||||||
import org.bukkit.event.EventHandler;
|
|
||||||
import org.bukkit.event.player.PlayerInteractAtEntityEvent;
|
|
||||||
import org.bukkit.event.player.PlayerInteractEvent;
|
|
||||||
import org.bukkit.inventory.Inventory;
|
|
||||||
import org.bukkit.inventory.ItemStack;
|
|
||||||
import org.bukkit.util.Vector;
|
|
||||||
|
|
||||||
import mineplex.core.MiniPlugin;
|
import mineplex.core.MiniPlugin;
|
||||||
import mineplex.core.common.util.F;
|
import mineplex.core.common.util.F;
|
||||||
import mineplex.core.common.util.UtilAction;
|
import mineplex.core.common.util.UtilAction;
|
||||||
@ -42,6 +20,28 @@ import mineplex.core.projectile.ProjectileManager;
|
|||||||
import mineplex.core.projectile.ProjectileUser;
|
import mineplex.core.projectile.ProjectileUser;
|
||||||
import mineplex.core.recharge.Recharge;
|
import mineplex.core.recharge.Recharge;
|
||||||
import mineplex.hub.HubManager;
|
import mineplex.hub.HubManager;
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
|
import org.bukkit.GameMode;
|
||||||
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.Sound;
|
||||||
|
import org.bukkit.block.Block;
|
||||||
|
import org.bukkit.craftbukkit.v1_8_R3.inventory.CraftInventoryCrafting;
|
||||||
|
import org.bukkit.entity.ArmorStand;
|
||||||
|
import org.bukkit.entity.Bat;
|
||||||
|
import org.bukkit.entity.EnderDragon;
|
||||||
|
import org.bukkit.entity.Entity;
|
||||||
|
import org.bukkit.entity.Horse;
|
||||||
|
import org.bukkit.entity.LivingEntity;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.entity.Wither;
|
||||||
|
import org.bukkit.event.EventHandler;
|
||||||
|
import org.bukkit.event.player.PlayerInteractAtEntityEvent;
|
||||||
|
import org.bukkit.event.player.PlayerInteractEvent;
|
||||||
|
import org.bukkit.inventory.Inventory;
|
||||||
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
|
import java.util.HashSet;
|
||||||
|
|
||||||
public class StackerManager extends MiniPlugin implements IThrown
|
public class StackerManager extends MiniPlugin implements IThrown
|
||||||
{
|
{
|
||||||
@ -85,6 +85,11 @@ public class StackerManager extends MiniPlugin implements IThrown
|
|||||||
if (stackee instanceof Player && ((Player)stackee).getGameMode() != GameMode.SURVIVAL)
|
if (stackee instanceof Player && ((Player)stackee).getGameMode() != GameMode.SURVIVAL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if(stackee instanceof ArmorStand)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Player stacker = event.getPlayer();
|
Player stacker = event.getPlayer();
|
||||||
|
|
||||||
if (stacker.getGameMode() != GameMode.SURVIVAL)
|
if (stacker.getGameMode() != GameMode.SURVIVAL)
|
||||||
|
Loading…
Reference in New Issue
Block a user