Add reload command, change podium to lime dye, change tip message
This commit is contained in:
parent
690c6160b9
commit
2f0a559441
@ -19,6 +19,7 @@ public class BoosterCommand extends MultiCommandBase<BoosterManager>
|
||||
|
||||
AddCommand(new AddCommand(plugin));
|
||||
AddCommand(new GuiCommand(plugin));
|
||||
AddCommand(new ReloadCommand(plugin));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -0,0 +1,35 @@
|
||||
package mineplex.core.boosters.command;
|
||||
|
||||
import mineplex.core.boosters.Booster;
|
||||
import mineplex.core.boosters.BoosterManager;
|
||||
import mineplex.core.command.CommandBase;
|
||||
import mineplex.core.common.Rank;
|
||||
import mineplex.core.common.util.Callback;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author Shaun Bennett
|
||||
*/
|
||||
public class ReloadCommand extends CommandBase<BoosterManager>
|
||||
{
|
||||
public ReloadCommand(BoosterManager plugin)
|
||||
{
|
||||
super(plugin, Rank.DEVELOPER, "reload");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void Execute(Player caller, String[] args)
|
||||
{
|
||||
Plugin.getBoostersAsync(data -> {
|
||||
if (data != null)
|
||||
{
|
||||
UtilPlayer.message(caller, F.main("Booster", "Boosters reloaded!"));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
@ -104,9 +104,9 @@ public class BoosterPodium extends MiniPlugin
|
||||
|
||||
|
||||
armorStand.setHelmet(UtilSkull.getPlayerHead(activeBooster.getPlayerName(), activeBooster.getPlayerName(), null));
|
||||
armorStand.setChestplate(new ItemBuilder(Material.LEATHER_CHESTPLATE).setColor(Color.GREEN).build());
|
||||
armorStand.setLeggings(new ItemBuilder(Material.LEATHER_LEGGINGS).setColor(Color.GREEN).build());
|
||||
armorStand.setBoots(new ItemBuilder(Material.LEATHER_BOOTS).setColor(Color.GREEN).build());
|
||||
armorStand.setChestplate(new ItemBuilder(Material.LEATHER_CHESTPLATE).setColor(Color.LIME).build());
|
||||
armorStand.setLeggings(new ItemBuilder(Material.LEATHER_LEGGINGS).setColor(Color.LIME).build());
|
||||
armorStand.setBoots(new ItemBuilder(Material.LEATHER_BOOTS).setColor(Color.LIME).build());
|
||||
// armorStand.setItemInHand();
|
||||
|
||||
if (_hologram == null)
|
||||
|
@ -16,6 +16,7 @@ import mineplex.core.hologram.HologramManager;
|
||||
import mineplex.core.npc.NpcManager;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
@ -61,10 +62,10 @@ public class GameBoosterManager extends MiniPlugin
|
||||
_boosterManager.getTipManager().addTip(player, active, result -> {
|
||||
if (result == TipAddResult.SUCCESS)
|
||||
{
|
||||
UtilPlayer.message(player, F.main("Tip", "Thanks for your tip! You earned "
|
||||
+ F.currency(CurrencyType.TREASURE_SHARD, BoosterTipManager.TIP_FOR_TIPPER)));
|
||||
}
|
||||
else
|
||||
UtilPlayer.message(player, F.main("Tip", "You tipped " + F.name(active.getPlayerName()) + " " + F.currency(CurrencyType.TREASURE_SHARD, BoosterTipManager.TIP_FOR_SPONSOR) + " and you got "
|
||||
+ F.currency(CurrencyType.TREASURE_SHARD, BoosterTipManager.TIP_FOR_TIPPER)) + " in return!");
|
||||
player.playSound(player.getLocation(), Sound.LEVEL_UP, 1f, 1f);
|
||||
} else
|
||||
{
|
||||
if (result.getFriendlyMessage() != null)
|
||||
{
|
||||
@ -80,17 +81,10 @@ public class GameBoosterManager extends MiniPlugin
|
||||
Booster booster = event.getBooster();
|
||||
if (event.getBoosterGroup().equals(_boosterGroup))
|
||||
{
|
||||
Bukkit.broadcastMessage(F.main("Booster", F.name(booster.getPlayerName()) + " has activated a booster for " + booster.getMultiplier() + "x Gems!" ));
|
||||
}
|
||||
else
|
||||
Bukkit.broadcastMessage(F.main("Booster", F.name(booster.getPlayerName()) + " has activated a booster for " + booster.getMultiplier() + "x Gems!"));
|
||||
} else
|
||||
{
|
||||
Bukkit.broadcastMessage(F.main("Booster", F.name(booster.getPlayerName()) + " has activated a booster on " + F.elem(event.getBoosterGroup())));
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onDeactivate(BoosterExpireEvent event)
|
||||
{
|
||||
System.out.println("booster deactivate: " + event.getBooster());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user