Skip to content

Instantly share code, notes, and snippets.

View Rojoss's full-sized avatar

Jos Rojoss

  • CoolGames
  • Amsterdam
View GitHub Profile
Hi ${name},<br>
<br>
Your Curve Fever Pro account has been recovered by our support team.<br>
We have updated your email address to <b>${email}</b>.<br>
Please follow the link below to set a new password for your account.<br>
<br>
<a href="http://localhost:9000/?prt=${encodeURI(token.token)}">Reset Password</a><br>
<i>This link will expire in ${moment.duration(tokenExpireDuration).humanize()}.</i><br>
<br>
Regards,<br>
Vector2[] findShapesInGrid(Vector2[,] grid, Vector2[,] shape) {
ArrayList matches = new ArrayList();
int x,y;
for (x = 0; x < grid.GetLength(0); x++) {
for (y = 0; y < grid.GetLength(1); y++) {
if (isShape(x,y,grid,shape)) {
matches.add(new Vector2(x,y));
}
}
@Rojoss
Rojoss / ArmorEquipEvent.java
Created February 24, 2016 04:57
ArmorEvents
package com.clashwars.sober.events.armor;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.player.PlayerEvent;
import org.bukkit.inventory.ItemStack;
public class ArmorEquipEvent extends PlayerEvent implements Cancellable {
/**
* Base Arena class.
* This class is a GameComponent so you can add any of the components.
* @see {@link com.jroossien.gameapi.components}
*/
public abstract class Arena extends GameComponent {
protected UUID uid;
protected String name;
protected String type;
@Rojoss
Rojoss / balance.yml
Last active January 11, 2016 00:10
Templates for CmdSigns
enabled: true
uniqueLine: 1
playerCmd: true
ignoreColors: true
delay: 0
cost: ''
syntax:
'1': '[balance]'
'2': ''
'3': ''
driver: sqllite
host: localhost
database: essence
table_name: ess_{type}{suffix}
username: ''
password: ''
storage_modules:
inv-sync:
save-delay: '10'
suffix: ''
@Rojoss
Rojoss / gist:eba69871495864599d06
Created September 14, 2014 20:51
bungee repo
<repositories>
<repository>
<id>md5-repo</id>
<url>https://oss.sonatype.org/content/groups/public/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>net.md-5</groupId>
//Click Event.
@SuppressWarnings("deprecation")
@EventHandler(priority = EventPriority.HIGHEST)
public void click(InventoryClickEvent event) {
//Since ItemMenuClickEvent extends InventoryclickEvent need to make sure it's not the custom event.
if (event instanceof ItemMenuClickEvent) {
return;
}
Player player = (Player) event.getWhoClicked();