forked from DerPavlov/Cannons
-
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
Showing
5 changed files
with
52 additions
and
40 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
41 changes: 4 additions & 37 deletions
41
...lov/cannons/hooks/PlaceholderAPIHook.java → ...nons/hooks/papi/CannonsPAPIExpansion.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
46 changes: 46 additions & 0 deletions
46
cannons-bukkit/src/main/java/at/pavlov/cannons/hooks/papi/PlaceholderAPIHook.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,46 @@ | ||
package at.pavlov.cannons.hooks.papi; | ||
|
||
import at.pavlov.cannons.Cannons; | ||
import at.pavlov.cannons.hooks.BukkitHook; | ||
import at.pavlov.internal.Hook; | ||
import org.bukkit.Bukkit; | ||
import org.bukkit.ChatColor; | ||
|
||
public class PlaceholderAPIHook extends BukkitHook<Void> { | ||
private boolean working = false; | ||
|
||
public PlaceholderAPIHook(Cannons plugin) { | ||
super(plugin); | ||
} | ||
|
||
@Override | ||
public Void hook() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public void onEnable() { | ||
if (!Bukkit.getPluginManager().isPluginEnabled("PlaceholderAPI")) { | ||
return; | ||
} | ||
|
||
new CannonsPAPIExpansion(plugin).register(); | ||
working = true; | ||
plugin.logInfo(ChatColor.GREEN + enabledMessage()); | ||
} | ||
|
||
@Override | ||
public void onDisable() { | ||
|
||
} | ||
|
||
@Override | ||
public boolean active() { | ||
return working; | ||
} | ||
|
||
@Override | ||
public Class<? extends Hook<?>> getTypeClass() { | ||
return PlaceholderAPIHook.class; | ||
} | ||
} |
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