-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e4f2ed2
commit 858c30c
Showing
19 changed files
with
123 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,6 @@ public boolean onCommand(CommandSender sender, Command command, String s, String | |
} | ||
} | ||
|
||
|
||
return true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
src/main/java/org/cubexmc/ecobalancer/listeners/AdminLoginListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package org.cubexmc.ecobalancer.listeners; | ||
import org.bukkit.entity.Player; | ||
import org.bukkit.event.EventHandler; | ||
import org.bukkit.event.Listener; | ||
import org.bukkit.event.player.PlayerJoinEvent; | ||
import org.cubexmc.ecobalancer.EcoBalancer; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
public class AdminLoginListener implements Listener { | ||
EcoBalancer plugin; | ||
public AdminLoginListener(EcoBalancer plugin) { | ||
this.plugin = plugin; | ||
} | ||
@EventHandler | ||
public void onAdminLogin(PlayerJoinEvent event) { | ||
Player player = event.getPlayer(); | ||
if (player.hasPermission("ecobalance.admin")) { | ||
if (plugin.useTaxAccount()) { | ||
Map<String, String> placeholders = new HashMap<>(); | ||
placeholders.put("tax_account_name", plugin.getTaxAccountName()); | ||
placeholders.put("tax_account_balance", plugin.getTaxAccountBalance()); | ||
player.sendMessage(plugin.getFormattedMessage("messages.tax_account_enabled", placeholders)); | ||
} else { | ||
player.sendMessage(plugin.getFormattedMessage("messages.tax_account_disabled", null)); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file renamed
BIN
+42.2 KB
target/EcoBalancer-1.0.1-beta.jar → target/EcoBalancer-1.0.2-beta.jar
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.