Added F InventorySee

This commit is contained in:
Driftay 2019-06-29 10:20:59 -04:00
parent be9bdaa4fd
commit 4c3b8b0d18
14 changed files with 134 additions and 37 deletions

2
.gitignore vendored
View File

@ -13,7 +13,7 @@
/target /target
# vim # vim
.*.sw[a-savageFactions] .*.sw[a-saberFactions]
# various other potential build files # various other potential build files
/build /build

View File

@ -222,7 +222,7 @@ extends <a href="../../../com/massivecraft/factions/zcore/MPlugin.html" title="c
<tr class="altColor"> <tr class="altColor">
<td class="colFirst"><code>static <a href="../../../com/massivecraft/factions/P.html" title="class in com.massivecraft.factions">P</a></code></td> <td class="colFirst"><code>static <a href="../../../com/massivecraft/factions/P.html" title="class in com.massivecraft.factions">P</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a <td class="colLast"><code><span class="memberNameLink"><a
href="../../../com/massivecraft/factions/P.html#savageFactions">savageFactions</a></span></code>&nbsp; href="../../../com/massivecraft/factions/P.html#saberFactions">saberFactions</a></span></code>&nbsp;
</td> </td>
</tr> </tr>
<tr class="rowColor"> <tr class="rowColor">
@ -456,13 +456,13 @@ extends <a href="../../../com/massivecraft/factions/zcore/MPlugin.html" title="c
<tr id="i30" class="altColor"> <tr id="i30" class="altColor">
<td class="colFirst"><code>void</code></td> <td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a <td class="colLast"><code><span class="memberNameLink"><a
href="../../../com/massivecraft/factions/P.html#playSound-org.bukkit.entity.Player-java.util.List-">playSound</a></span>(org.bukkit.entity.Player&nbsp;savageFactions, href="../../../com/massivecraft/factions/P.html#playSound-org.bukkit.entity.Player-java.util.List-">playSound</a></span>(org.bukkit.entity.Player&nbsp;saberFactions,
java.util.List&lt;java.lang.String&gt;&nbsp;sounds)</code>&nbsp;</td> java.util.List&lt;java.lang.String&gt;&nbsp;sounds)</code>&nbsp;</td>
</tr> </tr>
<tr id="i31" class="rowColor"> <tr id="i31" class="rowColor">
<td class="colFirst"><code>void</code></td> <td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a <td class="colLast"><code><span class="memberNameLink"><a
href="../../../com/massivecraft/factions/P.html#playSound-org.bukkit.entity.Player-java.lang.String-">playSound</a></span>(org.bukkit.entity.Player&nbsp;savageFactions, href="../../../com/massivecraft/factions/P.html#playSound-org.bukkit.entity.Player-java.lang.String-">playSound</a></span>(org.bukkit.entity.Player&nbsp;saberFactions,
java.lang.String&nbsp;sound)</code>&nbsp;</td> java.lang.String&nbsp;sound)</code>&nbsp;</td>
</tr> </tr>
<tr id="i32" class="altColor"> <tr id="i32" class="altColor">
@ -538,14 +538,14 @@ extends <a href="../../../com/massivecraft/factions/zcore/MPlugin.html" title="c
<!-- --> <!-- -->
</a> </a>
<h3>Field Detail</h3> <h3>Field Detail</h3>
<a name="savageFactions"> <a name="saberFactions">
<!-- --> <!-- -->
</a> </a>
<ul class="blockList"> <ul class="blockList">
<li class="blockList"> <li class="blockList">
<h4>savageFactions</h4> <h4>saberFactions</h4>
<pre>public static&nbsp;<a href="../../../com/massivecraft/factions/P.html" <pre>public static&nbsp;<a href="../../../com/massivecraft/factions/P.html"
title="class in com.massivecraft.factions">P</a> savageFactions</pre> title="class in com.massivecraft.factions">P</a> saberFactions</pre>
</li> </li>
</ul> </ul>
<a name="perms"> <a name="perms">
@ -894,7 +894,7 @@ extends <a href="../../../com/massivecraft/factions/zcore/MPlugin.html" title="c
<ul class="blockList"> <ul class="blockList">
<li class="blockList"> <li class="blockList">
<h4>playSound</h4> <h4>playSound</h4>
<pre>public&nbsp;void&nbsp;playSound(org.bukkit.entity.Player&nbsp;savageFactions, <pre>public&nbsp;void&nbsp;playSound(org.bukkit.entity.Player&nbsp;saberFactions,
java.util.List&lt;java.lang.String&gt;&nbsp;sounds)</pre> java.util.List&lt;java.lang.String&gt;&nbsp;sounds)</pre>
</li> </li>
</ul> </ul>
@ -904,7 +904,7 @@ extends <a href="../../../com/massivecraft/factions/zcore/MPlugin.html" title="c
<ul class="blockList"> <ul class="blockList">
<li class="blockList"> <li class="blockList">
<h4>playSound</h4> <h4>playSound</h4>
<pre>public&nbsp;void&nbsp;playSound(org.bukkit.entity.Player&nbsp;savageFactions, <pre>public&nbsp;void&nbsp;playSound(org.bukkit.entity.Player&nbsp;saberFactions,
java.lang.String&nbsp;sound)</pre> java.lang.String&nbsp;sound)</pre>
</li> </li>
</ul> </ul>

View File

@ -143,7 +143,7 @@ implements org.bukkit.event.Listener</pre>
<td class="colFirst"><code><a href="../../../../com/massivecraft/factions/SavageFactions.html" <td class="colFirst"><code><a href="../../../../com/massivecraft/factions/SavageFactions.html"
title="class in com.massivecraft.factions">SavageFactions</a></code></td> title="class in com.massivecraft.factions">SavageFactions</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a <td class="colLast"><code><span class="memberNameLink"><a
href="../../../../com/massivecraft/factions/listeners/FactionsBlockListener.html#savageFactions">savageFactions</a></span></code>&nbsp; href="../../../../com/massivecraft/factions/listeners/FactionsBlockListener.html#saberFactions">saberFactions</a></span></code>&nbsp;
</td> </td>
</tr> </tr>
</table> </table>
@ -163,7 +163,7 @@ implements org.bukkit.event.Listener</pre>
<tr class="altColor"> <tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a <td class="colOne"><code><span class="memberNameLink"><a
href="../../../../com/massivecraft/factions/listeners/FactionsBlockListener.html#FactionsBlockListener-com.massivecraft.factions.SavageFactions-">FactionsBlockListener</a></span>(<a href="../../../../com/massivecraft/factions/listeners/FactionsBlockListener.html#FactionsBlockListener-com.massivecraft.factions.SavageFactions-">FactionsBlockListener</a></span>(<a
href="../../../../com/massivecraft/factions/SavageFactions.html" title="class in com.massivecraft.factions">SavageFactions</a>&nbsp;savageFactions)</code>&nbsp; href="../../../../com/massivecraft/factions/SavageFactions.html" title="class in com.massivecraft.factions">SavageFactions</a>&nbsp;saberFactions)</code>&nbsp;
</td> </td>
</tr> </tr>
</table> </table>
@ -265,14 +265,14 @@ implements org.bukkit.event.Listener</pre>
<pre>public static&nbsp;java.util.HashMap&lt;java.lang.String,org.bukkit.Location&gt; bannerLocations</pre> <pre>public static&nbsp;java.util.HashMap&lt;java.lang.String,org.bukkit.Location&gt; bannerLocations</pre>
</li> </li>
</ul> </ul>
<a name="savageFactions"> <a name="saberFactions">
<!-- --> <!-- -->
</a> </a>
<ul class="blockListLast"> <ul class="blockListLast">
<li class="blockList"> <li class="blockList">
<h4>savageFactions</h4> <h4>saberFactions</h4>
<pre>public&nbsp;<a href="../../../../com/massivecraft/factions/SavageFactions.html" <pre>public&nbsp;<a href="../../../../com/massivecraft/factions/SavageFactions.html"
title="class in com.massivecraft.factions">SavageFactions</a> savageFactions</pre> title="class in com.massivecraft.factions">SavageFactions</a> saberFactions</pre>
</li> </li>
</ul> </ul>
</li> </li>
@ -290,7 +290,7 @@ implements org.bukkit.event.Listener</pre>
<li class="blockList"> <li class="blockList">
<h4>FactionsBlockListener</h4> <h4>FactionsBlockListener</h4>
<pre>public&nbsp;FactionsBlockListener(<a href="../../../../com/massivecraft/factions/SavageFactions.html" <pre>public&nbsp;FactionsBlockListener(<a href="../../../../com/massivecraft/factions/SavageFactions.html"
title="class in com.massivecraft.factions">SavageFactions</a>&nbsp;savageFactions)</pre> title="class in com.massivecraft.factions">SavageFactions</a>&nbsp;saberFactions)</pre>
</li> </li>
</ul> </ul>
</li> </li>

View File

@ -137,7 +137,7 @@ implements org.bukkit.event.Listener</pre>
<td class="colFirst"><code><a href="../../../../com/massivecraft/factions/SavageFactions.html" <td class="colFirst"><code><a href="../../../../com/massivecraft/factions/SavageFactions.html"
title="class in com.massivecraft.factions">SavageFactions</a></code></td> title="class in com.massivecraft.factions">SavageFactions</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a <td class="colLast"><code><span class="memberNameLink"><a
href="../../../../com/massivecraft/factions/listeners/FactionsChatListener.html#savageFactions">savageFactions</a></span></code>&nbsp; href="../../../../com/massivecraft/factions/listeners/FactionsChatListener.html#saberFactions">saberFactions</a></span></code>&nbsp;
</td> </td>
</tr> </tr>
</table> </table>
@ -157,7 +157,7 @@ implements org.bukkit.event.Listener</pre>
<tr class="altColor"> <tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a <td class="colOne"><code><span class="memberNameLink"><a
href="../../../../com/massivecraft/factions/listeners/FactionsChatListener.html#FactionsChatListener-com.massivecraft.factions.SavageFactions-">FactionsChatListener</a></span>(<a href="../../../../com/massivecraft/factions/listeners/FactionsChatListener.html#FactionsChatListener-com.massivecraft.factions.SavageFactions-">FactionsChatListener</a></span>(<a
href="../../../../com/massivecraft/factions/SavageFactions.html" title="class in com.massivecraft.factions">SavageFactions</a>&nbsp;savageFactions)</code>&nbsp; href="../../../../com/massivecraft/factions/SavageFactions.html" title="class in com.massivecraft.factions">SavageFactions</a>&nbsp;saberFactions)</code>&nbsp;
</td> </td>
</tr> </tr>
</table> </table>
@ -205,14 +205,14 @@ implements org.bukkit.event.Listener</pre>
<!-- --> <!-- -->
</a> </a>
<h3>Field Detail</h3> <h3>Field Detail</h3>
<a name="savageFactions"> <a name="saberFactions">
<!-- --> <!-- -->
</a> </a>
<ul class="blockListLast"> <ul class="blockListLast">
<li class="blockList"> <li class="blockList">
<h4>savageFactions</h4> <h4>saberFactions</h4>
<pre>public&nbsp;<a href="../../../../com/massivecraft/factions/SavageFactions.html" <pre>public&nbsp;<a href="../../../../com/massivecraft/factions/SavageFactions.html"
title="class in com.massivecraft.factions">SavageFactions</a> savageFactions</pre> title="class in com.massivecraft.factions">SavageFactions</a> saberFactions</pre>
</li> </li>
</ul> </ul>
</li> </li>
@ -230,7 +230,7 @@ implements org.bukkit.event.Listener</pre>
<li class="blockList"> <li class="blockList">
<h4>FactionsChatListener</h4> <h4>FactionsChatListener</h4>
<pre>public&nbsp;FactionsChatListener(<a href="../../../../com/massivecraft/factions/SavageFactions.html" <pre>public&nbsp;FactionsChatListener(<a href="../../../../com/massivecraft/factions/SavageFactions.html"
title="class in com.massivecraft.factions">SavageFactions</a>&nbsp;savageFactions)</pre> title="class in com.massivecraft.factions">SavageFactions</a>&nbsp;saberFactions)</pre>
</li> </li>
</ul> </ul>
</li> </li>

View File

@ -137,7 +137,7 @@ implements org.bukkit.event.Listener</pre>
<td class="colFirst"><code><a href="../../../../com/massivecraft/factions/SavageFactions.html" <td class="colFirst"><code><a href="../../../../com/massivecraft/factions/SavageFactions.html"
title="class in com.massivecraft.factions">SavageFactions</a></code></td> title="class in com.massivecraft.factions">SavageFactions</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a <td class="colLast"><code><span class="memberNameLink"><a
href="../../../../com/massivecraft/factions/listeners/FactionsEntityListener.html#savageFactions">savageFactions</a></span></code>&nbsp; href="../../../../com/massivecraft/factions/listeners/FactionsEntityListener.html#saberFactions">saberFactions</a></span></code>&nbsp;
</td> </td>
</tr> </tr>
</table> </table>
@ -157,7 +157,7 @@ implements org.bukkit.event.Listener</pre>
<tr class="altColor"> <tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a <td class="colOne"><code><span class="memberNameLink"><a
href="../../../../com/massivecraft/factions/listeners/FactionsEntityListener.html#FactionsEntityListener-com.massivecraft.factions.SavageFactions-">FactionsEntityListener</a></span>(<a href="../../../../com/massivecraft/factions/listeners/FactionsEntityListener.html#FactionsEntityListener-com.massivecraft.factions.SavageFactions-">FactionsEntityListener</a></span>(<a
href="../../../../com/massivecraft/factions/SavageFactions.html" title="class in com.massivecraft.factions">SavageFactions</a>&nbsp;savageFactions)</code>&nbsp; href="../../../../com/massivecraft/factions/SavageFactions.html" title="class in com.massivecraft.factions">SavageFactions</a>&nbsp;saberFactions)</code>&nbsp;
</td> </td>
</tr> </tr>
</table> </table>
@ -276,14 +276,14 @@ implements org.bukkit.event.Listener</pre>
<!-- --> <!-- -->
</a> </a>
<h3>Field Detail</h3> <h3>Field Detail</h3>
<a name="savageFactions"> <a name="saberFactions">
<!-- --> <!-- -->
</a> </a>
<ul class="blockListLast"> <ul class="blockListLast">
<li class="blockList"> <li class="blockList">
<h4>savageFactions</h4> <h4>saberFactions</h4>
<pre>public&nbsp;<a href="../../../../com/massivecraft/factions/SavageFactions.html" <pre>public&nbsp;<a href="../../../../com/massivecraft/factions/SavageFactions.html"
title="class in com.massivecraft.factions">SavageFactions</a> savageFactions</pre> title="class in com.massivecraft.factions">SavageFactions</a> saberFactions</pre>
</li> </li>
</ul> </ul>
</li> </li>
@ -301,7 +301,7 @@ implements org.bukkit.event.Listener</pre>
<li class="blockList"> <li class="blockList">
<h4>FactionsEntityListener</h4> <h4>FactionsEntityListener</h4>
<pre>public&nbsp;FactionsEntityListener(<a href="../../../../com/massivecraft/factions/SavageFactions.html" <pre>public&nbsp;FactionsEntityListener(<a href="../../../../com/massivecraft/factions/SavageFactions.html"
title="class in com.massivecraft.factions">SavageFactions</a>&nbsp;savageFactions)</pre> title="class in com.massivecraft.factions">SavageFactions</a>&nbsp;saberFactions)</pre>
</li> </li>
</ul> </ul>
</li> </li>

View File

@ -135,7 +135,7 @@ implements org.bukkit.event.Listener</pre>
<tr class="altColor"> <tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a <td class="colOne"><code><span class="memberNameLink"><a
href="../../../../com/massivecraft/factions/listeners/FactionsPlayerListener.html#FactionsPlayerListener-com.massivecraft.factions.SavageFactions-">FactionsPlayerListener</a></span>(<a href="../../../../com/massivecraft/factions/listeners/FactionsPlayerListener.html#FactionsPlayerListener-com.massivecraft.factions.SavageFactions-">FactionsPlayerListener</a></span>(<a
href="../../../../com/massivecraft/factions/SavageFactions.html" title="class in com.massivecraft.factions">SavageFactions</a>&nbsp;savageFactions)</code>&nbsp; href="../../../../com/massivecraft/factions/SavageFactions.html" title="class in com.massivecraft.factions">SavageFactions</a>&nbsp;saberFactions)</code>&nbsp;
</td> </td>
</tr> </tr>
</table> </table>
@ -290,7 +290,7 @@ implements org.bukkit.event.Listener</pre>
<li class="blockList"> <li class="blockList">
<h4>FactionsPlayerListener</h4> <h4>FactionsPlayerListener</h4>
<pre>public&nbsp;FactionsPlayerListener(<a href="../../../../com/massivecraft/factions/SavageFactions.html" <pre>public&nbsp;FactionsPlayerListener(<a href="../../../../com/massivecraft/factions/SavageFactions.html"
title="class in com.massivecraft.factions">SavageFactions</a>&nbsp;savageFactions)</pre> title="class in com.massivecraft.factions">SavageFactions</a>&nbsp;saberFactions)</pre>
</li> </li>
</ul> </ul>
</li> </li>

View File

@ -86,19 +86,19 @@
<dt><span class="memberNameLink"><a href="../com/massivecraft/factions/Conf.html#safeZonePreventAllDamageToPlayers">safeZonePreventAllDamageToPlayers</a></span> - Static variable in class com.massivecraft.factions.<a href="../com/massivecraft/factions/Conf.html" title="class in com.massivecraft.factions">Conf</a></dt> <dt><span class="memberNameLink"><a href="../com/massivecraft/factions/Conf.html#safeZonePreventAllDamageToPlayers">safeZonePreventAllDamageToPlayers</a></span> - Static variable in class com.massivecraft.factions.<a href="../com/massivecraft/factions/Conf.html" title="class in com.massivecraft.factions">Conf</a></dt>
<dd>&nbsp;</dd> <dd>&nbsp;</dd>
<dt><span class="memberNameLink"><a <dt><span class="memberNameLink"><a
href="../com/massivecraft/factions/listeners/FactionsBlockListener.html#savageFactions">savageFactions</a></span> href="../com/massivecraft/factions/listeners/FactionsBlockListener.html#saberFactions">saberFactions</a></span>
- Variable in class com.massivecraft.factions.listeners.<a - Variable in class com.massivecraft.factions.listeners.<a
href="../com/massivecraft/factions/listeners/FactionsBlockListener.html" href="../com/massivecraft/factions/listeners/FactionsBlockListener.html"
title="class in com.massivecraft.factions.listeners">FactionsBlockListener</a></dt> title="class in com.massivecraft.factions.listeners">FactionsBlockListener</a></dt>
<dd>&nbsp;</dd> <dd>&nbsp;</dd>
<dt><span class="memberNameLink"><a <dt><span class="memberNameLink"><a
href="../com/massivecraft/factions/listeners/FactionsChatListener.html#savageFactions">savageFactions</a></span> href="../com/massivecraft/factions/listeners/FactionsChatListener.html#saberFactions">saberFactions</a></span>
- Variable in class com.massivecraft.factions.listeners.<a - Variable in class com.massivecraft.factions.listeners.<a
href="../com/massivecraft/factions/listeners/FactionsChatListener.html" href="../com/massivecraft/factions/listeners/FactionsChatListener.html"
title="class in com.massivecraft.factions.listeners">FactionsChatListener</a></dt> title="class in com.massivecraft.factions.listeners">FactionsChatListener</a></dt>
<dd>&nbsp;</dd> <dd>&nbsp;</dd>
<dt><span class="memberNameLink"><a <dt><span class="memberNameLink"><a
href="../com/massivecraft/factions/listeners/FactionsEntityListener.html#savageFactions">savageFactions</a></span> href="../com/massivecraft/factions/listeners/FactionsEntityListener.html#saberFactions">saberFactions</a></span>
- Variable in class com.massivecraft.factions.listeners.<a - Variable in class com.massivecraft.factions.listeners.<a
href="../com/massivecraft/factions/listeners/FactionsEntityListener.html" href="../com/massivecraft/factions/listeners/FactionsEntityListener.html"
title="class in com.massivecraft.factions.listeners">FactionsEntityListener</a></dt> title="class in com.massivecraft.factions.listeners">FactionsEntityListener</a></dt>

View File

@ -330,7 +330,7 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>net.coreprotect</groupId> <groupId>net.coreprotect</groupId>
<artifactId>coreprotect</artifactId> <artifactId>CoreProtect</artifactId>
<version>2</version> <version>2</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>

View File

@ -0,0 +1,70 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.FPlayer;
import com.massivecraft.factions.SaberFactions;
import com.massivecraft.factions.struct.Permission;
import com.massivecraft.factions.struct.Role;
import com.massivecraft.factions.zcore.fperms.Access;
import com.massivecraft.factions.zcore.fperms.PermissableAction;
import com.massivecraft.factions.zcore.util.TL;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.inventory.Inventory;
import java.util.ArrayList;
import java.util.Objects;
public class CmdInventorySee extends FCommand {
public CmdInventorySee() {
super();
this.aliases.add("invsee");
this.aliases.add("inventorysee");
this.requiredArgs.add("member name");
this.permission = Permission.INVSEE.node;
this.disableOnLock = true;
this.disableOnSpam = false;
senderMustBePlayer = true;
senderMustBeMember = true;
senderMustBeModerator = false;
senderMustBeColeader = false;
senderMustBeAdmin = false;
}
@Override
public void perform() {
if (SaberFactions.plugin.getConfig().getBoolean("f-inventory-see.Enabled")) {
fme.msg(TL.GENERIC_DISABLED);
}
Access use = myFaction.getAccess(fme, PermissableAction.TERRITORY);
if (use == Access.DENY || (use == Access.UNDEFINED && !assertMinRole(Role.MODERATOR))) {
fme.msg(TL.GENERIC_NOPERMISSION, "territory");
return;
}
ArrayList<Player> fplayers = myFaction.getOnlinePlayers();
FPlayer targetInv = argAsFPlayer(0);
if (targetInv == null || !fplayers.contains(targetInv.getPlayer())) {
fme.msg(TL.PLAYER_NOT_FOUND, Objects.requireNonNull(targetInv).toString());
return;
}
Inventory inventory = Bukkit.createInventory(me, 36, targetInv.getName() + "'s Inventory");
for (int i = 0; i < 36; i++)
if (targetInv.getPlayer().getInventory().getItem(i) != null)
inventory.setItem(i, targetInv.getPlayer().getInventory().getItem(i));
me.openInventory(inventory);
}
@Override
public TL getUsageTranslation() {
return TL.COMMAND_INVENTORYSEE_DESCRIPTION;
}
}

View File

@ -110,6 +110,7 @@ public class FCmdRoot extends FCommand {
public CmdAlts cmdAlts = new CmdAlts(); public CmdAlts cmdAlts = new CmdAlts();
public CmdSpam cmdSpam = new CmdSpam(); public CmdSpam cmdSpam = new CmdSpam();
public CmdCorner cmdCorner = new CmdCorner(); public CmdCorner cmdCorner = new CmdCorner();
public CmdInventorySee cmdInventorySee = new CmdInventorySee();
@ -228,6 +229,10 @@ public class FCmdRoot extends FCommand {
this.addSubCommand(this.cmdCorner); this.addSubCommand(this.cmdCorner);
if (SaberFactions.plugin.getConfig().getBoolean("f-inventory-see.Enabled")) {
this.addSubCommand(this.cmdInventorySee);
}
if(SaberFactions.plugin.getConfig().getBoolean("f-alts.Enabled")){ if(SaberFactions.plugin.getConfig().getBoolean("f-alts.Enabled")){
this.addSubCommand(cmdAlts); this.addSubCommand(cmdAlts);
} }

View File

@ -668,6 +668,17 @@ public class FactionsPlayerListener implements Listener {
} }
} }
@EventHandler
public void onInentorySee(InventoryClickEvent e) {
if (e.getCurrentItem() == null)
return;
if (!e.getInventory().getName().endsWith("'s Inventory View"))
return;
e.setCancelled(true);
}
@EventHandler @EventHandler
public void onPlayerBoneMeal(PlayerInteractEvent event) { public void onPlayerBoneMeal(PlayerInteractEvent event) {
Block block = event.getClickedBlock(); Block block = event.getClickedBlock();

View File

@ -37,6 +37,7 @@ public enum Permission {
HELP("help"), HELP("help"),
HOME("home"), HOME("home"),
INVITE("invite"), INVITE("invite"),
INVSEE("invsee"),
JOIN("join"), JOIN("join"),
JOIN_ANY("join.any"), JOIN_ANY("join.any"),
JOIN_OTHERS("join.others"), JOIN_OTHERS("join.others"),

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2018 ProSavage * Copyright (C) 2019 Driftay
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -351,6 +351,8 @@ public enum TL {
COMMAND_HOME_DESCRIPTION("Teleport to the faction home"), COMMAND_HOME_DESCRIPTION("Teleport to the faction home"),
COMMAND_HOME_BLOCKED("&c&l[!] You may not teleport to a home that is claimed by &b%1$s"), COMMAND_HOME_BLOCKED("&c&l[!] You may not teleport to a home that is claimed by &b%1$s"),
COMMAND_INVENTORYSEE_DESCRIPTION("View a faction members inventory"),
COMMAND_INSPECT_DISABLED_MSG("&c&l[!]&7 Inspect mode is now &cdisabled."), COMMAND_INSPECT_DISABLED_MSG("&c&l[!]&7 Inspect mode is now &cdisabled."),
COMMAND_INSPECT_DISABLED_NOFAC("&c&l[!]&7 Inspect mode is now &cdisabled,&7 because you &cdo not have a faction!"), COMMAND_INSPECT_DISABLED_NOFAC("&c&l[!]&7 Inspect mode is now &cdisabled,&7 because you &cdo not have a faction!"),
COMMAND_INSPECT_ENABLED("&c&l[!]&7 Inspect mode is now &aEnabled."), COMMAND_INSPECT_ENABLED("&c&l[!]&7 Inspect mode is now &aEnabled."),
@ -899,6 +901,8 @@ public enum TL {
GENERIC_MONEYTAKE("&c{amount} has been taken from your account."), GENERIC_MONEYTAKE("&c{amount} has been taken from your account."),
PLAYER_NOT_FOUND("&c&l[!] &b%1$s &7is either not online or not in your faction!"),
WARBANNER_NOFACTION("&cYou need a faction to use a warbanner!"), WARBANNER_NOFACTION("&cYou need a faction to use a warbanner!"),
WARBANNER_COOLDOWN("&cThe warbanner is on cooldown for your faction!"), WARBANNER_COOLDOWN("&cThe warbanner is on cooldown for your faction!"),
WARBANNER_INVALIDLOC("&cYou can only use warbanners in enemy land or the warzone"), WARBANNER_INVALIDLOC("&cYou can only use warbanners in enemy land or the warzone"),

View File

@ -1,7 +1,7 @@
# SaberFactions by Driftay # SaberFactions by Driftay
# Report issues: https://github.com/Driftay/SaberFactions/issues/new # Report issues: https://github.com/Driftay/SaberFactions/issues/new
# Live support: https://discord.gg/22AQtX7 # Live support: https://discord.gg/TFxWKeX
# Spigot Site: https://www.spigotmc.org/resources/savagefactions-factionsuuid-reimagined-1-7-1-12.52891/ # Spigot Site: https://www.spigotmc.org/resources/saberfactions-1-7-1-13-the-complete-factions-solution.68840/
# Website: https://www.saberllc.net/ # Website: https://www.saberllc.net/
# Jenkins: https://jenkins.saberllc.net/ # Jenkins: https://jenkins.saberllc.net/
@ -711,7 +711,13 @@ faction-disband-broadcast: true
############################################################ ############################################################
See-Invisible-Faction-Members: false See-Invisible-Faction-Members: false
############################################################
# +------------------------------------------------------+ #
# | Faction Inventory See | #
# +------------------------------------------------------+ #
############################################################
f-inventory-see:
Enabled: true
############################################################ ############################################################
# +------------------------------------------------------+ # # +------------------------------------------------------+ #
# | Faction Alt Accounts | # # | Faction Alt Accounts | #