mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-08-16 16:37:07 +00:00
commit
dded537a52
|
@ -142,6 +142,7 @@ import org.bukkit.event.player.PlayerAnimationEvent;
|
|||
import org.bukkit.event.player.PlayerGameModeChangeEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEntityEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.event.player.PlayerItemHeldEvent;
|
||||
import org.bukkit.event.player.PlayerJoinEvent;
|
||||
import org.bukkit.event.player.PlayerKickEvent;
|
||||
import org.bukkit.event.player.PlayerMoveEvent;
|
||||
|
@ -968,7 +969,6 @@ public class PKListener implements Listener {
|
|||
|| type == Material.LEAVES || type == Material.LEAVES_2
|
||||
|| type == Material.LEATHER_LEGGINGS || type == Material.AIR)) {
|
||||
newDrops.add(drops.get(i));
|
||||
Bukkit.broadcastMessage("Adding " + drops.get(i));
|
||||
}
|
||||
}
|
||||
if (plantArmor.getOldArmor() != null) {
|
||||
|
@ -1251,12 +1251,6 @@ public class PKListener implements Listener {
|
|||
BlockSource.update(player, ClickType.SHIFT_DOWN);
|
||||
}
|
||||
|
||||
WaterArms waterArms = CoreAbility.getAbility(player, WaterArms.class);
|
||||
if (!player.isSneaking() && waterArms != null) {
|
||||
waterArms.displayBoundMsg();
|
||||
return;
|
||||
}
|
||||
|
||||
AirScooter.check(player);
|
||||
|
||||
|
||||
|
@ -1418,6 +1412,17 @@ public class PKListener implements Listener {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
|
||||
public void onPlayerSlotChange(PlayerItemHeldEvent event) {
|
||||
Player player = event.getPlayer();
|
||||
|
||||
WaterArms waterArms = CoreAbility.getAbility(player, WaterArms.class);
|
||||
if (waterArms != null) {
|
||||
waterArms.displayBoundMsg(event.getNewSlot()+1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
|
||||
public void onPlayerSwing(PlayerAnimationEvent event) {
|
||||
|
|
|
@ -196,7 +196,6 @@ public class ComboManager {
|
|||
}
|
||||
list.add(info);
|
||||
RECENTLY_USED.put(name, list);
|
||||
//Bukkit.broadcastMessage("recentlyUsedAbilities: " + recentlyUsedAbilities.get(name).size());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -163,7 +163,7 @@ public class AirSpout extends AirAbility {
|
|||
|
||||
@Override
|
||||
public boolean isSneakAbility() {
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -51,7 +51,7 @@ public class ClearCommand extends PKCommand {
|
|||
for (int i = 1; i <= 9; i++) {
|
||||
GeneralMethods.saveAbility(bPlayer, i, null);
|
||||
}
|
||||
sender.sendMessage(cleared);
|
||||
sender.sendMessage(ChatColor.YELLOW + cleared);
|
||||
} else if (args.size() == 1) {
|
||||
try {
|
||||
int slot = Integer.parseInt(args.get(0));
|
||||
|
@ -63,7 +63,7 @@ public class ClearCommand extends PKCommand {
|
|||
GeneralMethods.saveAbility(bPlayer, slot, null);
|
||||
sender.sendMessage(clearedSlot.replace("{slot}", String.valueOf(slot)));
|
||||
} else {
|
||||
sender.sendMessage(alreadyEmpty);
|
||||
sender.sendMessage(ChatColor.YELLOW + alreadyEmpty);
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
sender.sendMessage(ChatColor.RED + wrongNumber);
|
||||
|
|
|
@ -190,12 +190,12 @@ public class ConfigManager {
|
|||
config.addDefault("Commands.Check.UpToDate", "You have the latest version of ProjectKorra.");
|
||||
|
||||
config.addDefault("Commands.Bind.Description", "This command will bind an ability to the slot you specify (if you specify one), or the slot currently selected in your hotbar (If you do not specify a Slot #).");
|
||||
config.addDefault("Commands.Bind.AbilityDoesntExist", "This command will bind an ability to the slot you specify (if you specify one), or the slot currently selected in your hotbar (If you do not specify a Slot #).");
|
||||
config.addDefault("Commands.Bind.AbilityDoesntExist", "{ability} is not a valid ability.");
|
||||
config.addDefault("Commands.Bind.WrongNumber", "Slot must be an integer between 1 and 9.");
|
||||
config.addDefault("Commands.Bind.ElementToggledOff", "You have that ability's element toggled off currently.");
|
||||
config.addDefault("Commands.Bind.SuccessfullyBound", "Succesfully bound {ability} to slot {slot}.");
|
||||
|
||||
config.addDefault("Commands.Add.Choose", "This command will allow the user to add an element to the targeted <Player>, or themselves if the target is not specified. This command is typically reserved for server administrators.");
|
||||
config.addDefault("Commands.Add.Description", "This command will allow the user to add an element to the targeted <Player>, or themselves if the target is not specified. This command is typically reserved for server administrators.");
|
||||
config.addDefault("Commands.Add.SuccessfullyAdded", "You are now also a {element}.");
|
||||
config.addDefault("Commands.Add.PlayerNotFound", "That player could not be found.");
|
||||
config.addDefault("Commands.Add.InvalidElement", "You must specify a valid element.");
|
||||
|
|
|
@ -140,7 +140,6 @@ public class WaterArms extends WaterAbility {
|
|||
remove();
|
||||
return;
|
||||
}
|
||||
displayBoundMsg();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -419,8 +418,11 @@ public class WaterArms extends WaterAbility {
|
|||
return false;
|
||||
}
|
||||
|
||||
public void displayBoundMsg() {
|
||||
player.sendMessage(getElement().getColor() + sneakMsg + " " + bPlayer.getBoundAbilityName());
|
||||
public void displayBoundMsg(int slot) {
|
||||
String name = bPlayer.getAbilities().get(slot);
|
||||
if(name != null) {
|
||||
player.sendMessage(getElement().getColor() + sneakMsg + " " + name);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -211,8 +211,7 @@ public class WaterArmsSpear extends WaterAbility {
|
|||
}
|
||||
|
||||
private void createIceBall() {
|
||||
layer++;
|
||||
for (Block block : GeneralMethods.getBlocksAroundPoint(location, layer)) {
|
||||
for (Block block : GeneralMethods.getBlocksAroundPoint(location, spearSphere)) {
|
||||
if (isTransparent(player, block) && block.getType() != Material.ICE && !WaterArms.isUnbreakable(block)) {
|
||||
playIcebendingSound(block.getLocation());
|
||||
new TempBlock(block, Material.ICE, (byte) 0);
|
||||
|
|
Loading…
Reference in a new issue