mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-25 02:04:44 +02:00
Removed Chimaera Wing
"RIP Chimera wing, an archaic item from a decadent past" ~ shatteredbeam
This commit is contained in:
@ -77,11 +77,6 @@ public class Config extends ConfigLoader {
|
||||
public boolean getArmorModsEnabled() { return config.getBoolean("Mods.Tool_Mods_Enabled", false); }
|
||||
public boolean getBlockModsEnabled() { return config.getBoolean("Mods.Block_Mods_Enabled", false); }
|
||||
|
||||
/* Items */
|
||||
public int getChimaeraCost() { return config.getInt("Items.Chimaera_Wing.Feather_Cost", 10); }
|
||||
public int getChimaeraItemId() { return config.getInt("Items.Chimaera_Wing.Item_ID", 288); }
|
||||
public boolean getChimaeraEnabled() { return config.getBoolean("Items.Chimaera_Wing.Enabled", true); }
|
||||
|
||||
/* PARTY SETTINGS */
|
||||
public boolean getExpShareEnabled() { return config.getBoolean("Party.Sharing.ExpShare_enabled", true); }
|
||||
public double getPartyShareBonusBase() { return config.getDouble("Party.Sharing.ExpShare_bonus_base", 1.1); }
|
||||
|
@ -37,7 +37,6 @@ import com.gmail.nossr50.skills.taming.TamingManager;
|
||||
import com.gmail.nossr50.skills.utilities.SkillTools;
|
||||
import com.gmail.nossr50.skills.utilities.SkillType;
|
||||
import com.gmail.nossr50.util.BlockChecks;
|
||||
import com.gmail.nossr50.util.ChimaeraWing;
|
||||
import com.gmail.nossr50.util.Motd;
|
||||
import com.gmail.nossr50.util.Misc;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
@ -269,8 +268,6 @@ public class PlayerListener implements Listener {
|
||||
SkillTools.activationCheck(player, SkillType.UNARMED);
|
||||
SkillTools.activationCheck(player, SkillType.WOODCUTTING);
|
||||
}
|
||||
|
||||
ChimaeraWing.activationCheck(player);
|
||||
}
|
||||
|
||||
/* GREEN THUMB CHECK */
|
||||
@ -293,9 +290,6 @@ public class PlayerListener implements Listener {
|
||||
SkillTools.activationCheck(player, SkillType.WOODCUTTING);
|
||||
}
|
||||
|
||||
/* ITEM CHECKS */
|
||||
ChimaeraWing.activationCheck(player);
|
||||
|
||||
break;
|
||||
|
||||
case LEFT_CLICK_AIR:
|
||||
|
@ -1,62 +0,0 @@
|
||||
package com.gmail.nossr50.util;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.utilities.SkillTools;
|
||||
|
||||
public final class ChimaeraWing {
|
||||
private ChimaeraWing() {}
|
||||
|
||||
/**
|
||||
* Check for item usage.
|
||||
*
|
||||
* @param player Player whose item usage to check
|
||||
*/
|
||||
public static void activationCheck(Player player) {
|
||||
ItemStack inHand = player.getItemInHand();
|
||||
|
||||
if (!Config.getInstance().getChimaeraEnabled() || inHand.getTypeId() != Config.getInstance().getChimaeraItemId()) {
|
||||
return;
|
||||
}
|
||||
|
||||
PlayerProfile profile = Users.getPlayer(player).getProfile();
|
||||
Block block = player.getLocation().getBlock();
|
||||
int amount = inHand.getAmount();
|
||||
long recentlyHurt = profile.getRecentlyHurt();
|
||||
|
||||
if (Permissions.chimaeraWing(player) && inHand.getTypeId() == Config.getInstance().getChimaeraItemId()) {
|
||||
if (SkillTools.cooldownOver(recentlyHurt, 60, player) && amount >= Config.getInstance().getChimaeraCost()) {
|
||||
player.setItemInHand(new ItemStack(Config.getInstance().getChimaeraItemId(), amount - Config.getInstance().getChimaeraCost()));
|
||||
|
||||
for (int y = 1; block.getY() + y < player.getWorld().getMaxHeight(); y++) {
|
||||
if (!(block.getRelative(0, y, 0).getType() == Material.AIR)) {
|
||||
player.sendMessage(LocaleLoader.getString("Item.ChimaeraWing.Fail"));
|
||||
player.teleport(block.getRelative(0, y - 1, 0).getLocation());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (player.getBedSpawnLocation() != null && player.getBedSpawnLocation().getBlock().getType() == Material.BED_BLOCK) {
|
||||
player.teleport(player.getBedSpawnLocation());
|
||||
}
|
||||
else {
|
||||
player.teleport(player.getWorld().getSpawnLocation());
|
||||
}
|
||||
|
||||
player.sendMessage(LocaleLoader.getString("Item.ChimaeraWing.Pass"));
|
||||
}
|
||||
else if (!SkillTools.cooldownOver(recentlyHurt, 60, player) && amount >= Config.getInstance().getChimaeraCost()) {
|
||||
player.sendMessage(LocaleLoader.getString("Item.Injured.Wait", SkillTools.calculateTimeLeft(recentlyHurt, 60, player)));
|
||||
}
|
||||
else if (amount <= Config.getInstance().getChimaeraCost()) {
|
||||
player.sendMessage(LocaleLoader.getString("Skills.NeedMore", Misc.prettyItemString(Config.getInstance().getChimaeraItemId())));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -570,14 +570,6 @@ public final class Permissions {
|
||||
return hasPermission(player, "mcmmo.ability.smelting.vanillaxpboost");
|
||||
}
|
||||
|
||||
/*
|
||||
* MCMMO.ITEM.*
|
||||
*/
|
||||
|
||||
public static boolean chimaeraWing(Player player) {
|
||||
return hasPermission(player, "mcmmo.item.chimaerawing");
|
||||
}
|
||||
|
||||
/*
|
||||
* MCMMO.COMMANDS.*
|
||||
*/
|
||||
|
Reference in New Issue
Block a user