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
interface SoundListener { | |
void setPosition(Point pos); | |
Point getPosition(); | |
void setVelocity(Vector3 vec); | |
Vector3 getVelocity(); | |
void setOrientation(Matrix o); | |
Matrix getOrientation(); | |
} | |
class SpoutSoundListener implements SoundListener { |
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
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 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 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 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 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 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 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 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; |
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
{ | |
"id": "com.example.plugin.ExamplePlugin", | |
"name": "Example Plugin", | |
"description": "Example description", | |
"channels": { | |
"stable": { | |
"1.0.1": "<url>", | |
"1.0.0": "<url>" | |
}, | |
"beta": { |