Fixed an issue with personal gates
Added default permissions
This commit is contained in:
parent
c8764c6091
commit
2d9283fa7d
13
README
13
README
@ -41,6 +41,16 @@ stargate.admin -- Allow all admin features (Hidden/Private only so far)
|
|||||||
stargate.admin.private -- Allow use of Private gates not owned by user
|
stargate.admin.private -- Allow use of Private gates not owned by user
|
||||||
stargate.admin.hidden -- Allow access to Hidden gates not ownerd by user
|
stargate.admin.hidden -- Allow access to Hidden gates not ownerd by user
|
||||||
|
|
||||||
|
=============
|
||||||
|
Default Permissions
|
||||||
|
=============
|
||||||
|
stargate.use -- Everyone
|
||||||
|
stargate.create -- Op
|
||||||
|
stargate.destroy -- Op
|
||||||
|
stargate.option -- Op
|
||||||
|
stargate.free -- Op
|
||||||
|
stargate.admin -- Op
|
||||||
|
|
||||||
=============
|
=============
|
||||||
Instructions
|
Instructions
|
||||||
=============
|
=============
|
||||||
@ -146,6 +156,9 @@ maxgates - If non-zero, will define the maximum amount of gates allowed on any n
|
|||||||
=============
|
=============
|
||||||
Changes
|
Changes
|
||||||
=============
|
=============
|
||||||
|
[Version 0.6.2]
|
||||||
|
- Fixed an issue with private gates
|
||||||
|
- Added default permissions
|
||||||
[Version 0.6.1]
|
[Version 0.6.1]
|
||||||
- Stop destruction of open gates on startup
|
- Stop destruction of open gates on startup
|
||||||
[Version 0.6.0]
|
[Version 0.6.0]
|
||||||
|
@ -754,7 +754,10 @@ public class Portal {
|
|||||||
// Check if the player can create gates on this network
|
// Check if the player can create gates on this network
|
||||||
if (!Stargate.canCreate(player, network)) {
|
if (!Stargate.canCreate(player, network)) {
|
||||||
Stargate.debug("createPortal", "Player doesn't have create permissions on network. Trying personal");
|
Stargate.debug("createPortal", "Player doesn't have create permissions on network. Trying personal");
|
||||||
network = player.getName().substring(0, 11);
|
network = player.getName();
|
||||||
|
if (network.length() > 11) {
|
||||||
|
network = network.substring(0, 11);
|
||||||
|
}
|
||||||
|
|
||||||
// Check if we can create a gate on our own network
|
// Check if we can create a gate on our own network
|
||||||
if (!Stargate.canCreate(player, network)) {
|
if (!Stargate.canCreate(player, network)) {
|
||||||
|
@ -432,7 +432,9 @@ public class Stargate extends JavaPlugin {
|
|||||||
if (hasPerm(player, "stargate.create.network." + network)) return true;
|
if (hasPerm(player, "stargate.create.network." + network)) return true;
|
||||||
|
|
||||||
// Check if this is a personal gate, and if the player has create.personal
|
// Check if this is a personal gate, and if the player has create.personal
|
||||||
if (player.getName().substring(0, 11).equalsIgnoreCase(network) && hasPerm(player, "stargate.create.personal")) return true;
|
String pNet = player.getName();
|
||||||
|
if (pNet.length() > 11) pNet = pNet.substring(0, 11);
|
||||||
|
if (pNet.equalsIgnoreCase(network) && hasPerm(player, "stargate.create.personal")) return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
name: Stargate
|
name: Stargate
|
||||||
main: net.TheDgtl.Stargate.Stargate
|
main: net.TheDgtl.Stargate.Stargate
|
||||||
version: 0.6.1
|
version: 0.6.2
|
||||||
description: Stargate mod for Bukkit
|
description: Stargate mod for Bukkit
|
||||||
author: Drakia
|
author: Drakia
|
||||||
website: http://www.thedgtl.net
|
website: http://www.thedgtl.net
|
||||||
@ -8,3 +8,22 @@ commands:
|
|||||||
sg:
|
sg:
|
||||||
description: Used to reload the plugin. Console use only.
|
description: Used to reload the plugin. Console use only.
|
||||||
usage: /<command> reload - Used to reload the plugin. Console use only.
|
usage: /<command> reload - Used to reload the plugin. Console use only.
|
||||||
|
permissions:
|
||||||
|
stargate.use:
|
||||||
|
description: Allow use of all gates linking to any world in any network
|
||||||
|
default: true
|
||||||
|
stargate.create:
|
||||||
|
description: Allow creating gates on any network
|
||||||
|
default: op
|
||||||
|
stargate.destroy:
|
||||||
|
description: Allow destruction gates on any network
|
||||||
|
default: op
|
||||||
|
stargate.free:
|
||||||
|
description: Allow free use/creation/destruction of gates
|
||||||
|
default: op
|
||||||
|
stargate.option:
|
||||||
|
description: Allow use of all options
|
||||||
|
default: op
|
||||||
|
stargate.admin:
|
||||||
|
description: Allow all admin features (Hidden/Private only so far)
|
||||||
|
default: op
|
Loading…
Reference in New Issue
Block a user