Skip to content

Instantly share code, notes, and snippets.

@sahirshahryar
Last active December 19, 2015 12:49
Show Gist options
  • Save sahirshahryar/5957668 to your computer and use it in GitHub Desktop.
Save sahirshahryar/5957668 to your computer and use it in GitHub Desktop.
afistofirony's examples
// Ignore imports for our purposes
public class ExamplePlugin extends JavaPlugin {
@Override
public void onEnable () {
saveDefaultConfig();
List<String> aliases = getConfig().getStringList("path.to.list");
getCommand("test").setAliases(aliases);
}
}
groups:
Owner:
permissions: []
inheritance:
- 'HeadAdmin'
worlds: []
prefix: '&8[&1Owner&8]&f'
suffix: '&f'
HeadAdmin:
permissions:
- '*'
inheritance:
- 'Admin'
worlds: []
prefix: '&8[&cHeadAdmin&8]'
suffix: '&f'
Admin:
permissions:
- 'essentials.gamemode'
- 'essentials.ban'
- 'essentials.unban'
- 'essentials.ipban'
- 'essentials.unipban'
- 'essentials.pardon'
- 'essentials.enchant'
- 'essentials.ban.offline'
- 'lwc.admin'
- 'essentials.broadcast'
- 'essentials.clearinventory'
- 'essentials.seen.extra'
- 'essentials.seen.ipsearch'
- 'herochat.create'
- 'herochat.mod'
inheritance:
- 'Moderator'
worlds: []
prefix: '&8[&4Admin&8]&f'
suffix: '&f'
Moderator:
permissions:
- 'essentials.repair'
- 'essentials.kick'
- 'essentials.tjail'
- 'essentials.jail'
- 'essentials.tempban'
- 'essentials.vanish'
- 'lwc.mod'
- 'essentials.mute.notify'
- 'essentials.tempban.offline'
- 'essentials.ban.notify'
- 'essentials.afk.kickexempt'
- 'essentials.helpop.receive'
- 'essentials.chat.ignoreexempt'
- 'herochat.force.join.Staff'
- 'herochat.force.join.Help'
- 'herochat.speak.Staff'
- 'herochat.kick.Help'
inheritance:
- 'Regular'
worlds: []
prefix: '&8[&bMod&8]&f'
suffix: '&f'
Donator5:
permissions: []
inheritance:
- 'Donator4'
worlds: []
prefix: '&8[&eDonator&8]&f'
suffix: '&f'
Donator4:
permissions: []
inheritance:
- 'Donator3'
worlds: []
prefix: '&8[&eDonator&8]&f'
suffix: '&f'
Donator3:
permissions: []
inheritance:
- 'Donator2'
worlds: []
prefix: '&8[&eDonator&8]&f'
suffix: '&f'
Donator2:
permissions: []
inheritance:
- 'Donator1'
worlds: []
prefix: '&8[&eDonator&8]&f'
suffix: '&f'
Donator1:
permissions:
- 'essentials.kit'
- 'essentials.repair'
- 'herochat.donor'
- 'essentials.ignore'
- 'essentials.hat'
- 'essentials.sethome.multiple'
inheritance:
- 'Regular'
worlds: []
prefix: '&8[&eDonator&8]&f'
suffix: '&f'
Regular:
permissions: []
inheritance:
- 'Guest'
worlds: []
prefix: '&8[&aRegular&8]&f'
suffix: '&f'
Guest:
default: true
permissions:
- 'essentials.help'
- 'modifyworld.chat'
- 'modifyworld.*'
- 'essentials.home'
- 'essentials.sethome'
- 'essentials.back'
- 'essentials.tpa'
- 'essentials.tpaccept'
- 'essentials.tpdeny'
- 'essentials.spawn'
- 'herochat.join.Global'
- 'herochat.join.Local'
- 'herochat.join.Help'
- 'lwc.protect'
- 'lwc.shownotices'
- 'lwc.admin'
- 'essentials.kick.notify'
- 'essentials.build'
- 'essentials.motd'
- 'essentials.msg'
- 'iConomy.payment'
- 'iConomy.help'
- 'essentials.pay'
- 'towny.wild.*'
- 'herochat.pm'
- 'herochat.emote'
- 'herochat.speak.Local'
- 'herochat.speak.Help'
- 'herochat.speak.Global'
- 'herochat.leave.Local'
- 'herochat.leave.Staff'
- 'herochat.leave.Global'
- 'herochat.focus.Global'
- 'herochat.focus.Help'
- 'herochat.focus.Staff'
inheritance: []
worlds: []
prefix: '&0'
suffix: '&f'
public void method () {
doSomething();
}
public void doSomething () {
// Do stuff.
}
public void changeSign (Location loc) {
Sign s = (Sign) loc.getBlock().getState();
for (int i = 0; i < 4; ++i) {
String text = s.getLine(i);
for (ChatColor colour : ChatColor.values) {
text = text.replaceAll('&' + colour.getChar(), colour.toString());
}
s.setLine(i, text);
}
s.update();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment