Plugin category: Economy Suggested name: CoinMultiplier What I want: So basicly with the permission node eg coin.x2 it gives you x2! But for you to be able to get x2 coins on the weekend you must have node coin.weekend and the /coin weekend must be enabled When you do /coin x2 it will say: "Coin x2 Enabled Ideas for commands: /coin enable (Enables All) /coin disable (Disables All x3 and x4 and x5 and x6) /coin reload /coin weekend (for staff) and the /coin weekend works for all users not just donors Ideas for permissions: coin.enable (for staff) coin.disable (for staff) coin.reload (Dunno why you would need /coin reload but just in-case) coin.weekend (x2 Weekend) coin.x2 (Donors) Gives x2 Coins To Users With This Node DONORS ONLY coin.x3 (Donors) Gives x3 Coins To Users With This Node DONORS ONLY coin.x4 (Donors) Gives x4 Coins To Users With This Node DONORS ONLY coin.x5 (Donors) Gives x5 Coins To Users With This Node DONORS ONLY coin.x6 (Donors) Gives x6 Coins To Users With This Node DONORS ONLY NOT DEFAULT ENABLED FOR OP! Users Must Have The Perm! OP Does Not Effect It! When I'd like it by: When Ever
TyphoonTricks That is a tricky request. There are no events made by Vault for when you get money, following the flow by hand isn't very easy either.
TyphoonTricks I don't think this is possible because like timtower there are no events made by Vault when you receive money. You would need the source of the plugin (Not sure if APIs will work), and then get the rank, and then multiply the money given, which would be difficulty. Also, Bukkit doesn't allow developers to modify other plugins. I suggest you talk to the authors of the plugins you are using.
timtower I'm sure there is a way for a plugin to look at what the other plugins are "paying" the player and send the player the money again...
yeah he's probably trying to dupe hypixels idea....WHICH wont be easy, hypixel has devs making their own versions of bukkit off the main bukkit source code to accomadate to their own needs,Plus you haven't stated what economy plugin your using cause there is so many
@jjoogood exactly, if you want a coin multiplier your going to need a custom version of bukkit for it to work, there are other alternatives but they are not easy
LordFox I've seen a lot of servers that have economy multipliers. I don't see how he is exactly copying Hypixel, closest thing he said to copying was "coins". TyphoonTricks Maybe talk to the developer of Vault and ask them to implement an event on when you receive money.
@Jaaakee224 also in his post he talks about double coins weekend, i haven't seen another major server use this idea so, its using someone else's idea..........PLUS i presume that he will use this with mini games plugins
LordFox Mineplex has economy multipliers and double gem weekend, and minigames are probably the only reason for this type of plugin.
TyphoonTricks this should work, let me know of any problems. it doesnt include the weekend thing, just give those players permission "coin.x2" * keep in mind this effects all transactions with essentials such as /pay as well; so if users can /pay, they'll be able to dupe money dl = https://mega.co.nz/#!ZBUFVTSC!hTSUJFhXOovwDs6E5_d0ESuMtIJIigjz6smMG0QqmD0 src Code:java package me.sainttx; import java.util.ArrayList; import net.ess3.api.events.UserBalanceUpdateEvent;import net.milkbowl.vault.economy.Economy; import org.bukkit.Bukkit;import org.bukkit.ChatColor;import org.bukkit.command.Command;import org.bukkit.command.CommandSender;import org.bukkit.entity.Player;import org.bukkit.event.EventHandler;import org.bukkit.event.Listener;import org.bukkit.plugin.RegisteredServiceProvider;import org.bukkit.plugin.java.JavaPlugin; public class CoinMultiplier extends JavaPlugin implements Listener { private static Economy economy; private boolean disable = false; // Disables x3, x4, x5, x6 @Override public void onEnable() { saveDefaultConfig(); economy(); Bukkit.getPluginManager().registerEvents(this, this); getCommand("coin").setExecutor(this); } private boolean economy() { RegisteredServiceProvider<Economy> economyProvider = getServer().getServicesManager().getRegistration(net.milkbowl.vault.economy.Economy.class); if (economyProvider != null) { economy = economyProvider.getProvider(); } return (economy != null); } private static ArrayList<String> justChanged = new ArrayList<String>(); @EventHandler public void onBalanceUpdate(UserBalanceUpdateEvent event) { final Player player = event.getPlayer(); double newBalance = event.getNewBalance().doubleValue(); double oldBalance = event.getOldBalance().doubleValue(); final double difference = newBalance - oldBalance; final int multiplier = multiplier(player); if (difference < 0 || multiplier == 0 || disable || justChanged.contains(player.getName())) { return; } justChanged.add(player.getName()); Bukkit.getScheduler().scheduleSyncDelayedTask(this, new Runnable() { // wait so that list will update @Override public void run() { economy.depositPlayer(player.getName(), (difference * multiplier) - difference); if (getConfig().getBoolean("tell-player-bonus")) { sendText((CommandSender) player, getConfig().getString("messages.tell-player-bonus").replaceAll("%n", Double.toString((difference * multiplier) - difference)), false); } } }, 5L); Bukkit.getScheduler().scheduleSyncDelayedTask(this, new Runnable() { @Override public void run() { justChanged.remove(player.getName()); } }, 20L); } private int multiplier(Player player) { for (int i = 2; i <= 6; i++) { if (player.hasPermission("coin.x" + i)) { return i; } } return 0; } private void sendMenu(CommandSender sender) { for (String text : getConfig().getStringList("messages.menu")) { sendText(sender, text, false); } } private void sendText(CommandSender sender, String text, boolean configentry) { if (configentry) { sender.sendMessage(ChatColor.translateAlternateColorCodes('&', getConfig().getString("messages." + text))); } else { sender.sendMessage(ChatColor.translateAlternateColorCodes('&', text)); } } @Override public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { if (args.length == 0) { sendMenu(sender); } else { String arg = args[0].toLowerCase(); if (!sender.hasPermission("coin." + arg) && !sender.isOp()) { sendText(sender, "permission", true); return false; } if (arg.equals("enable")) { if (disable) { disable = false; sendText(sender, "enable", true); } else { sendText(sender, "enable2", true); } } else if (arg.equals("disable")) { // disable x3/4/5/6 if (!disable) { disable = true; sendText(sender, "disable", true); } else { sendText(sender, "disable2", true); } } else if (arg.equals("reload")) { reloadConfig(); sendText(sender, "reload", true); } else { sendMenu(sender); } } return false; }}