Skip to content
This repository has been archived by the owner on Dec 28, 2021. It is now read-only.

Usefull loaded chunks in timings #14

Open
wants to merge 30 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
a4b61cc
POM Changes
md-5 Jun 2, 2013
ed13cc8
Spigot Timings
aikar Jun 2, 2013
d03c056
Add PlayerItemDamageEvent
md-5 Mar 4, 2013
27c287b
BungeeCord Support
md-5 Jun 2, 2013
c7f688c
Add Arrow API
md-5 Jun 2, 2013
d6d8311
Add Particle API
md-5 Jun 2, 2013
3f5ec07
Define EntitySpawnEvent and SpawnerSpawnEvent
ams2990 Apr 16, 2013
bd06b74
Entity Mount and Dismount Events
md-5 Jul 2, 2013
bc1667a
Update Depends
md-5 Jul 4, 2013
1e9a6be
InventoryClickEvent getClickedInventory
aikar Jul 7, 2013
7d0f86a
Added getAllSessionData() to the Conversation API.
Jul 11, 2013
dd9483b
Catch Conversation API Errors
md-5 Jul 22, 2013
4a68dc0
Player Collision API
md-5 Aug 3, 2013
a7d7357
Expand Boolean Prompt Values
md-5 Aug 3, 2013
1a0fa23
Add Getter for Entity Invulnerability
md-5 Aug 3, 2013
8b2546f
Add respawn API.
Oct 8, 2013
0d5e70c
Fix Plugin Message API Disconnects
md-5 Oct 19, 2013
7677d9e
Fix Tab Completion for Some Commands
md-5 Dec 23, 2013
15b7016
Add Spigot Links
md-5 Jan 23, 2014
892f708
Implement Locale Getter for Players
Smove Feb 1, 2014
db2459f
Add support for fetching hidden players
minecrafter Feb 9, 2014
2e53a3f
Silenceable Lightning API
mcy Feb 23, 2014
892ce3a
Remove deprecation on some player lookup methods
md-5 Mar 30, 2014
23f1953
Expand team API to allow arbitrary strings.
md-5 Apr 17, 2014
b6cddde
Add Score.isScoreSet()Z API.
md-5 Apr 17, 2014
a9c9f2f
Add PlayerSpawnLocationEvent.
Apr 8, 2014
57f5c65
Ease ClassLoader Deadlocks Where Possible
md-5 Jul 16, 2014
f78e555
Fix slow tab complete for some commands.
md-5 Jul 22, 2014
5891e6f
Undeprecate Player#updateInventory()V
mcy Jul 23, 2014
168f37a
Usefull loaded chunks in timings
Jul 30, 2014
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Bukkit
Spigot-API
======

A Minecraft Server API.

Website: [http://bukkit.org](http://bukkit.org)
Bugs/Suggestions: [http://leaky.bukkit.org](http://leaky.bukkit.org)
Contributing Guidelines: [CONTRIBUTING.md](https://github.com/Bukkit/Bukkit/blob/master/CONTRIBUTING.md)
Website: [http://spigotmc.org](http://spigotmc.org)
Bugs/Suggestions: [http://www.spigotmc.org/forums/bugs-feature-requests.8/](http://www.spigotmc.org/forums/bugs-feature-requests.8/)
Contributing Guidelines: [CONTRIBUTING.md](https://github.com/SpigotMC/Spigot-API/blob/master/CONTRIBUTING.md)

Compilation
-----------
Expand Down
49 changes: 14 additions & 35 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,42 +1,21 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.7.10-R0.1-SNAPSHOT</version>
<name>Bukkit</name>
<url>http://www.bukkit.org</url>
<name>Spigot-API</name>
<url>http://www.spigotmc.org</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<scm>
<developerConnection>scm:git:[email protected]:Bukkit/Bukkit.git</developerConnection>
<connection>scm:git:git://github.com/Bukkit/Bukkit.git</connection>
<url>https://github.com/Bukkit/Bukkit/tree/master/</url>
</scm>

<ciManagement>
<system>jenkins</system>
<url>http://ci.bukkit.org</url>
</ciManagement>

<distributionManagement>
<site>
<id>jd.bukkit.org</id>
<url>file:///home/javadocs/public_html/</url>
</site>
<repository>
<id>repobo-rel</id>
<name>repo.bukkit.org Releases</name>
<url>http://repo.bukkit.org/content/repositories/releases/</url>
</repository>
<snapshotRepository>
<id>repobo-snap</id>
<name>repo.bukkit.org Snapshots</name>
<url>http://repo.bukkit.org/content/repositories/snapshots/</url>
</snapshotRepository>
</distributionManagement>
<parent>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-parent</artifactId>
<version>dev-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<build>
<plugins>
Expand Down Expand Up @@ -97,21 +76,21 @@
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>1.9</version>
<version>1.12</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1</version>
<version>1.1.1</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.avaje</groupId>
<artifactId>ebean</artifactId>
<version>2.7.3</version>
<version>2.8.1</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
Expand All @@ -125,7 +104,7 @@
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.3</version>
<version>2.6</version>
</dependency>

<!-- testing -->
Expand Down
4 changes: 1 addition & 3 deletions src/main/java/org/bukkit/Bukkit.java
Original file line number Diff line number Diff line change
Expand Up @@ -197,15 +197,13 @@ public static String getUpdateFolder() {
/**
* @see Server#getPlayer(String name)
*/
@Deprecated
public static Player getPlayer(String name) {
return server.getPlayer(name);
}

/**
* @see Server#matchPlayer(String name)
*/
@Deprecated
public static List<Player> matchPlayer(String name) {
return server.matchPlayer(name);
}
Expand Down Expand Up @@ -301,6 +299,7 @@ public static MapView createMap(World world) {
*/
public static void reload() {
server.reload();
org.spigotmc.CustomTimingsHandler.reload(); // Spigot
}

/**
Expand Down Expand Up @@ -447,7 +446,6 @@ public static OfflinePlayer getOfflinePlayer(UUID id) {
/**
* @see Server#getPlayerExact(String name)
*/
@Deprecated
public static Player getPlayerExact(String name) {
return server.getPlayerExact(name);
}
Expand Down
206 changes: 198 additions & 8 deletions src/main/java/org/bukkit/Effect.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.google.common.collect.Maps;

import org.bukkit.block.BlockFace;
import org.bukkit.material.MaterialData;
import org.bukkit.potion.Potion;

/**
Expand Down Expand Up @@ -79,34 +80,204 @@ public enum Effect {
/**
* The flames seen on a mobspawner; a visual effect.
*/
MOBSPAWNER_FLAMES(2004, Type.VISUAL);
MOBSPAWNER_FLAMES(2004, Type.VISUAL),
/**
* The spark that comes off a fireworks
*/
FIREWORKS_SPARK("fireworksSpark", Type.PARTICLE),
/**
* Critical hit particles
*/
CRIT("crit", Type.PARTICLE),
/**
* Blue critical hit particles
*/
MAGIC_CRIT("magicCrit", Type.PARTICLE),
/**
* Multicolored potion effect particles
*/
POTION_SWIRL("mobSpell", Type.PARTICLE),
/**
* Multicolored potion effect particles that are slightly transparent
*/
POTION_SWIRL_TRANSPARENT("mobSpellAmbient", Type.PARTICLE),
/**
* A puff of white potion swirls
*/
SPELL("spell", Type.PARTICLE),
/**
* A puff of white stars
*/
INSTANT_SPELL("instantSpell", Type.PARTICLE),
/**
* A puff of purple particles
*/
WITCH_MAGIC("witchMagic", Type.PARTICLE),
/**
* The note that appears above note blocks
*/
NOTE("note", Type.PARTICLE),
/**
* The particles shown at nether portals
*/
PORTAL("portal", Type.PARTICLE),
/**
* The symbols that fly towards the enchantment table
*/
FLYING_GLYPH("enchantmenttable", Type.PARTICLE),
/**
* Fire particles
*/
FLAME("flame", Type.PARTICLE),
/**
* The particles that pop out of lava
*/
LAVA_POP("lava", Type.PARTICLE),
/**
* A small gray square
*/
FOOTSTEP("footstep", Type.PARTICLE),
/**
* Water particles
*/
SPLASH("splash", Type.PARTICLE),
/**
* Smoke particles
*/
PARTICLE_SMOKE("smoke", Type.PARTICLE),
/**
* The biggest explosion particle effect
*/
EXPLOSION_HUGE("hugeexplosion", Type.PARTICLE),
/**
* A larger version of the explode particle
*/
EXPLOSION_LARGE("largeexplode", Type.PARTICLE),
/**
* Explosion particles
*/
EXPLOSION("explode", Type.PARTICLE),
/**
* Small gray particles
*/
VOID_FOG("depthsuspend", Type.PARTICLE),
/**
* Small gray particles
*/
SMALL_SMOKE("townaura", Type.PARTICLE),
/**
* A puff of white smoke
*/
CLOUD("cloud", Type.PARTICLE),
/**
* Multicolored dust particles
*/
COLOURED_DUST("reddust", Type.PARTICLE),
/**
* Snowball breaking
*/
SNOWBALL_BREAK("snowballpoof", Type.PARTICLE),
/**
* The water drip particle that appears on blocks under water
*/
WATERDRIP("dripWater", Type.PARTICLE),
/**
* The lava drip particle that appears on blocks under lava
*/
LAVADRIP("dripLava", Type.PARTICLE),
/**
* White particles
*/
SNOW_SHOVEL("snowshovel", Type.PARTICLE),
/**
* The particle shown when a slime jumps
*/
SLIME("slime", Type.PARTICLE),
/**
* The particle that appears when breading animals
*/
HEART("heart", Type.PARTICLE),
/**
* The particle that appears when hitting a villager
*/
VILLAGER_THUNDERCLOUD("angryVillager", Type.PARTICLE),
/**
* The particle that appears when trading with a villager
*/
HAPPY_VILLAGER("happyVillager", Type.PARTICLE),
/**
* The smoke particles that appears on blazes, minecarts
* with furnaces and fire
*/
LARGE_SMOKE("largesmoke", Type.PARTICLE),
/**
* The particles generated when a tool breaks.
* This particle requires a Material so that the client can select the correct texture.
*/
ITEM_BREAK("iconcrack", Type.PARTICLE, Material.class),
/**
* The particles generated while breaking a block.
* This particle requires a Material and data value so that the client can select the correct texture.
*/
TILE_BREAK("blockcrack", Type.PARTICLE, MaterialData.class),
/**
* The particles generated while sprinting a block
* This particle requires a Material and data value so that the client can select the correct texture.
*/
TILE_DUST("blockdust", Type.PARTICLE, MaterialData.class);

private final int id;
private final Type type;
private final Class<?> data;
private static final Map<Integer, Effect> BY_ID = Maps.newHashMap();
private static final Map<String, Effect> BY_NAME = Maps.newHashMap();
private final String particleName;

Effect(int id, Type type) {
private Effect(int id, Type type) {
this(id,type,null);
}

Effect(int id, Type type, Class<?> data) {
private Effect(int id, Type type, Class<?> data) {
this.id = id;
this.type = type;
this.data = data;
particleName = null;
}

private Effect(String particleName, Type type, Class<?> data) {
this.particleName = particleName;
this.type = type;
id = 0;
this.data = data;
}

private Effect(String particleName, Type type) {
this.particleName = particleName;
this.type = type;
id = 0;
this.data = null;
}

/**
* Gets the ID for this effect.
*
* @return ID of this effect
* @return if this Effect isn't of type PARTICLE it returns ID of this effect
* @deprecated Magic value
*/
@Deprecated
public int getId() {
return this.id;
}

/**
* Returns the effect's name. This returns null if the effect is not a particle
*
* @return The effect's name
*/
public String getName() {
return particleName;
}

/**
* @return The type of the effect.
*/
Expand All @@ -115,8 +286,7 @@ public Type getType() {
}

/**
* @return The class which represents data for this effect, or null if
* none
* @return if this Effect isn't of type PARTICLE it returns the class which represents data for this effect, or null if none
*/
public Class<?> getData() {
return this.data;
Expand All @@ -136,12 +306,32 @@ public static Effect getById(int id) {

static {
for (Effect effect : values()) {
BY_ID.put(effect.id, effect);
if (effect.type != Type.PARTICLE) {
BY_ID.put(effect.id, effect);
}
}
}

/**
* Gets the Effect associated with the given name.
*
* @param name name of the Effect to return
* @return Effect with the given name
*/
public static Effect getByName(String name) {
return BY_NAME.get(name);
}

static {
for (Effect effect : values()) {
if (effect.type == Type.PARTICLE) {
BY_NAME.put(effect.particleName, effect);
}
}
}

/**
* Represents the type of an effect.
*/
public enum Type {SOUND, VISUAL}
public enum Type {SOUND, VISUAL, PARTICLE}
}
Loading