mirror of
https://github.com/TotalFreedomMC/OpenInv.git
synced 2024-12-23 00:15:08 +00:00
Added new feature: Put item in any of the 5 unused slots and the item will be dropped by the targeted player.
This commit is contained in:
parent
9bf59ed8a7
commit
6196affaa8
5 changed files with 28 additions and 38 deletions
|
@ -243,19 +243,16 @@ public class SpecialPlayerInventory extends PlayerInventory implements ISpecialP
|
||||||
i = getReversedArmorSlotNum(i);
|
i = getReversedArmorSlotNum(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
// Effects
|
||||||
*
|
if (is == this.extra)
|
||||||
* //Effects
|
{
|
||||||
* if(is == this.extra)
|
owner.getHandle().drop(itemstack);
|
||||||
* {
|
itemstack = null;
|
||||||
* if(i == 0)
|
}
|
||||||
* {
|
|
||||||
* itemstack.setData(0);
|
|
||||||
* }
|
|
||||||
* }
|
|
||||||
*/
|
|
||||||
|
|
||||||
is[i] = itemstack;
|
is[i] = itemstack;
|
||||||
|
|
||||||
|
owner.getHandle().defaultContainer.b();
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getReversedItemSlotNum(int i)
|
private int getReversedItemSlotNum(int i)
|
||||||
|
|
|
@ -243,19 +243,16 @@ public class SpecialPlayerInventory extends PlayerInventory implements ISpecialP
|
||||||
i = getReversedArmorSlotNum(i);
|
i = getReversedArmorSlotNum(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
// Effects
|
||||||
*
|
if (is == this.extra)
|
||||||
* //Effects
|
{
|
||||||
* if(is == this.extra)
|
owner.getHandle().drop(itemstack);
|
||||||
* {
|
itemstack = null;
|
||||||
* if(i == 0)
|
}
|
||||||
* {
|
|
||||||
* itemstack.setData(0);
|
|
||||||
* }
|
|
||||||
* }
|
|
||||||
*/
|
|
||||||
|
|
||||||
is[i] = itemstack;
|
is[i] = itemstack;
|
||||||
|
|
||||||
|
owner.getHandle().defaultContainer.b();
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getReversedItemSlotNum(int i)
|
private int getReversedItemSlotNum(int i)
|
||||||
|
|
|
@ -243,19 +243,16 @@ public class SpecialPlayerInventory extends PlayerInventory implements ISpecialP
|
||||||
i = getReversedArmorSlotNum(i);
|
i = getReversedArmorSlotNum(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
// Effects
|
||||||
*
|
if (is == this.extra)
|
||||||
* //Effects
|
{
|
||||||
* if(is == this.extra)
|
owner.getHandle().drop(itemstack);
|
||||||
* {
|
itemstack = null;
|
||||||
* if(i == 0)
|
}
|
||||||
* {
|
|
||||||
* itemstack.setData(0);
|
|
||||||
* }
|
|
||||||
* }
|
|
||||||
*/
|
|
||||||
|
|
||||||
is[i] = itemstack;
|
is[i] = itemstack;
|
||||||
|
|
||||||
|
owner.getHandle().defaultContainer.b();
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getReversedItemSlotNum(int i)
|
private int getReversedItemSlotNum(int i)
|
||||||
|
|
|
@ -10,7 +10,6 @@ import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
import javax.xml.stream.XMLEventReader;
|
import javax.xml.stream.XMLEventReader;
|
||||||
import javax.xml.stream.XMLInputFactory;
|
import javax.xml.stream.XMLInputFactory;
|
||||||
import javax.xml.stream.XMLStreamException;
|
|
||||||
import javax.xml.stream.events.XMLEvent;
|
import javax.xml.stream.events.XMLEvent;
|
||||||
|
|
||||||
import org.bukkit.configuration.file.YamlConfiguration;
|
import org.bukkit.configuration.file.YamlConfiguration;
|
||||||
|
@ -247,7 +246,7 @@ public class Updater
|
||||||
{
|
{
|
||||||
// Obtain the results of the project's file feed
|
// Obtain the results of the project's file feed
|
||||||
readFeed();
|
readFeed();
|
||||||
if (!versionTitle.equals(versionDownloaded) && versionCheck(versionTitle))
|
if (versionTitle != null && !versionTitle.equals(versionDownloaded) && versionCheck(versionTitle))
|
||||||
{
|
{
|
||||||
String fileLink = getFile(versionLink);
|
String fileLink = getFile(versionLink);
|
||||||
if (fileLink != null && type != UpdateType.NO_DOWNLOAD)
|
if (fileLink != null && type != UpdateType.NO_DOWNLOAD)
|
||||||
|
@ -548,9 +547,9 @@ public class Updater
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (XMLStreamException e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
throw new RuntimeException(e);
|
//throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
name: OpenInv
|
name: OpenInv
|
||||||
main: com.lishid.openinv.OpenInv
|
main: com.lishid.openinv.OpenInv
|
||||||
version: 1.9.4
|
version: 1.9.5
|
||||||
author: lishid
|
author: lishid
|
||||||
description: >
|
description: >
|
||||||
This plugin allows you to open a player's inventory as a chest and interact with it in real time.
|
This plugin allows you to open a player's inventory as a chest and interact with it in real time.
|
||||||
|
|
Loading…
Reference in a new issue