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
/** | |
* Get the inventory in this view that contains the given slot. | |
* @param rawSlot a raw slot number | |
* @return the inventory with that slot number, or null if not applicable | |
*/ | |
public final Inventory getInventoryWithSlot(int rawSlot) { | |
int numInTop = getTopInventory().getSize(); | |
if (rawSlot < 0) { |
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 org.bukkit.potion.newpotion; | |
import org.bukkit.inventory.ItemStack; | |
public interface NewPotionBrewer { | |
/** | |
* Complete a brewing action on the given potion. This method will modify | |
* the ItemStack given in its potion argument, and return true when | |
* finished. If the brewing fails for any reason, such as the potion item | |
* not actually being a potion or the ingredient not being valid, false |
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 com.gmail.nossr50.config; | |
import java.io.BufferedReader; | |
import java.io.BufferedWriter; | |
import java.io.File; | |
import java.io.FileWriter; | |
import java.io.InputStreamReader; | |
import java.util.HashMap; | |
import java.util.HashSet; | |
import java.util.Set; |
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
diff --git a/src/main/java/org/bukkit/inventory/InventoryView.java b/src/main/ja | |
index 5e542b8..ad7d144 100644 | |
--- a/src/main/java/org/bukkit/inventory/InventoryView.java | |
+++ b/src/main/java/org/bukkit/inventory/InventoryView.java | |
@@ -34,6 +34,10 @@ public abstract class InventoryView { | |
*/ | |
TICKS_FOR_CURRENT_FUEL(2, InventoryType.FURNACE), | |
/** | |
+ * In an anvil inventory, the repair cost experience level value. | |
+ */ |
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
diff --git a/src/main/java/com/gmail/nossr50/database/FlatfileDatabaseManager.java b/src/main/java/com/gmail/nossr50/database/FlatfileDatabaseManager.java | |
index 9a03c3a..1f1f156 100644 | |
--- a/src/main/java/com/gmail/nossr50/database/FlatfileDatabaseManager.java | |
+++ b/src/main/java/com/gmail/nossr50/database/FlatfileDatabaseManager.java | |
@@ -13,9 +13,12 @@ import java.util.Comparator; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; | |
+import java.util.concurrent.Callable; | |
+import java.util.concurrent.ExecutionException; |
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
diff --git a/src/main/java/com/gmail/nossr50/util/player/UserManager.java b/src/main/java/com/gmail/nossr50/util/player/UserManager.java | |
index c6b691e..b468597 100644 | |
--- a/src/main/java/com/gmail/nossr50/util/player/UserManager.java | |
+++ b/src/main/java/com/gmail/nossr50/util/player/UserManager.java | |
@@ -84,7 +84,7 @@ public final class UserManager { | |
playerName = matches.get(0).getName(); | |
} | |
- return players.get(playerName); | |
+ return logNull(playerName); |
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
This is pseudocode. | |
Faction { | |
private transient Scoreboard scoreboard = makenewscoreboard() | |
} | |
updateScoreboards() { | |
Set<Faction> toUpdate; | |
for (Player p : onlinePlayers) { | |
UPlayer up = UPlayer.get(p); |
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
from util import hook, http | |
fml_cache = [] | |
def refresh_cache(): | |
""" gets a page of random FMLs and puts them into a dictionary """ | |
soup = http.get_soup('http://www.fmylife.com/random/') | |
for e in soup.find_all('div', {'class': 'post article'}): |
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 test; | |
import java.util.Map; | |
import org.bukkit.ChatColor; | |
import org.bukkit.enchantments.Enchantment; | |
import org.bukkit.entity.Player; | |
import org.bukkit.event.EventHandler; | |
import org.bukkit.event.Listener; | |
import org.bukkit.event.inventory.InventoryCreativeEvent; |
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
{ | |
Entity[] sourceEntities = sourceChunk.getEntities(); | |
for (Entity oent : sourceEntities) { | |
Entity nent; | |
if (oent instanceof Arrow) { | |
nent = world.spawnArrow(oent.getLocation(), oent.getVelocity(), (float) oent.getVelocity().length(), 0F); | |
} else if (oent instanceof FallingBlock) { | |
FallingBlock o = (FallingBlock) oent; | |
nent = world.spawnFallingBlock(oent.getLocation(), o.getBlockId(), o.getBlockData()); |