Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Update to Bukkit for 1.7.9
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaceManiac committed May 15, 2014
1 parent 9b5721c commit 90c8c56
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def gitDescribe() {
// determine git-describe output
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'git', 'describe', '--always'
commandLine 'git', 'describe', '--always', '--dirty=*'
standardOutput = stdout
}
return stdout.toString().trim()
Expand Down Expand Up @@ -51,7 +51,7 @@ mainClassName = "net.glowstone.GlowServer"

// Extended project information
ext.url = 'https://github.com/SpaceManiac/Glowstone'
ext.bukkitVersion = '1.7.2-R0.3'
ext.bukkitVersion = '1.7.9-R0.1'
ext.gitDescribe = getVersionName()

// Minimum Java version required
Expand Down
13 changes: 5 additions & 8 deletions src/main/java/net/glowstone/GlowServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public final class GlowServer implements Server {
/**
* The game version supported by the server.
*/
public static final String GAME_VERSION = "1.7.8";
public static final String GAME_VERSION = "1.7.9";

/**
* The protocol version supported by the server.
Expand Down Expand Up @@ -937,12 +937,10 @@ public GlowMapView createMap(World world) {
////////////////////////////////////////////////////////////////////////////
// Inventory and crafting

@Override
public List<Recipe> getRecipesFor(ItemStack result) {
return craftingManager.getRecipesFor(result);
}

@Override
public Iterator<Recipe> recipeIterator() {
return craftingManager.iterator();
}
Expand All @@ -951,31 +949,30 @@ public boolean addRecipe(Recipe recipe) {
return craftingManager.addRecipe(recipe);
}

@Override
public void clearRecipes() {
craftingManager.clearRecipes();
}

@Override
public void resetRecipes() {
craftingManager.resetRecipes();
}

@Override
public Inventory createInventory(InventoryHolder owner, InventoryType type) {
return new GlowInventory(owner, type);
}

@Override
public Inventory createInventory(InventoryHolder owner, int size) {
return new GlowInventory(owner, InventoryType.CHEST, size);
}

@Override
public Inventory createInventory(InventoryHolder owner, int size, String title) {
return new GlowInventory(owner, InventoryType.CHEST, size, title);
}

public Inventory createInventory(InventoryHolder owner, InventoryType type, String title) {
return new GlowInventory(owner, type, type.getDefaultSize(), title);
}

////////////////////////////////////////////////////////////////////////////
// Server icons

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/net/glowstone/entity/GlowPlayer.java
Original file line number Diff line number Diff line change
Expand Up @@ -937,19 +937,19 @@ public boolean performCommand(String command) {

public void chat(String text) {
if (text.startsWith("/")) {
server.getLogger().info(getName() + " issued command: " + text);
try {
PlayerCommandPreprocessEvent event = EventFactory.onPlayerCommand(this, text);
if (event.isCancelled()) {
return;
}

server.getLogger().info(event.getPlayer().getName() + " issued command: " + event.getMessage());
getServer().dispatchCommand(event.getPlayer(), event.getMessage().substring(1));
} catch (Exception ex) {
sendMessage(ChatColor.RED + "An internal error occured while executing your command.");
getServer().getLogger().log(Level.SEVERE, "Exception while executing command: " + text, ex);
}
} else {
// todo: async this
PlayerChatEvent event = EventFactory.onPlayerChat(this, text);
if (event.isCancelled()) {
return;
Expand Down

0 comments on commit 90c8c56

Please sign in to comment.