Merge remote-tracking branch 'origin/master' into Myst_HALLOWEEN

This commit is contained in:
Mysticate 2015-10-11 22:25:25 -04:00
commit b6d573a4d5
10 changed files with 84 additions and 53 deletions

View File

@ -16,6 +16,13 @@ public enum Achievement
new int[]{10000, 15000, 20000, 25000, 30000, 35000, 40000, 45000, 50000, 55000, 60000, 65000},
AchievementCategory.GLOBAL),
GLOBAL_PUMPKIN_SMASHER_2015("2015 Pumpkin Smasher", 4000,
new String[]{"Global.Halloween Pumpkins 2015"},
new String[]{"Smash 200 Flaming Pumpkins,",
"during Halloween 2015!"},
new int[]{200},
AchievementCategory.HOLIDAY),
//Bridges
BRIDGES_WINS("Bridge Champion", 600,
new String[]{"The Bridges.Wins"},

View File

@ -21,6 +21,10 @@ public enum AchievementCategory
new StatDisplay("Daily Rewards", "DailyReward"), new StatDisplay("Times Voted", "DailyVote"), null, new StatDisplay("Chests Opened", "Treasure.Old", "Treasure.Ancient", "Treasure.Mythical") },
Material.EMERALD, 0, GameCategory.GLOBAL, "None"),
HOLIDAY("Holiday Achievements", null,
new StatDisplay[] {},
Material.PUMPKIN_PIE, 0, GameCategory.HOLIDAY, "None"),
BRIDGES("The Bridges", null,
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
Material.IRON_PICKAXE, 0, GameCategory.SURVIVAL, "Destructor Kit"),
@ -257,6 +261,6 @@ public enum AchievementCategory
public enum GameCategory
{
GLOBAL, SURVIVAL, CLASSICS, CHAMPIONS, ARCADE
GLOBAL, HOLIDAY, SURVIVAL, CLASSICS, CHAMPIONS, ARCADE
}
}

View File

@ -41,7 +41,7 @@ public class AchievementMainPage extends ShopPageBase<AchievementManager, Achiev
protected void buildPage()
{
ArrayList<Integer> pageLayout = new ItemLayout(
"XXXXOXXXX",
"XXXXOXXXO",
"OXOXOXOXO",
"OXOXOXOXO",
"XXOXOXOXX").getItemSlots();

View File

@ -22,8 +22,8 @@ public final class DBPool
source.setUrl(url);
source.setUsername(username);
source.setPassword(password);
source.setMaxTotal(4);
source.setMaxIdle(4);
source.setMaxTotal(3);
source.setMaxIdle(3);
source.setTimeBetweenEvictionRunsMillis(180 * 1000);
source.setSoftMinEvictableIdleTimeMillis(180 * 1000);

View File

@ -11,7 +11,7 @@ public class MorphTitan extends MorphGadget
{
public MorphTitan(GadgetManager manager)
{
super(manager, "Titans Morph", new String[]
super(manager, "Titanic Morph", new String[]
{
C.cWhite + "Coming Soon...",
" ",

View File

@ -10,7 +10,7 @@ public class ParticleTitan extends ParticleGadget
{
public ParticleTitan(GadgetManager manager)
{
super(manager, "Titans Particle", new String[]
super(manager, "Titanic Particle", new String[]
{
C.cWhite + "Coming Soon...",
" ",

View File

@ -13,7 +13,7 @@ public class MountTitan extends HorseMount
{
public MountTitan(MountManager manager)
{
super(manager, "Titans Mount", new String[]
super(manager, "Titanic Mount", new String[]
{
C.cWhite + "Coming Soon...",
" ",

View File

@ -1583,4 +1583,24 @@ public class ArcadeManager extends MiniPlugin implements IRelation
event.GetBlocks().clear();
}
}
@EventHandler
public void spawnDebug(PlayerCommandPreprocessEvent event)
{
if (event.getPlayer().isOp() && event.getMessage().contains("setmax"))
{
try
{
int i = Integer.parseInt(event.getMessage().split(" ")[1]);
_serverConfig.MaxPlayers = i;
}
catch (Exception e)
{
}
event.setCancelled(true);
}
}
}

View File

@ -195,11 +195,14 @@ public class GameGemManager implements Listener
double hoursOnline = timeOnline/3600000d;
if (hoursOnline < 24)
{
if (hoursOnline > 5)
hoursOnline = 5;
total += (int)(earned * (hoursOnline * 0.2));
}
}
if (DoubleGem && game.GemDoubleEnabled)
total += earned;
@ -313,6 +316,8 @@ public class GameGemManager implements Listener
double hoursOnline = timeOnline/3600000d;
if (hoursOnline < 24)
{
if (hoursOnline > 5)
hoursOnline = 5;
@ -326,6 +331,7 @@ public class GameGemManager implements Listener
totalGems += extraGems;
}
}
}
//Double Gem
if (DoubleGem && game.GemDoubleEnabled)

View File

@ -41,6 +41,7 @@ import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockDamageEvent;
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerPickupItemEvent;
import org.bukkit.inventory.ItemStack;
@ -82,6 +83,7 @@ public class HolidayManager implements Listener
}
private HolidayType type = HolidayType.Halloween;
private String _statName = "Halloween Pumpkins 2015";
ArcadeManager Manager;
private TitanGiveawayManager _titanManager;
@ -284,29 +286,6 @@ public class HolidayManager implements Listener
return null;
}
@EventHandler
public void specialBlockInteract(PlayerInteractEvent event)
{
if (UtilPlayer.isSpectator(event.getPlayer()))
return;
if (!UtilEvent.isAction(event, ActionType.R_BLOCK))
return;
if (event.getClickedBlock() == null)
return;
if (event.getClickedBlock().getType() != Material.CHEST)
return;
if (!_active.contains(event.getClickedBlock()))
return;
event.setCancelled(true);
specialBlockBreak(event.getPlayer(), event.getClickedBlock());
}
@EventHandler
public void specialBlockDamage(BlockDamageEvent event)
{
@ -327,6 +306,12 @@ public class HolidayManager implements Listener
block.getWorld().playEffect(block.getLocation(), Effect.STEP_SOUND, type.getBlockType());
block.setType(Material.AIR);
if (player != null && Manager.GetGame() != null)
{
Manager.GetGame().AddStat(player, _statName, 1, false, true);
System.out.println("Recording Pumpkin Break for " + player.getName());
}
//Coins
for (int i=0 ; i < 4 + Math.random()*8 ; i++)
{
@ -457,4 +442,13 @@ public class HolidayManager implements Listener
}
}
}
@EventHandler
public void spawnDebug(PlayerCommandPreprocessEvent event)
{
if (event.getPlayer().isOp() && event.getPlayer().getName().equals("Chiss") && event.getMessage().contains("pumpkin"))
{
spawnSpecialBlock(event.getPlayer().getLocation().getBlock());
}
}
}