AutoCast API
-
AutoCast is one of the most customizable broadcasting plugins out there. And in this wiki page I'll explain everything about the API that it comes with.
You can send custom messages on custom events.
1. Add a custom message to your messages.yml
Code (Text):CustomEvents:
Respawn:
Message:
Text:
- '&7You respawned!'
ClickType: 'NONE'
OnClick: 'NONE'
Hover: 'NONE'
Sound: 'BLOCK_ANVIL_FALL'
Particle: 'NONE'
Permission: 'NONE'
Other:
Commands:
Commands:
- ''
Enabled: false
Title:
Title:
- '&7Dont forget;to choose a kit!'
Enabled: true
Repeat: 4
Delay: 10
ActionBar:
Text:
- ''
Enabled: false
Repeat: 0
Delay: 10
Book:
Pages:
1: []
Enabled: false
Bossbar:
Text:
- ''
Delay: 10
Repeat: 0
Enabled: false
2. Get the instance of the AutoCast plugin
Code (Text):AutoCast autoCast = AutoCast.getInstance();
Code (Text):new Message("CustomEvents.Respawn", autoCast).send(player);
- RegionEnterEvent
- RegionQuitEvent
Example usage of RegionEnterEvent:
Code (Text):@EventHandler
public void onRegionEnterEvent(RegionEnterEvent e) {
Bukkit.broadcastMessage("Region " + e.getRegionEntered().getId() + " is left by " + e.getWhoEntered().getName());
}
Code (Text):@EventHandler
public void onRegionQuitEvent(RegionQuitEvent e) {
Bukkit.broadcastMessage("Region " + e.getRegionLeft().getId() + " is left by" + e.getWhoLeft().getName());
} - Loading...
- Loading...
XenCarta PRO
© Jason Axelrod from 8WAYRUN.COM