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
typealias Event<Listener> = Toggled.(Listener) -> (Unit) | |
open class TreeEvent<Listener> : (Toggled, Listener) -> (Unit), Iterable<Listener> { | |
protected val listeners = TreeMap<Int, Listener>() | |
protected var index = 0 | |
override fun iterator() = listeners.values.iterator() | |
override fun invoke(scope: Toggled, listener: Listener) = scope.run { | |
val current = index++ |
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 Pathfinder { | |
//boolean canStart() | |
default boolean a() { return false; } | |
//boolean canTick() | |
default boolean b() { return a(); } | |
//boolean canStop() | |
default boolean f() { return true; } | |
//void onStart() | |
default void c() {} |
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
import org.bukkit.Material; | |
import org.bukkit.entity.Entity; | |
import org.bukkit.entity.Item; | |
import org.bukkit.entity.Player; | |
import org.bukkit.event.EventHandler; | |
import org.bukkit.event.Listener; | |
import org.bukkit.event.entity.EntityPickupItemEvent; | |
import org.bukkit.event.inventory.InventoryClickEvent; | |
import org.bukkit.event.inventory.InventoryDragEvent; |
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 MessageFilter implements Listener { | |
private static final String | |
HANDLER = "packet_handler", | |
CUSTOM_HANDLER = "custom_packet_handler"; | |
private static final Field | |
FIELD_COMPONENT, | |
FIELD_CONNECTION, | |
FIELD_NETWORK, | |
FIELD_CHANNEL; | |
private static final Method |
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
import org.bukkit.Bukkit; | |
import org.bukkit.event.Event; | |
import org.bukkit.event.EventPriority; | |
import org.bukkit.event.Listener; | |
import org.bukkit.event.HandlerList; | |
import org.bukkit.plugin.Plugin; | |
import org.bukkit.plugin.EventExecutor; | |
import java.util.function.Consumer; | |
public interface Events extends Listener, EventExecutor { |
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
import org.bukkit.Bukkit; | |
import org.bukkit.event.Event; | |
import org.bukkit.event.EventPriority; | |
import org.bukkit.event.Listener; | |
import org.bukkit.event.HandlerList; | |
import org.bukkit.plugin.Plugin; | |
import org.bukkit.plugin.EventExecutor; | |
import java.util.function.Consumer; | |
public interface Events extends Listener, EventExecutor { |
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
<repositories> | |
<repository> | |
<id>spigot-repo</id> | |
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url> | |
</repository> | |
</repositories> | |
<dependencies> | |
<dependency> | |
<groupId>org.spigotmc</groupId> |
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
import java.io.IOException; | |
import java.io.UnsupportedEncodingException; | |
import java.net.MalformedURLException; | |
import java.net.URL; | |
import java.util.HashMap; | |
import java.util.Map; | |
import java.util.Optional; | |
import java.util.function.Consumer; |
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 com.gitlab.avelyn.core.utilities; | |
import org.bukkit.Bukkit; | |
import org.bukkit.Server; | |
import org.bukkit.command.Command; | |
import org.bukkit.command.CommandSender; | |
import org.bukkit.configuration.file.FileConfiguration; | |
import org.bukkit.generator.ChunkGenerator; | |
import org.bukkit.plugin.Plugin; | |
import org.bukkit.plugin.PluginDescriptionFile; |
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
import com.penzzly.engine.architecture.base.Component; | |
import com.penzzly.engine.core.utilites.io.FileUtil; | |
import org.bukkit.Bukkit; | |
import org.bukkit.World; | |
import org.bukkit.WorldCreator; | |
import org.bukkit.entity.Player; | |
import org.bukkit.event.world.WorldLoadEvent; | |
import org.jetbrains.annotations.NotNull; | |
import org.jetbrains.annotations.Nullable; |
NewerOlder