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}, new int[]{10000, 15000, 20000, 25000, 30000, 35000, 40000, 45000, 50000, 55000, 60000, 65000},
AchievementCategory.GLOBAL), 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
BRIDGES_WINS("Bridge Champion", 600, BRIDGES_WINS("Bridge Champion", 600,
new String[]{"The Bridges.Wins"}, 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") }, 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"), Material.EMERALD, 0, GameCategory.GLOBAL, "None"),
HOLIDAY("Holiday Achievements", null,
new StatDisplay[] {},
Material.PUMPKIN_PIE, 0, GameCategory.HOLIDAY, "None"),
BRIDGES("The Bridges", null, BRIDGES("The Bridges", null,
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, 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"),
@ -257,6 +261,6 @@ public enum AchievementCategory
public enum GameCategory 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() protected void buildPage()
{ {
ArrayList<Integer> pageLayout = new ItemLayout( ArrayList<Integer> pageLayout = new ItemLayout(
"XXXXOXXXX", "XXXXOXXXO",
"OXOXOXOXO", "OXOXOXOXO",
"OXOXOXOXO", "OXOXOXOXO",
"XXOXOXOXX").getItemSlots(); "XXOXOXOXX").getItemSlots();

View File

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

View File

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

View File

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

View File

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

View File

@ -1583,4 +1583,24 @@ public class ArcadeManager extends MiniPlugin implements IRelation
event.GetBlocks().clear(); 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,10 +195,13 @@ public class GameGemManager implements Listener
double hoursOnline = timeOnline/3600000d; double hoursOnline = timeOnline/3600000d;
if (hoursOnline > 5) if (hoursOnline < 24)
hoursOnline = 5; {
if (hoursOnline > 5)
hoursOnline = 5;
total += (int)(earned * (hoursOnline * 0.2)); total += (int)(earned * (hoursOnline * 0.2));
}
} }
if (DoubleGem && game.GemDoubleEnabled) if (DoubleGem && game.GemDoubleEnabled)
@ -313,17 +316,20 @@ public class GameGemManager implements Listener
double hoursOnline = timeOnline/3600000d; double hoursOnline = timeOnline/3600000d;
if (hoursOnline > 5) if (hoursOnline < 24)
hoursOnline = 5;
int extraGems = (int)(earnedGems * (hoursOnline * 0.2));
if (extraGems > 0)
{ {
UtilPlayer.message(player, F.elem(C.cGreen + "+" + extraGems + " Gems") + " for " + if (hoursOnline > 5)
F.elem("Online for " + UtilTime.MakeStr(timeOnline) + C.cGreen + " +" + (int)(hoursOnline * 20) + "%")); hoursOnline = 5;
totalGems += extraGems; int extraGems = (int)(earnedGems * (hoursOnline * 0.2));
if (extraGems > 0)
{
UtilPlayer.message(player, F.elem(C.cGreen + "+" + extraGems + " Gems") + " for " +
F.elem("Online for " + UtilTime.MakeStr(timeOnline) + C.cGreen + " +" + (int)(hoursOnline * 20) + "%"));
totalGems += extraGems;
}
} }
} }

View File

@ -41,6 +41,7 @@ import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener; import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockDamageEvent; import org.bukkit.event.block.BlockDamageEvent;
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.ItemStack; import org.bukkit.inventory.ItemStack;
@ -82,6 +83,7 @@ public class HolidayManager implements Listener
} }
private HolidayType type = HolidayType.Halloween; private HolidayType type = HolidayType.Halloween;
private String _statName = "Halloween Pumpkins 2015";
ArcadeManager Manager; ArcadeManager Manager;
private TitanGiveawayManager _titanManager; private TitanGiveawayManager _titanManager;
@ -282,30 +284,7 @@ public class HolidayManager implements Listener
} }
return null; 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 @EventHandler
public void specialBlockDamage(BlockDamageEvent event) 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.getWorld().playEffect(block.getLocation(), Effect.STEP_SOUND, type.getBlockType());
block.setType(Material.AIR); 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 //Coins
for (int i=0 ; i < 4 + Math.random()*8 ; i++) 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());
}
}
} }