Skip to content

Instantly share code, notes, and snippets.

View SagaciousZed's full-sized avatar

Edmond Poon SagaciousZed

View GitHub Profile
@SagaciousZed
SagaciousZed / CallbackExample.java
Last active October 12, 2015 23:17
Nontrivial callback example
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.scheduler.BukkitRunnable;
public final class CallbackExample extends JavaPlugin {
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (args.length > 0) {
@SagaciousZed
SagaciousZed / ConfigurationSerializableLocation.java
Created August 17, 2012 16:03
ConfigurationSerializable Location class
/*
* Copyright (C) 2012
*
* 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
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
@SagaciousZed
SagaciousZed / ConfigAccessor.java
Last active May 1, 2021 14:13
Utility to access yaml files in bukkit
/*
* Copyright (C) 2012
*
* 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
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*