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 Buff { | |
private final String name; | |
private final int baseRadius; | |
private int currentRadius; | |
private boolean global; | |
public Buff(String name, int radius, boolean global) { | |
this.name = name; | |
this.baseRadius = radius; | |
this.currentRadius = radius; |
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
// each variousSettings index represents the bits for either a varbit or a varp | |
Client | |
int[] variousSettings = new int[2000]; | |
// a VarBit's index is used to access variousSettings | |
// lsb is where to start reading bits | |
// msb is where to stop reading bits | |
VarBit | |
static Varbit[] cache; | |
int 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
package main; | |
import api.YourAPI; | |
class Launcher extends JavaPlugin { | |
private YourAPI api; | |
@Override | |
public void onEnable() { | |
api = new YourAPIV1(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
package api.util; | |
class Group<T> implements Iterable<T> { | |
private final Map<String, T> items; | |
public Group(Map<String, T> items) { | |
this.items = items; | |
} | |
public Group() { |
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 api.quest; | |
public class QuestModule implements Listener { | |
private final QuestManager manager; | |
private final YourAPI api; | |
public QuestModule(YourAPI api) { | |
this.api = api; | |
this.manager = new QuestManager(api); | |
} |
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 api.quest; | |
public class Quest { | |
private final String name; | |
private int progress; | |
public Quest(String name) { | |
this.name = name; | |
} | |
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.util.*; | |
import java.util.function.*; | |
import java.io.*; | |
class Main { | |
public static void main(String args[]) { | |
BuffGroup group = new BuffGroup(); | |
group.add(new MobBonusXPBuff(10)); | |
Buff buff = group.get(MobBonusXPBuff.class); |
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
class Item { | |
private final int id; | |
Item(int id) { | |
this.id = id; | |
} | |
@Override | |
public boolean equals(Object o) { | |
if (this == o) return true; |
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.BufferedReader; | |
import java.io.FileReader; | |
import java.io.IOException; | |
import java.nio.file.Files; | |
import java.nio.file.Paths; | |
import java.util.*; | |
import java.util.stream.Collectors; | |
import java.util.stream.Stream; | |
public class Main { |
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.nio.file.Files; | |
import java.nio.file.Paths; | |
import java.util.ArrayList; | |
import java.util.List; | |
public class DuplicateRemover { | |
private final String currentDefinitionFile; | |
private final String outputFile; |
OlderNewer