Skip to content

Commit

Permalink
Cank it with Hawt Drooping
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberpwnn committed Mar 7, 2018
1 parent b2b4f2d commit c32358e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.volmit</groupId>
<artifactId>BileTools</artifactId>
<version>1.1</version>
<version>1.2</version>
<name>BileTools</name>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
Expand Down
20 changes: 20 additions & 0 deletions src/main/java/com/volmit/bile/BileTools.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ public class BileTools extends JavaPlugin implements Listener, CommandExecutor
private File folder;
private String tag;
private Sound sx;
private int cd = 10;

@Override
public void onEnable()
{
cd = 10;
bile = this;
tag = ChatColor.GREEN + "[" + ChatColor.DARK_GRAY + "Bile" + ChatColor.GREEN + "]: " + ChatColor.GRAY;
mod = new HashMap<File, Long>();
Expand Down Expand Up @@ -60,6 +62,11 @@ public void onDisable()

public void onTick()
{
if(cd > 0)
{
cd--;
}

for(File i : folder.listFiles())
{
if(i.getName().toLowerCase().endsWith(".jar") && i.isFile())
Expand All @@ -69,6 +76,19 @@ public void onTick()
getLogger().log(Level.INFO, "Now Tracking: " + i.getName());
mod.put(i, i.length());
las.put(i, i.lastModified());

if(cd == 0)
{
PluginUtil.load(i.getName().replace(".jar", ""));
for(Player k : Bukkit.getOnlinePlayers())
{
if(k.hasPermission("bile.use"))
{
k.sendMessage(tag + "Hot Dropped " + ChatColor.WHITE + i.getName());
k.playSound(k.getLocation(), sx, 1f, 1.9f);
}
}
}
}

if(mod.get(i) != i.length() || las.get(i) != i.lastModified())
Expand Down

0 comments on commit c32358e

Please sign in to comment.