mirror of
https://github.com/PikaMug/Quests.git
synced 2025-02-02 05:31:33 +01:00
Disallow Quest Journals in Item Frames, fixes #86
This commit is contained in:
parent
6f3271d0d0
commit
f1b527064d
@ -359,6 +359,16 @@ public class PlayerListener implements Listener, ColorUtil {
|
||||
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onPlayerInteractEntity(PlayerInteractEntityEvent evt) {
|
||||
if (evt.getRightClicked().getType() == EntityType.ITEM_FRAME) {
|
||||
if(ItemUtil.isJournal(evt.getPlayer().getItemInHand())) {
|
||||
evt.setCancelled(true);
|
||||
evt.getPlayer().sendMessage(RED + Lang.get("journalDenied"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onPlayerChat(AsyncPlayerChatEvent evt) {
|
||||
|
||||
@ -502,7 +512,7 @@ public class PlayerListener implements Listener, ColorUtil {
|
||||
|
||||
for (Quest quest : quester.currentQuests.keySet()) {
|
||||
|
||||
if (evt.getEntity().getType().equals(EntityType.SHEEP) && quester.hasObjective(quest, "shearSheep")) {
|
||||
if (evt.getEntity().getType() == EntityType.SHEEP && quester.hasObjective(quest, "shearSheep")) {
|
||||
|
||||
Sheep sheep = (Sheep) evt.getEntity();
|
||||
quester.shearSheep(quest, sheep.getColor());
|
||||
|
@ -957,6 +957,7 @@ public class Lang {
|
||||
langMap.put("journalAlreadyHave", "You already have your Quest Journal out.");
|
||||
langMap.put("journalNoRoom", "You have no room in your inventory for your Quest Journal!");
|
||||
langMap.put("journalNoQuests", "You have no accepted quests!");
|
||||
langMap.put("journalDenied", "You cannot do that with your Quest Journal.");
|
||||
//
|
||||
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user