Fix bug where Fissure skill travelled through doorways as well as increase cooldown. Fix bug where Cobwebs could be thrown inside spawn safe zones and increase cooldown. Modify StaticLazer skill's range, damage, cooldown, and damage radius for balance purposes. Remove the ability to craft TNT Minecarts and Jukeboxes. Disable fishing ability in Clans. Add the requirement that players must crouch while clicking on furnaces to be able to smelt. Fix bug where Axes weren't considered a weapon in the context of player murders.
This commit is contained in:
parent
eba98e7e7c
commit
15b51fe575
@ -99,13 +99,11 @@ public class UtilBlock
|
|||||||
blockPassSet.add((byte)55);
|
blockPassSet.add((byte)55);
|
||||||
blockPassSet.add((byte)59);
|
blockPassSet.add((byte)59);
|
||||||
blockPassSet.add((byte)63);
|
blockPassSet.add((byte)63);
|
||||||
blockPassSet.add((byte)64);
|
|
||||||
blockPassSet.add((byte)65);
|
blockPassSet.add((byte)65);
|
||||||
blockPassSet.add((byte)66);
|
blockPassSet.add((byte)66);
|
||||||
blockPassSet.add((byte)68);
|
blockPassSet.add((byte)68);
|
||||||
blockPassSet.add((byte)69);
|
blockPassSet.add((byte)69);
|
||||||
blockPassSet.add((byte)70);
|
blockPassSet.add((byte)70);
|
||||||
blockPassSet.add((byte)71);
|
|
||||||
blockPassSet.add((byte)72);
|
blockPassSet.add((byte)72);
|
||||||
blockPassSet.add((byte)75);
|
blockPassSet.add((byte)75);
|
||||||
blockPassSet.add((byte)76);
|
blockPassSet.add((byte)76);
|
||||||
|
@ -27,7 +27,8 @@ import mineplex.minecraft.game.core.combat.event.CombatDeathEvent;
|
|||||||
|
|
||||||
public class MurderManager extends MiniClientPlugin<WeaklingStatus>
|
public class MurderManager extends MiniClientPlugin<WeaklingStatus>
|
||||||
{
|
{
|
||||||
private final Material[] weapons = { Material.WOOD_SWORD, Material.STONE_SWORD, Material.IRON_SWORD, Material.DIAMOND_SWORD };
|
private final Material[] weapons = { Material.WOOD_SWORD, Material.STONE_SWORD, Material.IRON_SWORD, Material.DIAMOND_SWORD,
|
||||||
|
Material.WOOD_AXE, Material.STONE_AXE, Material.IRON_AXE, Material.DIAMOND_AXE };
|
||||||
private final Material[] armour = { Material.LEATHER_HELMET, Material.LEATHER_CHESTPLATE, Material.LEATHER_LEGGINGS, Material.LEATHER_BOOTS,
|
private final Material[] armour = { Material.LEATHER_HELMET, Material.LEATHER_CHESTPLATE, Material.LEATHER_LEGGINGS, Material.LEATHER_BOOTS,
|
||||||
Material.IRON_HELMET, Material.IRON_CHESTPLATE, Material.IRON_LEGGINGS, Material.IRON_BOOTS,
|
Material.IRON_HELMET, Material.IRON_CHESTPLATE, Material.IRON_LEGGINGS, Material.IRON_BOOTS,
|
||||||
Material.GOLD_HELMET, Material.GOLD_CHESTPLATE, Material.GOLD_LEGGINGS, Material.GOLD_BOOTS,
|
Material.GOLD_HELMET, Material.GOLD_CHESTPLATE, Material.GOLD_LEGGINGS, Material.GOLD_BOOTS,
|
||||||
|
@ -0,0 +1,37 @@
|
|||||||
|
package mineplex.game.clans.gameplay;
|
||||||
|
|
||||||
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.event.EventHandler;
|
||||||
|
import org.bukkit.event.Listener;
|
||||||
|
import org.bukkit.event.inventory.CraftItemEvent;
|
||||||
|
import org.bukkit.inventory.Recipe;
|
||||||
|
|
||||||
|
public class CustomRecipes implements Listener
|
||||||
|
{
|
||||||
|
|
||||||
|
private static final Material[] DISABLED_RECIPES = { Material.EXPLOSIVE_MINECART, Material.JUKEBOX };
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void onPlayerCraftItem(CraftItemEvent event)
|
||||||
|
{
|
||||||
|
if (isDisabledRecipe(event.getRecipe()))
|
||||||
|
{
|
||||||
|
event.setCancelled(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isDisabledRecipe(Recipe recipe)
|
||||||
|
{
|
||||||
|
Material itemType = recipe.getResult().getType();
|
||||||
|
|
||||||
|
for (Material disabledRecipe : DISABLED_RECIPES)
|
||||||
|
{
|
||||||
|
if (disabledRecipe == itemType)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
@ -28,6 +28,7 @@ import mineplex.game.clans.clans.ClansManager;
|
|||||||
import mineplex.game.clans.items.generation.Weight;
|
import mineplex.game.clans.items.generation.Weight;
|
||||||
import mineplex.game.clans.items.generation.WeightSet;
|
import mineplex.game.clans.items.generation.WeightSet;
|
||||||
|
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.Effect;
|
import org.bukkit.Effect;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
@ -54,6 +55,7 @@ import org.bukkit.event.entity.EntitySpawnEvent;
|
|||||||
import org.bukkit.event.entity.FoodLevelChangeEvent;
|
import org.bukkit.event.entity.FoodLevelChangeEvent;
|
||||||
import org.bukkit.event.player.PlayerBucketEmptyEvent;
|
import org.bukkit.event.player.PlayerBucketEmptyEvent;
|
||||||
import org.bukkit.event.player.PlayerBucketFillEvent;
|
import org.bukkit.event.player.PlayerBucketFillEvent;
|
||||||
|
import org.bukkit.event.player.PlayerFishEvent;
|
||||||
import org.bukkit.event.player.PlayerInteractEvent;
|
import org.bukkit.event.player.PlayerInteractEvent;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.inventory.meta.ItemMeta;
|
import org.bukkit.inventory.meta.ItemMeta;
|
||||||
@ -76,6 +78,16 @@ public class Gameplay extends MiniPlugin
|
|||||||
_blockRestore = blockRestore;
|
_blockRestore = blockRestore;
|
||||||
_damageManager = damageManager;
|
_damageManager = damageManager;
|
||||||
_foodDecrease = new WeightSet<Boolean>(new Weight<Boolean>(10, true), new Weight<Boolean>(90, false));
|
_foodDecrease = new WeightSet<Boolean>(new Weight<Boolean>(10, true), new Weight<Boolean>(90, false));
|
||||||
|
|
||||||
|
// Register the custom recipes as a listener
|
||||||
|
Bukkit.getPluginManager().registerEvents(new CustomRecipes(), plugin);
|
||||||
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void onPlayerFishing(PlayerFishEvent event)
|
||||||
|
{
|
||||||
|
event.setCancelled(true);
|
||||||
|
notify(event.getPlayer(), "Fishing is disabled!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
|
@ -21,7 +21,7 @@ public class SmeltingListener implements Listener
|
|||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPlayerInteract(PlayerInteractEvent event)
|
public void onPlayerInteract(PlayerInteractEvent event)
|
||||||
{
|
{
|
||||||
if (event.getAction() == Action.LEFT_CLICK_BLOCK)
|
if (event.getAction() == Action.LEFT_CLICK_BLOCK && event.getPlayer().isSneaking())
|
||||||
{
|
{
|
||||||
Block clicked = event.getClickedBlock();
|
Block clicked = event.getClickedBlock();
|
||||||
|
|
||||||
|
@ -41,6 +41,7 @@ import mineplex.core.updater.event.UpdateEvent;
|
|||||||
import mineplex.game.clans.clans.ClansManager;
|
import mineplex.game.clans.clans.ClansManager;
|
||||||
import mineplex.game.clans.items.generation.WeightSet;
|
import mineplex.game.clans.items.generation.WeightSet;
|
||||||
import mineplex.minecraft.game.classcombat.Skill.event.SkillTriggerEvent;
|
import mineplex.minecraft.game.classcombat.Skill.event.SkillTriggerEvent;
|
||||||
|
import mineplex.minecraft.game.classcombat.event.WebTossEvent;
|
||||||
import mineplex.minecraft.game.core.condition.Condition.ConditionType;
|
import mineplex.minecraft.game.core.condition.Condition.ConditionType;
|
||||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||||
|
|
||||||
@ -81,6 +82,15 @@ public class Spawn extends MiniPlugin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void onWebToss(WebTossEvent event)
|
||||||
|
{
|
||||||
|
if (isInSpawn(event.getLocation()))
|
||||||
|
{
|
||||||
|
event.setCancelled(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onBlockBurn(BlockBurnEvent event)
|
public void onBlockBurn(BlockBurnEvent event)
|
||||||
{
|
{
|
||||||
|
@ -36,7 +36,7 @@ public class StaticLazer extends SkillChargeSword
|
|||||||
{
|
{
|
||||||
super(skills, name, classType, skillType, cost, maxLevel,
|
super(skills, name, classType, skillType, cost, maxLevel,
|
||||||
0.012f, 0.004f,
|
0.012f, 0.004f,
|
||||||
12000, -1000, true, true,
|
15000, -1000, true, true,
|
||||||
false, true);
|
false, true);
|
||||||
|
|
||||||
SetDesc(new String[]
|
SetDesc(new String[]
|
||||||
@ -77,12 +77,13 @@ public class StaticLazer extends SkillChargeSword
|
|||||||
|
|
||||||
//Action
|
//Action
|
||||||
double curRange = 0;
|
double curRange = 0;
|
||||||
while (curRange <= 20 + 10 * level)
|
double maxRange = 10 + 5 * level;
|
||||||
|
while (curRange <= maxRange)
|
||||||
{
|
{
|
||||||
Location newTarget = player.getEyeLocation().add(player.getLocation().getDirection().multiply(curRange));
|
Location newTarget = player.getEyeLocation().add(player.getLocation().getDirection().multiply(curRange));
|
||||||
|
|
||||||
//Hit Player
|
//Hit Player
|
||||||
HashMap<LivingEntity, Double> hits = UtilEnt.getInRadius(newTarget, 2);
|
HashMap<LivingEntity, Double> hits = UtilEnt.getInRadius(newTarget, 1);
|
||||||
hits.remove(player);
|
hits.remove(player);
|
||||||
if (!hits.isEmpty())
|
if (!hits.isEmpty())
|
||||||
break;
|
break;
|
||||||
@ -114,9 +115,10 @@ public class StaticLazer extends SkillChargeSword
|
|||||||
if (other.equals(player))
|
if (other.equals(player))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
double damage = 7 + 1*level;
|
||||||
//Damage Event
|
//Damage Event
|
||||||
Factory.Damage().NewDamageEvent(other, player, null,
|
Factory.Damage().NewDamageEvent(other, player, null,
|
||||||
DamageCause.CUSTOM, 6 + level * charge, true, true, false,
|
DamageCause.CUSTOM, damage * charge, true, true, false,
|
||||||
player.getName(), GetName());
|
player.getName(), GetName());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -409,7 +409,7 @@ public class SkillFactory extends MiniPlugin implements ISkillFactory
|
|||||||
AddSkill(new Fissure(this, "Fissure", ClassType.Mage, SkillType.Axe,
|
AddSkill(new Fissure(this, "Fissure", ClassType.Mage, SkillType.Axe,
|
||||||
1, 5,
|
1, 5,
|
||||||
60, -3,
|
60, -3,
|
||||||
11000, -1000, true,
|
14000, -1000, true,
|
||||||
new Material[] {Material.IRON_AXE, Material.GOLD_AXE, Material.DIAMOND_AXE},
|
new Material[] {Material.IRON_AXE, Material.GOLD_AXE, Material.DIAMOND_AXE},
|
||||||
new Action[] {Action.RIGHT_CLICK_AIR, Action.RIGHT_CLICK_BLOCK}));
|
new Action[] {Action.RIGHT_CLICK_AIR, Action.RIGHT_CLICK_BLOCK}));
|
||||||
|
|
||||||
|
@ -0,0 +1,26 @@
|
|||||||
|
package mineplex.minecraft.game.classcombat.event;
|
||||||
|
|
||||||
|
import org.bukkit.Location;
|
||||||
|
import org.bukkit.block.Block;
|
||||||
|
import org.bukkit.event.Cancellable;
|
||||||
|
import org.bukkit.event.Event;
|
||||||
|
import org.bukkit.event.HandlerList;
|
||||||
|
|
||||||
|
public class WebTossEvent extends Event implements Cancellable
|
||||||
|
{
|
||||||
|
private static final HandlerList handlers = new HandlerList();
|
||||||
|
public static HandlerList getHandlerList() { return handlers; }
|
||||||
|
public HandlerList getHandlers() { return handlers; }
|
||||||
|
|
||||||
|
private boolean _cancelled;
|
||||||
|
public boolean isCancelled() { return _cancelled; }
|
||||||
|
public void setCancelled(boolean cancelled) { _cancelled = cancelled; }
|
||||||
|
|
||||||
|
private Location _location;
|
||||||
|
public Location getLocation() { return _location; }
|
||||||
|
|
||||||
|
public WebTossEvent(Location location)
|
||||||
|
{
|
||||||
|
_location = location;
|
||||||
|
}
|
||||||
|
}
|
@ -125,7 +125,7 @@ public class ItemFactory extends MiniPlugin implements IItemFactory
|
|||||||
|
|
||||||
AddItem(new Web(this, Material.WEB, 3, false, 500, 1,
|
AddItem(new Web(this, Material.WEB, 3, false, 500, 1,
|
||||||
null, true, 0, 0,
|
null, true, 0, 0,
|
||||||
ActionType.L, true, 250, 0, 1f,
|
ActionType.L, true, 1500, 0, 1f,
|
||||||
-1, true, true, true, false));
|
-1, true, true, true, false));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
package mineplex.minecraft.game.classcombat.item.Throwable;
|
package mineplex.minecraft.game.classcombat.item.Throwable;
|
||||||
|
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Effect;
|
import org.bukkit.Effect;
|
||||||
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
@ -12,6 +14,7 @@ import mineplex.core.common.util.UtilBlock;
|
|||||||
import mineplex.core.common.util.UtilMath;
|
import mineplex.core.common.util.UtilMath;
|
||||||
import mineplex.core.common.util.UtilEvent.ActionType;
|
import mineplex.core.common.util.UtilEvent.ActionType;
|
||||||
import mineplex.core.projectile.ProjectileUser;
|
import mineplex.core.projectile.ProjectileUser;
|
||||||
|
import mineplex.minecraft.game.classcombat.event.WebTossEvent;
|
||||||
import mineplex.minecraft.game.classcombat.item.ItemFactory;
|
import mineplex.minecraft.game.classcombat.item.ItemFactory;
|
||||||
import mineplex.minecraft.game.classcombat.item.ItemUsable;
|
import mineplex.minecraft.game.classcombat.item.ItemUsable;
|
||||||
|
|
||||||
@ -70,12 +73,19 @@ public class Web extends ItemUsable
|
|||||||
{
|
{
|
||||||
//Effect
|
//Effect
|
||||||
ent.getWorld().playEffect(ent.getLocation(), Effect.STEP_SOUND, 30);
|
ent.getWorld().playEffect(ent.getLocation(), Effect.STEP_SOUND, 30);
|
||||||
|
|
||||||
if (!UtilBlock.airFoliage(ent.getLocation().getBlock()))
|
|
||||||
return;
|
|
||||||
|
|
||||||
Factory.BlockRestore().add(ent.getLocation().getBlock(), 30, (byte) 0, 6000);
|
|
||||||
|
|
||||||
ent.remove();
|
ent.remove();
|
||||||
|
|
||||||
|
if (canWeb(ent.getLocation()))
|
||||||
|
{
|
||||||
|
Factory.BlockRestore().add(ent.getLocation().getBlock(), 30, (byte) 0, 6000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean canWeb(Location location)
|
||||||
|
{
|
||||||
|
WebTossEvent webEvent = new WebTossEvent(location);
|
||||||
|
Bukkit.getPluginManager().callEvent(webEvent);
|
||||||
|
|
||||||
|
return !webEvent.isCancelled() && UtilBlock.airFoliage(location.getBlock());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user