Skip to content

Commit c32358e

Browse files
committed
Cank it with Hawt Drooping
1 parent b2b4f2d commit c32358e

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>com.volmit</groupId>
55
<artifactId>BileTools</artifactId>
6-
<version>1.1</version>
6+
<version>1.2</version>
77
<name>BileTools</name>
88
<properties>
99
<maven.compiler.source>1.8</maven.compiler.source>

src/main/java/com/volmit/bile/BileTools.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,12 @@ public class BileTools extends JavaPlugin implements Listener, CommandExecutor
2424
private File folder;
2525
private String tag;
2626
private Sound sx;
27+
private int cd = 10;
2728

2829
@Override
2930
public void onEnable()
3031
{
32+
cd = 10;
3133
bile = this;
3234
tag = ChatColor.GREEN + "[" + ChatColor.DARK_GRAY + "Bile" + ChatColor.GREEN + "]: " + ChatColor.GRAY;
3335
mod = new HashMap<File, Long>();
@@ -60,6 +62,11 @@ public void onDisable()
6062

6163
public void onTick()
6264
{
65+
if(cd > 0)
66+
{
67+
cd--;
68+
}
69+
6370
for(File i : folder.listFiles())
6471
{
6572
if(i.getName().toLowerCase().endsWith(".jar") && i.isFile())
@@ -69,6 +76,19 @@ public void onTick()
6976
getLogger().log(Level.INFO, "Now Tracking: " + i.getName());
7077
mod.put(i, i.length());
7178
las.put(i, i.lastModified());
79+
80+
if(cd == 0)
81+
{
82+
PluginUtil.load(i.getName().replace(".jar", ""));
83+
for(Player k : Bukkit.getOnlinePlayers())
84+
{
85+
if(k.hasPermission("bile.use"))
86+
{
87+
k.sendMessage(tag + "Hot Dropped " + ChatColor.WHITE + i.getName());
88+
k.playSound(k.getLocation(), sx, 1f, 1.9f);
89+
}
90+
}
91+
}
7292
}
7393

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

0 commit comments

Comments
 (0)