Merge branch 'master' of ssh://184.154.0.242:7999/min/mineplex
This commit is contained in:
commit
8cf10afb1b
@ -7,7 +7,7 @@
|
|||||||
</list>
|
</list>
|
||||||
</component>
|
</component>
|
||||||
<component name="IdProvider" IDEtalkID="7E81636CD93857493DFE224533ECF492" />
|
<component name="IdProvider" IDEtalkID="7E81636CD93857493DFE224533ECF492" />
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" assert-keyword="true" jdk-15="true" project-jdk-name="1.7" project-jdk-type="JavaSDK">
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||||
<output url="file://$PROJECT_DIR$/out" />
|
<output url="file://$PROJECT_DIR$/out" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
@ -0,0 +1,42 @@
|
|||||||
|
package net.minecraft.server.v1_7_R4;
|
||||||
|
|
||||||
|
import net.minecraft.server.v1_7_R4.ItemStack;
|
||||||
|
import net.minecraft.server.v1_7_R4.Packet;
|
||||||
|
import net.minecraft.server.v1_7_R4.PacketDataSerializer;
|
||||||
|
import net.minecraft.server.v1_7_R4.PacketListener;
|
||||||
|
import net.minecraft.server.v1_7_R4.PacketPlayOutListener;
|
||||||
|
|
||||||
|
public class PacketPlayOutSetSlot extends Packet {
|
||||||
|
public int a;
|
||||||
|
public int b;
|
||||||
|
public ItemStack c;
|
||||||
|
|
||||||
|
public PacketPlayOutSetSlot() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public PacketPlayOutSetSlot(int i, int j, ItemStack itemstack) {
|
||||||
|
this.a = i;
|
||||||
|
this.b = j;
|
||||||
|
this.c = itemstack == null?null:itemstack.cloneItemStack();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void a(PacketPlayOutListener packetplayoutlistener) {
|
||||||
|
packetplayoutlistener.a(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void a(PacketDataSerializer packetdataserializer) {
|
||||||
|
this.a = packetdataserializer.readByte();
|
||||||
|
this.b = packetdataserializer.readShort();
|
||||||
|
this.c = packetdataserializer.c();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void b(PacketDataSerializer packetdataserializer) {
|
||||||
|
packetdataserializer.writeByte(this.a);
|
||||||
|
packetdataserializer.writeShort(this.b);
|
||||||
|
packetdataserializer.a(this.c);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void handle(PacketListener packetlistener) {
|
||||||
|
this.a((PacketPlayOutListener)packetlistener);
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
@ -98,7 +98,7 @@ public class UtilTime
|
|||||||
if (type == TimeUnit.DAYS) text = (num = UtilMath.trim(trim, time / 86400000d)) + " Day";
|
if (type == TimeUnit.DAYS) text = (num = UtilMath.trim(trim, time / 86400000d)) + " Day";
|
||||||
else if (type == TimeUnit.HOURS) text = (num = UtilMath.trim(trim, time / 3600000d)) + " Hour";
|
else if (type == TimeUnit.HOURS) text = (num = UtilMath.trim(trim, time / 3600000d)) + " Hour";
|
||||||
else if (type == TimeUnit.MINUTES) text = (num = UtilMath.trim(trim, time / 60000d)) + " Minute";
|
else if (type == TimeUnit.MINUTES) text = (num = UtilMath.trim(trim, time / 60000d)) + " Minute";
|
||||||
else if (type == TimeUnit.SECONDS) text = (int) (num = (int) UtilMath.trim(0, time / 1000d)) + " Second";
|
else if (type == TimeUnit.SECONDS) text = (num = UtilMath.trim(trim, time / 1000d)) + " Second";
|
||||||
else text = (int) (num = (int) UtilMath.trim(0, time)) + " Millisecond";
|
else text = (int) (num = (int) UtilMath.trim(0, time)) + " Millisecond";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,11 +20,11 @@ public enum AchievementCategory
|
|||||||
|
|
||||||
//Survival
|
//Survival
|
||||||
BRIDGES("The Bridges", null,
|
BRIDGES("The Bridges", null,
|
||||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.LOSSES, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||||
Material.IRON_PICKAXE, 0, GameCategory.SURVIVAL, "Destructor Kit"),
|
Material.IRON_PICKAXE, 0, GameCategory.SURVIVAL, "Destructor Kit"),
|
||||||
|
|
||||||
SURVIVAL_GAMES("Survival Games", null,
|
SURVIVAL_GAMES("Survival Games", null,
|
||||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.LOSSES, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||||
Material.DIAMOND_SWORD, 0, GameCategory.SURVIVAL, "Horseman Kit"),
|
Material.DIAMOND_SWORD, 0, GameCategory.SURVIVAL, "Horseman Kit"),
|
||||||
|
|
||||||
MINE_STRIKE("MineStrike", null,
|
MINE_STRIKE("MineStrike", null,
|
||||||
@ -32,28 +32,28 @@ public enum AchievementCategory
|
|||||||
Material.TNT, 0, GameCategory.CLASSICS, null),
|
Material.TNT, 0, GameCategory.CLASSICS, null),
|
||||||
|
|
||||||
WIZARDS("Wizards", null,
|
WIZARDS("Wizards", null,
|
||||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.LOSSES, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||||
Material.BLAZE_ROD, 0, GameCategory.SURVIVAL, "Extra Class Skills"),
|
Material.BLAZE_ROD, 0, GameCategory.SURVIVAL, "Extra Class Skills"),
|
||||||
|
|
||||||
UHC("Ultra Hardcore", null,
|
UHC("Ultra Hardcore", null,
|
||||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.LOSSES, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||||
Material.GOLD_INGOT, 0, GameCategory.SURVIVAL, "Extra Class Skills"),
|
Material.GOLD_INGOT, 0, GameCategory.SURVIVAL, "Extra Class Skills"),
|
||||||
|
|
||||||
//Classics
|
//Classics
|
||||||
SMASH_MOBS("Super Smash Mobs", null,
|
SMASH_MOBS("Super Smash Mobs", null,
|
||||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.LOSSES, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||||
Material.SKULL_ITEM, 4, GameCategory.CLASSICS, "Sheep Kit"),
|
Material.SKULL_ITEM, 4, GameCategory.CLASSICS, "Sheep Kit"),
|
||||||
|
|
||||||
BLOCK_HUNT("Block Hunt", null,
|
BLOCK_HUNT("Block Hunt", null,
|
||||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.LOSSES, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||||
Material.GRASS, 0, GameCategory.CLASSICS, null),
|
Material.GRASS, 0, GameCategory.CLASSICS, null),
|
||||||
|
|
||||||
MASTER_BUILDERS("Master Builders", null,
|
MASTER_BUILDERS("Master Builders", null,
|
||||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED_GAME, StatDisplay.GEMS_EARNED },
|
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.GEMS_EARNED },
|
||||||
Material.WOOD, 0, GameCategory.CLASSICS, null),
|
Material.WOOD, 0, GameCategory.CLASSICS, null),
|
||||||
|
|
||||||
DRAW_MY_THING("Draw My Thing", null,
|
DRAW_MY_THING("Draw My Thing", null,
|
||||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED_GAME, StatDisplay.GEMS_EARNED },
|
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.GEMS_EARNED },
|
||||||
Material.BOOK_AND_QUILL, 0, GameCategory.CLASSICS, null),
|
Material.BOOK_AND_QUILL, 0, GameCategory.CLASSICS, null),
|
||||||
|
|
||||||
CASTLE_SIEGE("Castle Siege", null,
|
CASTLE_SIEGE("Castle Siege", null,
|
||||||
@ -70,23 +70,23 @@ public enum AchievementCategory
|
|||||||
|
|
||||||
//Arcade
|
//Arcade
|
||||||
DRAGONS("Dragons", null,
|
DRAGONS("Dragons", null,
|
||||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED_GAME, StatDisplay.GEMS_EARNED },
|
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.GEMS_EARNED },
|
||||||
Material.ENDER_STONE, 0, GameCategory.ARCADE, null),
|
Material.ENDER_STONE, 0, GameCategory.ARCADE, null),
|
||||||
|
|
||||||
DRAGON_ESCAPE("Dragon Escape", null,
|
DRAGON_ESCAPE("Dragon Escape", null,
|
||||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED_GAME, StatDisplay.GEMS_EARNED },
|
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.GEMS_EARNED },
|
||||||
Material.DRAGON_EGG, 0, GameCategory.ARCADE, null),
|
Material.DRAGON_EGG, 0, GameCategory.ARCADE, null),
|
||||||
|
|
||||||
SHEEP_QUEST("Sheep Quest", null,
|
SHEEP_QUEST("Sheep Quest", null,
|
||||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.LOSSES, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||||
Material.WOOL, 0, GameCategory.ARCADE, null),
|
Material.WOOL, 0, GameCategory.ARCADE, null),
|
||||||
|
|
||||||
SNEAKY_ASSASSINS("Sneaky Assassins", null,
|
SNEAKY_ASSASSINS("Sneaky Assassins", null,
|
||||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.LOSSES, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||||
Material.INK_SACK, 0, GameCategory.ARCADE, null),
|
Material.INK_SACK, 0, GameCategory.ARCADE, null),
|
||||||
|
|
||||||
ONE_IN_THE_QUIVER("One in the Quiver", null,
|
ONE_IN_THE_QUIVER("One in the Quiver", null,
|
||||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.LOSSES, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||||
Material.BOW, 0, GameCategory.ARCADE, null),
|
Material.BOW, 0, GameCategory.ARCADE, null),
|
||||||
|
|
||||||
SUPER_PAINTBALL("Super Paintball", null,
|
SUPER_PAINTBALL("Super Paintball", null,
|
||||||
@ -98,27 +98,27 @@ public enum AchievementCategory
|
|||||||
Material.HARD_CLAY, 14, GameCategory.ARCADE, null),
|
Material.HARD_CLAY, 14, GameCategory.ARCADE, null),
|
||||||
|
|
||||||
RUNNER("Runner", null,
|
RUNNER("Runner", null,
|
||||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.LOSSES, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||||
Material.LEATHER_BOOTS, 0, GameCategory.ARCADE, null),
|
Material.LEATHER_BOOTS, 0, GameCategory.ARCADE, null),
|
||||||
|
|
||||||
SPLEEF("Super Spleef", null,
|
SPLEEF("Super Spleef", null,
|
||||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.LOSSES, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||||
Material.IRON_SPADE, 0, GameCategory.ARCADE, null),
|
Material.IRON_SPADE, 0, GameCategory.ARCADE, null),
|
||||||
|
|
||||||
DEATH_TAG("Death Tag", null,
|
DEATH_TAG("Death Tag", null,
|
||||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.LOSSES, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||||
Material.SKULL_ITEM, 0, GameCategory.ARCADE, null),
|
Material.SKULL_ITEM, 0, GameCategory.ARCADE, null),
|
||||||
|
|
||||||
SNAKE("Snake", null,
|
SNAKE("Snake", null,
|
||||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.LOSSES, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||||
Material.WOOL, 4, GameCategory.ARCADE, null),
|
Material.WOOL, 4, GameCategory.ARCADE, null),
|
||||||
|
|
||||||
BACON_BRAWL("Bacon Brawl", null,
|
BACON_BRAWL("Bacon Brawl", null,
|
||||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.LOSSES, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||||
Material.PORK, 0, GameCategory.ARCADE, null),
|
Material.PORK, 0, GameCategory.ARCADE, null),
|
||||||
|
|
||||||
MICRO_BATTLE("Micro Battle", null,
|
MICRO_BATTLE("Micro Battle", null,
|
||||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.LOSSES, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||||
Material.LAVA, 0, GameCategory.ARCADE, null),
|
Material.LAVA, 0, GameCategory.ARCADE, null),
|
||||||
|
|
||||||
;
|
;
|
||||||
|
@ -4,7 +4,7 @@ package mineplex.core.achievement;
|
|||||||
* The purpose of extracting stats to this class is so we can display stats that are a combination
|
* The purpose of extracting stats to this class is so we can display stats that are a combination
|
||||||
* of different stat values. For example, since we don't have a specific stat for games played of a game,
|
* of different stat values. For example, since we don't have a specific stat for games played of a game,
|
||||||
* we can use this class to display the stat "Games Played" that sums up "Wins" and "Losses"
|
* we can use this class to display the stat "Games Played" that sums up "Wins" and "Losses"
|
||||||
* See: StatDisplay.GAMES_PLAYED_GAME
|
* See: StatDisplay.GAMES_PLAYED
|
||||||
*/
|
*/
|
||||||
public class StatDisplay
|
public class StatDisplay
|
||||||
{
|
{
|
||||||
@ -39,6 +39,6 @@ public class StatDisplay
|
|||||||
public static final StatDisplay DEATHS = new StatDisplay("Deaths");
|
public static final StatDisplay DEATHS = new StatDisplay("Deaths");
|
||||||
public static final StatDisplay GEMS_EARNED = new StatDisplay("Gems Earned", "GemsEarned");
|
public static final StatDisplay GEMS_EARNED = new StatDisplay("Gems Earned", "GemsEarned");
|
||||||
public static final StatDisplay TIME_IN_GAME = new StatDisplay("Time In Game", "TimeInGame");
|
public static final StatDisplay TIME_IN_GAME = new StatDisplay("Time In Game", "TimeInGame");
|
||||||
public static final StatDisplay GAMES_PLAYED_GAME = new StatDisplay("Games Played", "Wins", "Losses");
|
public static final StatDisplay GAMES_PLAYED = new StatDisplay("Games Played", "Wins", "Losses");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -417,7 +417,7 @@ public class CombatManager extends MiniPlugin
|
|||||||
CombatDeathEvent deathEvent = new CombatDeathEvent(event, Get(event.getEntity().getName()), log);
|
CombatDeathEvent deathEvent = new CombatDeathEvent(event, Get(event.getEntity().getName()), log);
|
||||||
UtilServer.getServer().getPluginManager().callEvent(deathEvent);
|
UtilServer.getServer().getPluginManager().callEvent(deathEvent);
|
||||||
|
|
||||||
|
//XXX Death MSG
|
||||||
if (deathEvent.GetBroadcastType() == DeathMessageType.Detailed || deathEvent.GetBroadcastType() == DeathMessageType.Absolute)
|
if (deathEvent.GetBroadcastType() == DeathMessageType.Detailed || deathEvent.GetBroadcastType() == DeathMessageType.Absolute)
|
||||||
{
|
{
|
||||||
//Display Simple
|
//Display Simple
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
package nautilus.game.arcade.game.games;
|
package nautilus.game.arcade.game.games;
|
||||||
|
|
||||||
|
import java.util.Comparator;
|
||||||
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
public class GameScore
|
public class GameScore
|
||||||
@ -17,4 +19,16 @@ public class GameScore
|
|||||||
{
|
{
|
||||||
return Player;
|
return Player;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Comparator<GameScore> SCORE_COMPARATOR = new Comparator<GameScore>()
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public int compare(GameScore o1, GameScore o2)
|
||||||
|
{
|
||||||
|
if (o1.Score == o2.Score)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return o1.Score > o2.Score ? 1 : -1;
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@ -31,6 +31,7 @@ import org.bukkit.event.entity.EntityExplodeEvent;
|
|||||||
import org.bukkit.event.entity.ItemSpawnEvent;
|
import org.bukkit.event.entity.ItemSpawnEvent;
|
||||||
import org.bukkit.event.inventory.PrepareItemCraftEvent;
|
import org.bukkit.event.inventory.PrepareItemCraftEvent;
|
||||||
import org.bukkit.event.player.PlayerBucketEmptyEvent;
|
import org.bukkit.event.player.PlayerBucketEmptyEvent;
|
||||||
|
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
|
||||||
import org.bukkit.event.player.PlayerInteractEvent;
|
import org.bukkit.event.player.PlayerInteractEvent;
|
||||||
import org.bukkit.event.player.PlayerPickupItemEvent;
|
import org.bukkit.event.player.PlayerPickupItemEvent;
|
||||||
import org.bukkit.inventory.CraftingInventory;
|
import org.bukkit.inventory.CraftingInventory;
|
||||||
@ -1626,4 +1627,20 @@ public class Bridge extends TeamGame implements OreObsfucation
|
|||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public double GetKillsGems(Player killer, Player killed, boolean assist)
|
||||||
|
{
|
||||||
|
if (assist)
|
||||||
|
return 3;
|
||||||
|
else
|
||||||
|
return 12;
|
||||||
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void toggleOre(PlayerCommandPreprocessEvent event)
|
||||||
|
{
|
||||||
|
if (event.getPlayer().isOp() && event.getMessage().contains("/oretoggle"))
|
||||||
|
_ore.ToggleVisibility();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -63,6 +63,7 @@ import org.bukkit.event.vehicle.VehicleCreateEvent;
|
|||||||
import org.bukkit.event.vehicle.VehicleDamageEvent;
|
import org.bukkit.event.vehicle.VehicleDamageEvent;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
|
import mineplex.core.common.Rank;
|
||||||
import mineplex.core.common.util.C;
|
import mineplex.core.common.util.C;
|
||||||
import mineplex.core.common.util.F;
|
import mineplex.core.common.util.F;
|
||||||
import mineplex.core.common.util.NautHashMap;
|
import mineplex.core.common.util.NautHashMap;
|
||||||
@ -91,6 +92,7 @@ import nautilus.game.arcade.GameType;
|
|||||||
import nautilus.game.arcade.events.GameStateChangeEvent;
|
import nautilus.game.arcade.events.GameStateChangeEvent;
|
||||||
import nautilus.game.arcade.events.PlayerPrepareTeleportEvent;
|
import nautilus.game.arcade.events.PlayerPrepareTeleportEvent;
|
||||||
import nautilus.game.arcade.game.SoloGame;
|
import nautilus.game.arcade.game.SoloGame;
|
||||||
|
import nautilus.game.arcade.game.Game.GameState;
|
||||||
import nautilus.game.arcade.game.games.build.gui.MobShop;
|
import nautilus.game.arcade.game.games.build.gui.MobShop;
|
||||||
import nautilus.game.arcade.game.games.build.gui.OptionsShop;
|
import nautilus.game.arcade.game.games.build.gui.OptionsShop;
|
||||||
import nautilus.game.arcade.game.games.build.kits.KitBuilder;
|
import nautilus.game.arcade.game.games.build.kits.KitBuilder;
|
||||||
@ -107,8 +109,8 @@ public class Build extends SoloGame
|
|||||||
private int _buildGameState = 0;
|
private int _buildGameState = 0;
|
||||||
private long _buildStateTime = 0;
|
private long _buildStateTime = 0;
|
||||||
private long _buildTime = 300000;
|
private long _buildTime = 300000;
|
||||||
private long _voteTime = 12000;
|
private long _voteTime = 14000;
|
||||||
private long _viewTime = 16000;
|
private long _viewTime = 18000;
|
||||||
private BuildData _viewData = null;
|
private BuildData _viewData = null;
|
||||||
|
|
||||||
private int _countdownTimerState = 0;
|
private int _countdownTimerState = 0;
|
||||||
@ -372,7 +374,27 @@ public class Build extends SoloGame
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!hasDecentVote)
|
String result = null;
|
||||||
|
|
||||||
|
//More than half think its abusive
|
||||||
|
if (GetPlayers(true).size() >= 4 && _viewData.AbuseVotes.size() >= (double)(GetPlayers(true).size() - 1) / 2d)
|
||||||
|
{
|
||||||
|
result = C.cWhite + "Inappropriate Build";
|
||||||
|
_viewData.setAbusive();
|
||||||
|
|
||||||
|
//Record Abuse
|
||||||
|
AddStat(_viewData.Player, "Build Draw Abuse", 1, false, true);
|
||||||
|
|
||||||
|
//Announce
|
||||||
|
Announce(C.cWhite + C.Bold + _viewData.Player.getName() + " has been reported for an inappropriate build.", false);
|
||||||
|
_viewData.Spawn.getWorld().playSound(_viewData.Spawn, Sound.ENDERDRAGON_GROWL, 10f, 1f);
|
||||||
|
|
||||||
|
UtilPlayer.message(_viewData.Player, C.cWhite + C.Bold + "Inappropriate Builds can result in a Master Buildres ban.");
|
||||||
|
|
||||||
|
//Return to Hub
|
||||||
|
getArcadeManager().GetPortal().sendPlayerToServer(_viewData.Player, "Lobby");
|
||||||
|
}
|
||||||
|
else if (!hasDecentVote)
|
||||||
{
|
{
|
||||||
Manager.GetExplosion().BlockExplosion(_viewData.Blocks, _viewData.Spawn, false);
|
Manager.GetExplosion().BlockExplosion(_viewData.Blocks, _viewData.Spawn, false);
|
||||||
|
|
||||||
@ -380,10 +402,12 @@ public class Build extends SoloGame
|
|||||||
_viewData.Spawn.getWorld().playSound(_viewData.Spawn, Sound.EXPLODE, 3f, 1f);
|
_viewData.Spawn.getWorld().playSound(_viewData.Spawn, Sound.EXPLODE, 3f, 1f);
|
||||||
UtilParticle.PlayParticle(ParticleType.HUGE_EXPLOSION, _viewData.Spawn, 4f, 4f, 4f, 0, 10,
|
UtilParticle.PlayParticle(ParticleType.HUGE_EXPLOSION, _viewData.Spawn, 4f, 4f, 4f, 0, 10,
|
||||||
ViewDist.MAX, UtilServer.getPlayers());
|
ViewDist.MAX, UtilServer.getPlayers());
|
||||||
|
|
||||||
|
result = C.cRed + "Failure";
|
||||||
}
|
}
|
||||||
|
|
||||||
//Announce Builder
|
//Announce Builder
|
||||||
UtilTextMiddle.display(hasDecentVote ? null : C.cRed + "Failure", "Built by: " + C.Bold + _viewData.Player.getName(), 0, 80, 5);
|
UtilTextMiddle.display(result, "Built by: " + C.Bold + _viewData.Player.getName(), 0, 80, 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
_viewData.Judged = true;
|
_viewData.Judged = true;
|
||||||
@ -431,6 +455,8 @@ public class Build extends SoloGame
|
|||||||
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(160, (byte)3, 1, C.cAqua + C.Bold + "Amazing"));
|
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(160, (byte)3, 1, C.cAqua + C.Bold + "Amazing"));
|
||||||
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(160, (byte)10, 1, C.cPurple + C.Bold + "WOW! EVERYTHING IS AWESOME!"));
|
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(160, (byte)10, 1, C.cPurple + C.Bold + "WOW! EVERYTHING IS AWESOME!"));
|
||||||
|
|
||||||
|
player.getInventory().setItem(8, ItemStackFactory.Instance.CreateStack(Material.BOOK, (byte)0, 1, C.cWhite + C.Bold + "Report Inappropriate Build"));
|
||||||
|
|
||||||
UtilTextMiddle.display(null, C.cYellow + "Click to Vote", 0, 60, 5, player);
|
UtilTextMiddle.display(null, C.cYellow + "Click to Vote", 0, 60, 5, player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -711,9 +737,6 @@ public class Build extends SoloGame
|
|||||||
if (!IsAlive(event.getPlayer()))
|
if (!IsAlive(event.getPlayer()))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!UtilGear.isMat(event.getPlayer().getItemInHand(), Material.STAINED_GLASS_PANE))
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (!UtilEvent.isAction(event, ActionType.R) && !UtilEvent.isAction(event, ActionType.L))
|
if (!UtilEvent.isAction(event, ActionType.R) && !UtilEvent.isAction(event, ActionType.L))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -722,9 +745,22 @@ public class Build extends SoloGame
|
|||||||
UtilPlayer.message(event.getPlayer(), F.main("Game", "You cannot vote on your own creation!"));
|
UtilPlayer.message(event.getPlayer(), F.main("Game", "You cannot vote on your own creation!"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!UtilTime.elapsed(_buildStateTime, 1500))
|
if (!UtilTime.elapsed(_buildStateTime, 1500))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
//Vote Abuse
|
||||||
|
if (UtilGear.isMat(event.getPlayer().getItemInHand(), Material.BOOK))
|
||||||
|
{
|
||||||
|
_viewData.addAbuseVote(event.getPlayer());
|
||||||
|
UtilTextMiddle.display(null, C.cWhite + C.Bold + "Inappropriate Build", 0, 40, 5, event.getPlayer());
|
||||||
|
UtilPlayer.message(event.getPlayer(), C.cWhite + C.Bold + "You reported " + _viewData.Player.getName() + " for inappropriate build!");
|
||||||
|
UtilPlayer.message(event.getPlayer(), C.cWhite + C.Bold + "Thanks for helping us keep Master Builders clean!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!UtilGear.isMat(event.getPlayer().getItemInHand(), Material.STAINED_GLASS_PANE))
|
||||||
|
return;
|
||||||
|
|
||||||
if (!_votes.containsKey(event.getPlayer()))
|
if (!_votes.containsKey(event.getPlayer()))
|
||||||
_votes.put(event.getPlayer(), new NautHashMap<Player, Integer>());
|
_votes.put(event.getPlayer(), new NautHashMap<Player, Integer>());
|
||||||
@ -1179,12 +1215,12 @@ public class Build extends SoloGame
|
|||||||
if (_buildGameState == 0)
|
if (_buildGameState == 0)
|
||||||
{
|
{
|
||||||
Scoreboard.Write(C.cYellow + C.Bold + "Build Time");
|
Scoreboard.Write(C.cYellow + C.Bold + "Build Time");
|
||||||
Scoreboard.Write(UtilTime.MakeStr(Math.max(0, _buildTime - (System.currentTimeMillis() - this.GetStateTime())), 1));
|
Scoreboard.Write(UtilTime.MakeStr(Math.max(0, _buildTime - (System.currentTimeMillis() - this.GetStateTime())), 0));
|
||||||
}
|
}
|
||||||
else if (_buildGameState == 2)
|
else if (_buildGameState == 2)
|
||||||
{
|
{
|
||||||
Scoreboard.Write(C.cYellow + C.Bold + "Vote Time");
|
Scoreboard.Write(C.cYellow + C.Bold + "Vote Time");
|
||||||
Scoreboard.Write(UtilTime.MakeStr(Math.max(0, _voteTime - (System.currentTimeMillis() - _buildStateTime)), 1));
|
Scoreboard.Write(UtilTime.MakeStr(Math.max(0, _voteTime - (System.currentTimeMillis() - _buildStateTime)), 0));
|
||||||
|
|
||||||
// if (_viewData != null)
|
// if (_viewData != null)
|
||||||
// {
|
// {
|
||||||
@ -1441,4 +1477,22 @@ public class Build extends SoloGame
|
|||||||
|
|
||||||
return GetTeamList().get(0).GetSpawn();
|
return GetTeamList().get(0).GetSpawn();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void kickAbusers(UpdateEvent event)
|
||||||
|
{
|
||||||
|
if (event.getType() != UpdateType.SLOW)
|
||||||
|
return;
|
||||||
|
|
||||||
|
for (Player player : UtilServer.getPlayers())
|
||||||
|
{
|
||||||
|
if (Manager.GetStatsManager().Get(player).getStat("Global.Build Draw Abuse") >= 3)
|
||||||
|
{
|
||||||
|
UtilPlayer.message(player, C.cRed + C.Bold + "You have been flagged as an Inappropriate Builder!");
|
||||||
|
UtilPlayer.message(player, C.cRed + C.Bold + "As a result, you are banned from this game.");
|
||||||
|
player.playSound(player.getLocation(), Sound.ENDERDRAGON_GROWL, 10f, 1f);
|
||||||
|
getArcadeManager().GetPortal().sendPlayerToServer(player, "Lobby");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,10 @@ public class BuildData
|
|||||||
public NautHashMap<Location, ParticleType> Particles = new NautHashMap<Location, ParticleType>();
|
public NautHashMap<Location, ParticleType> Particles = new NautHashMap<Location, ParticleType>();
|
||||||
|
|
||||||
public int Time = 6000;
|
public int Time = 6000;
|
||||||
|
|
||||||
|
public HashSet<String> AbuseVotes = new HashSet<String>();
|
||||||
|
public boolean IsAbusive = false;
|
||||||
|
|
||||||
// This is used to show the player to use their inventory to grab items
|
// This is used to show the player to use their inventory to grab items
|
||||||
public boolean ClickedInventory = false;
|
public boolean ClickedInventory = false;
|
||||||
|
|
||||||
@ -307,6 +310,9 @@ public class BuildData
|
|||||||
|
|
||||||
public void addPoints(double d)
|
public void addPoints(double d)
|
||||||
{
|
{
|
||||||
|
if (IsAbusive)
|
||||||
|
return;
|
||||||
|
|
||||||
_totalPoints += d;
|
_totalPoints += d;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -319,4 +325,14 @@ public class BuildData
|
|||||||
{
|
{
|
||||||
_totalPoints = 0;
|
_totalPoints = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void addAbuseVote(Player voter)
|
||||||
|
{
|
||||||
|
AbuseVotes.add(voter.getName());
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAbusive()
|
||||||
|
{
|
||||||
|
IsAbusive = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -389,12 +389,7 @@ public class DeathTag extends SoloGame
|
|||||||
{
|
{
|
||||||
if (GetState().ordinal() >= GameState.End.ordinal())
|
if (GetState().ordinal() >= GameState.End.ordinal())
|
||||||
{
|
{
|
||||||
List<Player> places = _chasers.GetPlayers(true);
|
return _chasers.GetPlayers(true);
|
||||||
|
|
||||||
if (places.isEmpty() || !places.get(0).isOnline())
|
|
||||||
return Arrays.asList();
|
|
||||||
else
|
|
||||||
return Arrays.asList(places.get(0));
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return null;
|
return null;
|
||||||
|
@ -3,6 +3,7 @@ package nautilus.game.arcade.game.games.draw;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -648,20 +649,9 @@ public class Draw extends SoloGame
|
|||||||
_ranks.add(new GameScore(player, amount));
|
_ranks.add(new GameScore(player, amount));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SortScores()
|
private void SortScores()
|
||||||
{
|
{
|
||||||
for (int i=0 ; i<_ranks.size() ; i++)
|
Collections.sort(_ranks, GameScore.SCORE_COMPARATOR);
|
||||||
{
|
|
||||||
for (int j=_ranks.size()-1 ; j>0 ; j--)
|
|
||||||
{
|
|
||||||
if (_ranks.get(j).Score > _ranks.get(j-1).Score)
|
|
||||||
{
|
|
||||||
GameScore temp = _ranks.get(j);
|
|
||||||
_ranks.set(j, _ranks.get(j-1));
|
|
||||||
_ranks.set(j-1, temp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -688,14 +678,22 @@ public class Draw extends SoloGame
|
|||||||
@Override
|
@Override
|
||||||
public List<Player> getLosers()
|
public List<Player> getLosers()
|
||||||
{
|
{
|
||||||
List<Player> losers = getWinners();
|
if (GetState().ordinal() >= GameState.End.ordinal())
|
||||||
|
{
|
||||||
|
SortScores();
|
||||||
|
|
||||||
if (losers == null)
|
//Set Places
|
||||||
|
ArrayList<Player> places = new ArrayList<Player>();
|
||||||
|
for (int i = 0; i < _ranks.size(); i++)
|
||||||
|
places.add(i, _ranks.get(i).Player);
|
||||||
|
|
||||||
|
if (places.size() > 0)
|
||||||
|
places.remove(0);
|
||||||
|
|
||||||
|
return places;
|
||||||
|
}
|
||||||
|
else
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
losers.remove(0);
|
|
||||||
|
|
||||||
return losers;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -11,6 +11,7 @@ import org.bukkit.event.EventHandler;
|
|||||||
import org.bukkit.event.block.BlockBreakEvent;
|
import org.bukkit.event.block.BlockBreakEvent;
|
||||||
import org.bukkit.event.block.BlockPlaceEvent;
|
import org.bukkit.event.block.BlockPlaceEvent;
|
||||||
|
|
||||||
|
import mineplex.core.common.util.MapUtil;
|
||||||
import mineplex.core.common.util.UtilMath;
|
import mineplex.core.common.util.UtilMath;
|
||||||
import mineplex.core.common.util.UtilTime;
|
import mineplex.core.common.util.UtilTime;
|
||||||
import mineplex.core.updater.UpdateType;
|
import mineplex.core.updater.UpdateType;
|
||||||
@ -178,7 +179,7 @@ public class Micro extends TeamGame
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
for (Block block : _glass)
|
for (Block block : _glass)
|
||||||
block.setType(Material.AIR);
|
MapUtil.QuickChangeBlockAt(block.getLocation(), Material.AIR);
|
||||||
|
|
||||||
_glass.clear();
|
_glass.clear();
|
||||||
}
|
}
|
||||||
|
@ -245,8 +245,8 @@ public class MineStrike extends TeamGame
|
|||||||
C.cAqua + "SWAT" + C.cWhite + " Defend the Bomb Sites",
|
C.cAqua + "SWAT" + C.cWhite + " Defend the Bomb Sites",
|
||||||
C.cAqua + "SWAT" + C.cWhite + " Kill the Terrorists",
|
C.cAqua + "SWAT" + C.cWhite + " Kill the Terrorists",
|
||||||
" ",
|
" ",
|
||||||
C.cRed + "Al'Jaha" + C.cWhite + " Plant the Bomb at Bomb Site",
|
C.cRed + "Bombers" + C.cWhite + " Plant the Bomb at Bomb Site",
|
||||||
C.cRed + "Al'Jaha" + C.cWhite + " Kill the Counter-Terrorists",
|
C.cRed + "Bombers" + C.cWhite + " Kill the Counter-Terrorists",
|
||||||
});
|
});
|
||||||
|
|
||||||
_shopManager = new ShopManager(this);
|
_shopManager = new ShopManager(this);
|
||||||
@ -313,7 +313,7 @@ public class MineStrike extends TeamGame
|
|||||||
this.GetTeamList().get(0).SetName("SWAT");
|
this.GetTeamList().get(0).SetName("SWAT");
|
||||||
|
|
||||||
this.GetTeamList().get(1).SetColor(ChatColor.RED);
|
this.GetTeamList().get(1).SetColor(ChatColor.RED);
|
||||||
this.GetTeamList().get(1).SetName("Al'Jaha");
|
this.GetTeamList().get(1).SetName("Bombers");
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
|
@ -1026,7 +1026,10 @@ public class SurvivalGames extends SoloGame
|
|||||||
@Override
|
@Override
|
||||||
public double GetKillsGems(Player killer, Player killed, boolean assist)
|
public double GetKillsGems(Player killer, Player killed, boolean assist)
|
||||||
{
|
{
|
||||||
return 4;
|
if (assist)
|
||||||
|
return 3;
|
||||||
|
else
|
||||||
|
return 12;
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
@ -2261,5 +2264,4 @@ public class SurvivalGames extends SoloGame
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -115,13 +115,11 @@ public class SpectatorPage extends ShopPageBase<CompassAddon, SpectatorShop>
|
|||||||
|
|
||||||
setItem(woolSlot, getTeamItem(team, teamPlayers.size()));
|
setItem(woolSlot, getTeamItem(team, teamPlayers.size()));
|
||||||
|
|
||||||
int startPlayerIndex = row * 8;
|
int playerIndex = row * 8;
|
||||||
int count = 0;
|
for (int i = 0; i < 8 && playerIndex < teamPlayers.size(); i++, playerIndex++)
|
||||||
for (int playerIndex = startPlayerIndex; playerIndex < teamPlayers.size() && count < 8; playerIndex++)
|
|
||||||
{
|
{
|
||||||
count++;
|
|
||||||
Player other = teamPlayers.get(playerIndex);
|
Player other = teamPlayers.get(playerIndex);
|
||||||
int slot = woolSlot + 1 + playerIndex;
|
int slot = woolSlot + 1 + i;
|
||||||
|
|
||||||
// TODO Need to handle too many players in a better way
|
// TODO Need to handle too many players in a better way
|
||||||
if (slot >= getSize())
|
if (slot >= getSize())
|
||||||
|
@ -98,7 +98,7 @@ public class PerkIronHook extends Perk implements IThrown
|
|||||||
|
|
||||||
//Damage Event
|
//Damage Event
|
||||||
Manager.GetDamage().NewDamageEvent(target, player, null,
|
Manager.GetDamage().NewDamageEvent(target, player, null,
|
||||||
DamageCause.CUSTOM, velocity * 8, false, true, false,
|
DamageCause.CUSTOM, velocity * 4, false, true, false,
|
||||||
player.getName(), GetName());
|
player.getName(), GetName());
|
||||||
|
|
||||||
//Inform
|
//Inform
|
||||||
|
@ -73,7 +73,7 @@ public class IdleManager implements Listener
|
|||||||
|
|
||||||
if (_yaw.get(player) == player.getLocation().getYaw())
|
if (_yaw.get(player) == player.getLocation().getYaw())
|
||||||
{
|
{
|
||||||
if (UtilTime.elapsed(_idle.get(player), 120000))
|
if (UtilTime.elapsed(_idle.get(player), getArcadeManager().GetGame().IsLive() ? 240000 : 120000))
|
||||||
{
|
{
|
||||||
if (getArcadeManager().GetGame().GetState() != GameState.Recruit && !getArcadeManager().GetGame().IsAlive(player))
|
if (getArcadeManager().GetGame().GetState() != GameState.Recruit && !getArcadeManager().GetGame().IsAlive(player))
|
||||||
continue;
|
continue;
|
||||||
|
@ -13,11 +13,11 @@ public class OreHider
|
|||||||
{
|
{
|
||||||
private NautHashMap<Location, Material> _hidden = new NautHashMap<Location, Material>();
|
private NautHashMap<Location, Material> _hidden = new NautHashMap<Location, Material>();
|
||||||
private boolean _visible = false;
|
private boolean _visible = false;
|
||||||
|
|
||||||
public void AddOre(Location loc, Material type)
|
public void AddOre(Location loc, Material type)
|
||||||
{
|
{
|
||||||
boolean visible = false;
|
boolean visible = false;
|
||||||
|
|
||||||
for (Block block : UtilBlock.getSurrounding(loc.getBlock(), false))
|
for (Block block : UtilBlock.getSurrounding(loc.getBlock(), false))
|
||||||
{
|
{
|
||||||
if (!block.getType().isOccluding())
|
if (!block.getType().isOccluding())
|
||||||
@ -26,7 +26,7 @@ public class OreHider
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (visible)
|
if (visible)
|
||||||
{
|
{
|
||||||
loc.getBlock().setType(type);
|
loc.getBlock().setType(type);
|
||||||
@ -36,7 +36,7 @@ public class OreHider
|
|||||||
_hidden.put(loc.getBlock().getLocation(), type);
|
_hidden.put(loc.getBlock().getLocation(), type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void BlockBreak(BlockBreakEvent event)
|
public void BlockBreak(BlockBreakEvent event)
|
||||||
{
|
{
|
||||||
for (Block block : UtilBlock.getSurrounding(event.getBlock(), false))
|
for (Block block : UtilBlock.getSurrounding(event.getBlock(), false))
|
||||||
@ -47,7 +47,7 @@ public class OreHider
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Explosion(ExplosionEvent event)
|
public void Explosion(ExplosionEvent event)
|
||||||
{
|
{
|
||||||
for (Block cur : event.GetBlocks())
|
for (Block cur : event.GetBlocks())
|
||||||
@ -61,7 +61,7 @@ public class OreHider
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ToggleVisibility()
|
public void ToggleVisibility()
|
||||||
{
|
{
|
||||||
if (!_visible)
|
if (!_visible)
|
||||||
@ -78,7 +78,7 @@ public class OreHider
|
|||||||
loc.getBlock().setType(Material.STONE);
|
loc.getBlock().setType(Material.STONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_visible = !_visible;
|
_visible = !_visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user