This file contains hidden or 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
| public class StarterPack extends CommonPlugin implements Listener { | |
| private final YamlConfiguration config = new YamlConfiguration(new File(getDataFolder(), "config.yml")); | |
| private final YamlConfiguration users = new YamlConfiguration(new File(getDataFolder(), "users.yml")); | |
| @Override | |
| public void onEnable() { | |
| config.load(); | |
| users.load(); | |
| Spout.getEventManager().registerEvents(this, this); | |
| } |
This file contains hidden or 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
| public class BackpackCommand extends AnnotatedCommandExecutor { | |
| @Command(aliases = {"backpack", "b"}, desc = "Opens the backpack", min = 0, max = 1) | |
| @Binding(Keyboard.KEY_B) | |
| public void backpack(CommandSource source, CommandArguments args) throws CommandException { | |
| // '/backpack' executed here | |
| } | |
| } |
This file contains hidden or 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
| Quest gatherQuest = Quest.builder() | |
| // gather 5 stone for a reward of 19.99 and a message 'Congratulations!' | |
| .gather(5) | |
| .of(Material.STONE) | |
| .withRewardOf(19.99) | |
| .withMessage("Congratulations!") | |
| .then() | |
| // gather 20 dirt for a reward of 5 and a message 'Nice Dirt!' | |
| .gather(20) |
This file contains hidden or 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
| Quest gatherQuest = Quest.builder() | |
| // gather 5 stone for a reward of 19.99 and a message 'Congratulations!' | |
| .gather(5) | |
| .of(Material.STONE) | |
| .withRewardOf(19.99) | |
| .withMessage("Congratulations!") | |
| .then() | |
| // gather 20 dirt for a reward of 5 and a message 'Nice Dirt!' | |
| .gather(20) |
This file contains hidden or 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 is part of Spout. | |
| * | |
| * Copyright (c) 2011-2012, Spout LLC <http://www.spout.org/> | |
| * Spout is licensed under the Spout License Version 1. | |
| * | |
| * Spout is free software: you can redistribute it and/or modify it under | |
| * the terms of the GNU Lesser General Public License as published by the Free | |
| * Software Foundation, either version 3 of the License, or (at your option) | |
| * any later version. |
This file contains hidden or 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 is part of Spout. | |
| * | |
| * Copyright (c) 2011-2012, Spout LLC <http://www.spout.org/> | |
| * Spout is licensed under the Spout License Version 1. | |
| * | |
| * Spout is free software: you can redistribute it and/or modify it under | |
| * the terms of the GNU Lesser General Public License as published by the Free | |
| * Software Foundation, either version 3 of the License, or (at your option) | |
| * any later version. |
This file contains hidden or 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
| apply plugin: 'com.android.application' | |
| android { | |
| compileSdkVersion 20 | |
| buildToolsVersion "20.0.0" | |
| defaultConfig { | |
| applicationId "com.example.dalvir.find" | |
| minSdkVersion 15 | |
| targetSdkVersion 20 |
This file contains hidden or 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 is part of SpongeAPI, licensed under the MIT License (MIT). | |
| * | |
| * Copyright (c) SpongePowered <https://www.spongepowered.org> | |
| * Copyright (c) contributors | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| * of this software and associated documentation files (the "Software"), to deal | |
| * in the Software without restriction, including without limitation the rights | |
| * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
This file contains hidden or 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 is part of SpongeAPI, licensed under the MIT License (MIT). | |
| * | |
| * Copyright (c) SpongePowered <https://www.spongepowered.org> | |
| * Copyright (c) contributors | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| * of this software and associated documentation files (the "Software"), to deal | |
| * in the Software without restriction, including without limitation the rights | |
| * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
This file contains hidden or 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
| package se.walkercrou.dev; | |
| import static org.spongepowered.api.text.TextTemplate.arg; | |
| import static org.spongepowered.api.text.TextTemplate.of; | |
| import org.spongepowered.api.entity.living.player.Player; | |
| import org.spongepowered.api.event.Listener; | |
| import org.spongepowered.api.event.filter.cause.First; | |
| import org.spongepowered.api.event.message.MessageChannelEvent; | |
| import org.spongepowered.api.plugin.Plugin; |