Permalink
Browse files

Merge branch 'master' into new-html-docs

  • Loading branch information...
LadyCailin committed Jan 5, 2018
2 parents 4f10f81 + 0c51bef commit f99fa88130153f21cf5860a1815a6273c750644e
Showing with 8,512 additions and 7,449 deletions.
  1. +2 −2 pom.xml
  2. +1 −1 src/main/java/com/laytonsmith/abstraction/Convertor.java
  3. +25 −0 src/main/java/com/laytonsmith/abstraction/MCBossBar.java
  4. +4 −0 src/main/java/com/laytonsmith/abstraction/MCItemMeta.java
  5. +18 −24 src/main/java/com/laytonsmith/abstraction/MCItemStack.java
  6. +8 −8 src/main/java/com/laytonsmith/abstraction/MCLivingEntity.java
  7. +1 −1 src/main/java/com/laytonsmith/abstraction/MCPotionMeta.java
  8. +4 −0 src/main/java/com/laytonsmith/abstraction/MCServer.java
  9. +2 −0 src/main/java/com/laytonsmith/abstraction/MCShapedRecipe.java
  10. +2 −0 src/main/java/com/laytonsmith/abstraction/MCShapelessRecipe.java
  11. +5 −9 src/main/java/com/laytonsmith/abstraction/MCSkullMeta.java
  12. +2 −2 src/main/java/com/laytonsmith/abstraction/StaticLayer.java
  13. +5 −0 src/main/java/com/laytonsmith/abstraction/blocks/MCBlock.java
  14. +3 −0 src/main/java/com/laytonsmith/abstraction/blocks/MCBlockState.java
  15. +14 −21 src/main/java/com/laytonsmith/abstraction/blocks/MCMaterial.java
  16. +15 −4 src/main/java/com/laytonsmith/abstraction/bukkit/BukkitConvertor.java
  17. +116 −0 src/main/java/com/laytonsmith/abstraction/bukkit/BukkitMCBossBar.java
  18. +1 −0 src/main/java/com/laytonsmith/abstraction/bukkit/BukkitMCCreatureSpawner.java
  19. +0 −4 src/main/java/com/laytonsmith/abstraction/bukkit/BukkitMCFurnaceRecipe.java
  20. +10 −0 src/main/java/com/laytonsmith/abstraction/bukkit/BukkitMCItemMeta.java
  21. +3 −3 src/main/java/com/laytonsmith/abstraction/bukkit/BukkitMCPotionMeta.java
  22. +15 −0 src/main/java/com/laytonsmith/abstraction/bukkit/BukkitMCServer.java
  23. +10 −4 src/main/java/com/laytonsmith/abstraction/bukkit/BukkitMCShapedRecipe.java
  24. +9 −3 src/main/java/com/laytonsmith/abstraction/bukkit/BukkitMCShapelessRecipe.java
  25. +16 −0 src/main/java/com/laytonsmith/abstraction/bukkit/BukkitMCSkullMeta.java
  26. +5 −0 src/main/java/com/laytonsmith/abstraction/bukkit/blocks/BukkitMCBlock.java
  27. +6 −0 src/main/java/com/laytonsmith/abstraction/bukkit/blocks/BukkitMCBlockState.java
  28. +6 −0 src/main/java/com/laytonsmith/abstraction/bukkit/blocks/BukkitMCSign.java
  29. +2 −2 src/main/java/com/laytonsmith/abstraction/bukkit/entities/BukkitMCAreaEffectCloud.java
  30. +7 −9 src/main/java/com/laytonsmith/abstraction/bukkit/entities/BukkitMCLivingEntity.java
  31. +2 −2 src/main/java/com/laytonsmith/abstraction/bukkit/entities/BukkitMCTippedArrow.java
  32. +1 −1 src/main/java/com/laytonsmith/abstraction/bukkit/events/BukkitEntityEvents.java
  33. +14 −0 src/main/java/com/laytonsmith/abstraction/enums/MCBarColor.java
  34. +12 −0 src/main/java/com/laytonsmith/abstraction/enums/MCBarStyle.java
  35. +6 −10 src/main/java/com/laytonsmith/abstraction/events/MCCreatureSpawnEvent.java
  36. +2 −2 src/main/java/com/laytonsmith/commandhelper/CommandHelperPlugin.java
  37. +177 −170 src/main/java/com/laytonsmith/core/ObjectGenerator.java
  38. +50 −49 src/main/java/com/laytonsmith/core/Static.java
  39. +2 −2 src/main/java/com/laytonsmith/core/constructs/CInt.java
  40. +1,210 −1,156 src/main/java/com/laytonsmith/core/events/drivers/BlockEvents.java
  41. +26 −29 src/main/java/com/laytonsmith/core/events/drivers/EntityEvents.java
  42. +407 −0 src/main/java/com/laytonsmith/core/functions/BossBar.java
  43. +28 −17 src/main/java/com/laytonsmith/core/functions/Enchantments.java
  44. +3,198 −3,919 src/main/java/com/laytonsmith/core/functions/EntityManagement.java
  45. +3 −4 src/main/java/com/laytonsmith/core/functions/EventBinding.java
  46. +125 −130 src/main/java/com/laytonsmith/core/functions/InventoryManagement.java
  47. +981 −1,597 src/main/java/com/laytonsmith/core/functions/Minecraft.java
  48. +1,521 −0 src/main/java/com/laytonsmith/core/functions/MobManagement.java
  49. +35 −24 src/main/java/com/laytonsmith/core/functions/PlayerManagement.java
  50. +47 −5 src/main/java/com/laytonsmith/core/functions/Recipes.java
  51. +4 −2 src/main/java/com/laytonsmith/core/functions/World.java
  52. +1 −1 src/main/java/com/laytonsmith/tools/Interpreter.java
  53. +227 −231 src/main/java/com/laytonsmith/tools/SyntaxHighlighters.java
  54. +115 −0 src/main/resources/syntax-templates/sublime3/default.sublime-syntax
  55. +1 −1 src/test/java/com/laytonsmith/testing/StaticTest.java
View
@@ -451,8 +451,8 @@
<version>3.3</version>
<configuration>
<showDeprecation>true</showDeprecation>
<source>1.7</source>
<target>1.7</target>
<source>1.8</source>
<target>1.8</target>
<compilerArgs>
<arg>-XDignore.symbol.file</arg>
</compilerArgs>
@@ -218,7 +218,7 @@
* @param result the itemstack the recipe will result in
* @return
*/
public MCRecipe GetNewRecipe(MCRecipeType type, MCItemStack result);
public MCRecipe GetNewRecipe(String key, MCRecipeType type, MCItemStack result);
/**
* Used to convert a generic recipe into the correct type
@@ -0,0 +1,25 @@
package com.laytonsmith.abstraction;
import com.laytonsmith.abstraction.enums.MCBarColor;
import com.laytonsmith.abstraction.enums.MCBarStyle;
import java.util.List;
public interface MCBossBar extends AbstractionObject {
String getTitle();
void setTitle(String title);
MCBarColor getColor();
void setColor(MCBarColor color);
MCBarStyle getStyle();
void setStyle(MCBarStyle style);
double getProgress();
void setProgress(double progress);
void addPlayer(MCPlayer player);
void removePlayer(MCPlayer player);
void removeAllPlayers();
List<MCPlayer> getPlayers();
boolean isVisible();
void setVisible(boolean visible);
}
@@ -105,4 +105,8 @@
int getRepairCost();
void setRepairCost(int cost);
boolean isUnbreakable();
void setUnbreakable(boolean unbreakable);
}
@@ -4,29 +4,23 @@
import com.laytonsmith.abstraction.blocks.MCMaterial;
import java.util.Map;
/**
*
*
*/
public interface MCItemStack extends AbstractionObject{
public MCMaterialData getData();
public short getDurability();
public int getTypeId();
public void setDurability(short data);
public void addEnchantment(MCEnchantment e, int level);
public void addUnsafeEnchantment(MCEnchantment e, int level);
public Map<MCEnchantment, Integer> getEnchantments();
public void removeEnchantment(MCEnchantment e);
public MCMaterial getType();
public void setTypeId(int type);
public int maxStackSize();
public int getAmount();
public void setData(int data);
public boolean hasItemMeta();
public MCItemMeta getItemMeta();
public void setItemMeta(MCItemMeta im);
MCMaterialData getData();
short getDurability();
@Deprecated
int getTypeId();
void setDurability(short data);
void addEnchantment(MCEnchantment e, int level);
void addUnsafeEnchantment(MCEnchantment e, int level);
Map<MCEnchantment, Integer> getEnchantments();
void removeEnchantment(MCEnchantment e);
MCMaterial getType();
@Deprecated
void setTypeId(int type);
int maxStackSize();
int getAmount();
void setData(int data);
boolean hasItemMeta();
MCItemMeta getItemMeta();
void setItemMeta(MCItemMeta im);
}
@@ -13,7 +13,7 @@
*/
public interface MCLivingEntity extends MCEntity, MCProjectileSource {
void addEffect(int potionID, int strength, int seconds, boolean ambient, boolean particles, Target t);
void addEffect(int potionID, int strength, int ticks, boolean ambient, boolean particles, Target t);
public boolean removeEffect(int potionID);
/**
* Returns the maximum effect id, inclusive.
@@ -76,21 +76,21 @@
private int potionID;
private int strength;
private int secondsRemaining;
private int ticksRemaining;
private boolean ambient;
private boolean particles;
public MCEffect(int potionID, int strength, int secondsRemaining, boolean ambient){
public MCEffect(int potionID, int strength, int ticks, boolean ambient){
this.potionID = potionID;
this.strength = strength;
this.secondsRemaining = secondsRemaining;
this.ticksRemaining = ticks;
this.ambient = ambient;
this.particles = true;
}
public MCEffect(int potionID, int strength, int secondsRemaining, boolean ambient, boolean particles){
public MCEffect(int potionID, int strength, int ticks, boolean ambient, boolean particles){
this.potionID = potionID;
this.strength = strength;
this.secondsRemaining = secondsRemaining;
this.ticksRemaining = ticks;
this.ambient = ambient;
this.particles = particles;
}
@@ -103,8 +103,8 @@ public int getStrength() {
return strength;
}
public int getSecondsRemaining() {
return secondsRemaining;
public int getTicksRemaining() {
return ticksRemaining;
}
public boolean isAmbient() {
@@ -8,7 +8,7 @@
public MCPotionData getBasePotionData();
public void setBasePotionData(MCPotionData pd);
public boolean addCustomEffect(int potionID, int strength, int seconds, boolean ambient, boolean overwrite, Target t);
public boolean addCustomEffect(int potionID, int strength, int ticks, boolean ambient, boolean overwrite, Target t);
public boolean clearCustomEffects();
public List<MCEffect> getCustomEffects();
public boolean hasCustomEffect(int id);
@@ -1,5 +1,7 @@
package com.laytonsmith.abstraction;
import com.laytonsmith.abstraction.enums.MCBarColor;
import com.laytonsmith.abstraction.enums.MCBarStyle;
import com.laytonsmith.abstraction.enums.MCInventoryType;
import com.laytonsmith.abstraction.enums.MCVersion;
import com.laytonsmith.abstraction.pluginmessages.MCMessenger;
@@ -116,4 +118,6 @@
* @return The command's captured output, if possible, otherwise an empty string, never null.
*/
public String dispatchAndCaptureCommand(MCCommandSender commandSender, String cmd);
MCBossBar createBossBar(String title, MCBarColor color, MCBarStyle style);
}
@@ -4,6 +4,8 @@
public interface MCShapedRecipe extends MCRecipe {
public String getKey();
public Map<Character, MCItemStack> getIngredientMap();
@Override
@@ -8,6 +8,8 @@
*/
public interface MCShapelessRecipe extends MCRecipe {
public String getKey();
public MCShapelessRecipe addIngredient(MCItemStack ingredient);
public MCShapelessRecipe addIngredient(int type, int data, int amount);
@@ -1,13 +1,9 @@
package com.laytonsmith.abstraction;
/**
*
* @author jb_aero
*/
public interface MCSkullMeta extends MCItemMeta {
public boolean hasOwner();
public String getOwner();
public boolean setOwner(String owner);
boolean hasOwner();
String getOwner();
MCOfflinePlayer getOwningPlayer();
boolean setOwner(String owner);
void setOwningPlayer(MCOfflinePlayer player);
}
@@ -171,8 +171,8 @@ public static MCEntity GetCorrectEntity(MCEntity e) {
return convertor.GetCorrectEntity(e);
}
public static MCRecipe GetNewRecipe(MCRecipeType type, MCItemStack result) {
return convertor.GetNewRecipe(type, result);
public static MCRecipe GetNewRecipe(String key, MCRecipeType type, MCItemStack result) {
return convertor.GetNewRecipe(key, type, result);
}
public static String GetPluginName() {
@@ -15,14 +15,19 @@
*/
public interface MCBlock extends MCMetadatable {
@Deprecated
public int getTypeId();
public byte getData();
public void setType(MCMaterial mat);
@Deprecated
public void setTypeId(int idata);
public void setData(byte imeta);
@Deprecated
public void setTypeAndData(int type, byte data, boolean physics);
public double getTemperature();
@@ -6,7 +6,10 @@
public interface MCBlockState extends MCMetadatable {
MCMaterialData getData();
MCMaterial getType();
@Deprecated
int getTypeId();
@Deprecated
void setTypeId(int type);
void setRawData(byte data);
MCBlock getBlock();
@@ -5,26 +5,19 @@
import com.laytonsmith.abstraction.AbstractionObject;
import com.laytonsmith.abstraction.MCMaterialData;
/**
*
*
*/
public interface MCMaterial extends AbstractionObject {
short getMaxDurability();
public int getType();
public MCMaterialData getData();
public String getName();
public int getMaxStackSize();
public boolean hasGravity();
public boolean isBlock();
public boolean isBurnable();
public boolean isEdible();
public boolean isFlammable();
public boolean isOccluding();
public boolean isRecord();
public boolean isSolid();
public boolean isTransparent();
short getMaxDurability();
int getType();
MCMaterialData getData();
String getName();
int getMaxStackSize();
boolean hasGravity();
boolean isBlock();
boolean isBurnable();
boolean isEdible();
boolean isFlammable();
boolean isOccluding();
boolean isRecord();
boolean isSolid();
boolean isTransparent();
}
@@ -77,6 +77,7 @@
import org.bukkit.Color;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.NamespacedKey;
import org.bukkit.World;
import org.bukkit.block.Banner;
import org.bukkit.block.Block;
@@ -588,14 +589,24 @@ public void run() {
}
@Override
public MCRecipe GetNewRecipe(MCRecipeType type, MCItemStack result) {
public MCRecipe GetNewRecipe(String key, MCRecipeType type, MCItemStack result) {
ItemStack is = ((BukkitMCItemStack) result).asItemStack();
switch (type) {
case FURNACE:
return new BukkitMCFurnaceRecipe(result);
FurnaceRecipe recipe = new FurnaceRecipe(is, Material.PISTON_MOVING_PIECE);
return new BukkitMCFurnaceRecipe(recipe);
case SHAPED:
return new BukkitMCShapedRecipe(result);
if(key != null) {
return new BukkitMCShapedRecipe(new ShapedRecipe(new NamespacedKey(CommandHelperPlugin.self, key), is));
} else {
return new BukkitMCShapedRecipe(new ShapedRecipe(is));
}
case SHAPELESS:
return new BukkitMCShapelessRecipe(result);
if(key != null) {
return new BukkitMCShapelessRecipe(new ShapelessRecipe(new NamespacedKey(CommandHelperPlugin.self, key), is));
} else {
return new BukkitMCShapelessRecipe(new ShapelessRecipe(is));
}
}
return null;
}
Oops, something went wrong.

0 comments on commit f99fa88

Please sign in to comment.