[Version 0.7.5.11]

- PEX now returns accurate results without requiring use of the bridge.
- We are now LGPL
This commit is contained in:
Steven Scott
2012-03-09 23:27:34 -08:00
parent 1ba8c723de
commit f898e1f00c
20 changed files with 1156 additions and 71 deletions

View File

@ -6,10 +6,23 @@ import org.bukkit.World;
import org.bukkit.block.Block;
/**
* Blox.java
* @author Shaun (sturmeh)
* @author Dinnerbone
* @author Steven "Drakia" Scott
* Stargate - A portal plugin for Bukkit
* Copyright (C) 2011 Shaun (sturmeh)
* Copyright (C) 2011 Dinnerbone
* Copyright (C) 2011, 2012 Steven "Drakia" Scott <Contact@TheDgtl.net>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
public class Blox {

View File

@ -15,10 +15,23 @@ import org.bukkit.Material;
import org.bukkit.block.Block;
/**
* Gate.java
* @author Shaun (sturmeh)
* @author Dinnerbone
* @author Steven "Drakia" Scott
* Stargate - A portal plugin for Bukkit
* Copyright (C) 2011 Shaun (sturmeh)
* Copyright (C) 2011 Dinnerbone
* Copyright (C) 2011, 2012 Steven "Drakia" Scott <Contact@TheDgtl.net>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
public class Gate {

View File

@ -11,6 +11,24 @@ import java.io.OutputStreamWriter;
import java.util.HashMap;
import java.util.Set;
/**
* Stargate - A portal plugin for Bukkit
* Copyright (C) 2011, 2012 Steven "Drakia" Scott <Contact@TheDgtl.net>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
public class LangLoader {
private String UTF8_BOM = "\uFEFF";
// Variables

View File

@ -34,10 +34,23 @@ import org.bukkit.material.MaterialData;
import org.bukkit.util.Vector;
/**
* Portal.java
* @author Shaun (sturmeh)
* @author Dinnerbone
* @author Steven "Drakia" Scott
* Stargate - A portal plugin for Bukkit
* Copyright (C) 2011 Shaun (sturmeh)
* Copyright (C) 2011 Dinnerbone
* Copyright (C) 2011, 2012 Steven "Drakia" Scott <Contact@TheDgtl.net>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
public class Portal {

View File

@ -1,31 +1,45 @@
package net.TheDgtl.Stargate;
/**
* RelativeBlockVector.java
* @author Shaun (sturmeh)
* @author Dinnerbone
* @author Steven "Drakia" Scott
*/
public class RelativeBlockVector {
private int right = 0;
private int depth = 0;
private int distance = 0;
public RelativeBlockVector(int right, int depth, int distance) {
this.right = right;
this.depth = depth;
this.distance = distance;
}
public int getRight() {
return right;
}
public int getDepth() {
return depth;
}
public int getDistance() {
return distance;
}
}
package net.TheDgtl.Stargate;
/**
* Stargate - A portal plugin for Bukkit
* Copyright (C) 2011 Shaun (sturmeh)
* Copyright (C) 2011 Dinnerbone
* Copyright (C) 2011, 2012 Steven "Drakia" Scott <Contact@TheDgtl.net>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
public class RelativeBlockVector {
private int right = 0;
private int depth = 0;
private int distance = 0;
public RelativeBlockVector(int right, int depth, int distance) {
this.right = right;
this.depth = depth;
this.distance = distance;
}
public int getRight() {
return right;
}
public int getDepth() {
return depth;
}
public int getDistance() {
return distance;
}
}

View File

@ -49,11 +49,25 @@ import org.bukkit.plugin.java.JavaPlugin;
import com.nijikokun.bukkit.Permissions.Permissions;
/**
* Stargate.java - A customizeable portal plugin for Bukkit
* @author Shaun (sturmeh)
* @author Dinnerbone
* @author Steven "Drakia" Scott
* Stargate - A portal plugin for Bukkit
* Copyright (C) 2011 Shaun (sturmeh)
* Copyright (C) 2011 Dinnerbone
* Copyright (C) 2011, 2012 Steven "Drakia" Scott <Contact@TheDgtl.net>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@SuppressWarnings("unused")
public class Stargate extends JavaPlugin {
// Permissions
@ -127,12 +141,8 @@ public class Stargate extends JavaPlugin {
// Check to see if iConomy/Permissions is loaded yet.
permissions = (Permissions)checkPlugin("Permissions");
if (permissions != null && (permissions.getDescription().getVersion().equals("2.7.2") || permissions.getDescription().getVersion().equals("2.7.7"))) {
if (pm.getPlugin("PermissionsEx") != null) {
log.info("[Stargate] Found PEX, main plugin is built of fail, use bridge");
} else {
log.info("[Stargate] Permissions is 2.7.2/2.7.7, most likely a bridge, disabling.");
permissions = null;
}
log.info("[Stargate] Permissions is 2.7.2/2.7.7, most likely a bridge, disabling.");
permissions = null;
}
if (iConomyHandler.setupeConomy(pm)) {
if (iConomyHandler.register != null)
@ -142,10 +152,6 @@ public class Stargate extends JavaPlugin {
}
getServer().getScheduler().scheduleSyncRepeatingTask(this, new SGThread(), 0L, 100L);
if (pm.getPlugin("PermissionsEx") != null && pm.getPlugin("Permissions") == null) {
log.warning("[Stargate] Stargate is not guaranteed to work with PEX without the Permissions Bridge. Please do not request support unless you switch to a real Permissions handler.");
}
}
public void loadConfig() {
@ -1102,16 +1108,10 @@ public class Stargate extends JavaPlugin {
if (permissions == null) {
PluginDescriptionFile desc = event.getPlugin().getDescription();
if (desc.getName().equalsIgnoreCase("Permissions")) {
if (pm.getPlugin("PermissionsEx") == null) {
if (desc.getVersion().equals("2.7.2") || desc.getVersion().equals("2.7.7")) {
log.info("[Stargate] Permissions is 2.7.2/2.7.7, most likely a bridge, disabling.");
return;
}
} else {
log.info("[Stargate] Found PEX. Main plugin is built of fail. Use bridge instead");
if (desc.getVersion().equals("2.7.2") || desc.getVersion().equals("2.7.7")) {
log.info("[Stargate] Permissions is 2.7.2/2.7.7, most likely a bridge, disabling.");
return;
}
permissions = (Permissions)checkPlugin(event.getPlugin());
}
}

View File

@ -5,6 +5,24 @@ import org.bukkit.event.HandlerList;
import net.TheDgtl.Stargate.Portal;
/**
* Stargate - A portal plugin for Bukkit
* Copyright (C) 2011, 2012 Steven "Drakia" Scott <Contact@TheDgtl.net>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
public class StargateAccessEvent extends StargateEvent {
private Player player;
private boolean deny;

View File

@ -5,6 +5,24 @@ import org.bukkit.event.HandlerList;
import net.TheDgtl.Stargate.Portal;
/**
* Stargate - A portal plugin for Bukkit
* Copyright (C) 2011, 2012 Steven "Drakia" Scott <Contact@TheDgtl.net>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
public class StargateActivateEvent extends StargateEvent {
Player player;

View File

@ -4,6 +4,24 @@ import org.bukkit.event.HandlerList;
import net.TheDgtl.Stargate.Portal;
/**
* Stargate - A portal plugin for Bukkit
* Copyright (C) 2011, 2012 Steven "Drakia" Scott <Contact@TheDgtl.net>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
public class StargateCloseEvent extends StargateEvent {
private boolean force;

View File

@ -4,6 +4,24 @@ import net.TheDgtl.Stargate.Portal;
import org.bukkit.entity.Player;
import org.bukkit.event.HandlerList;
/**
* Stargate - A portal plugin for Bukkit
* Copyright (C) 2011, 2012 Steven "Drakia" Scott <Contact@TheDgtl.net>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
public class StargateCreateEvent extends StargateEvent {
private Player player;
private boolean deny;

View File

@ -4,6 +4,24 @@ import org.bukkit.event.HandlerList;
import net.TheDgtl.Stargate.Portal;
/**
* Stargate - A portal plugin for Bukkit
* Copyright (C) 2011, 2012 Steven "Drakia" Scott <Contact@TheDgtl.net>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
public class StargateDeactivateEvent extends StargateEvent {
private static final HandlerList handlers = new HandlerList();

View File

@ -4,6 +4,24 @@ import net.TheDgtl.Stargate.Portal;
import org.bukkit.entity.Player;
import org.bukkit.event.HandlerList;
/**
* Stargate - A portal plugin for Bukkit
* Copyright (C) 2011, 2012 Steven "Drakia" Scott <Contact@TheDgtl.net>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
public class StargateDestroyEvent extends StargateEvent {
private Player player;
private boolean deny;

View File

@ -5,6 +5,24 @@ import net.TheDgtl.Stargate.Portal;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
/**
* Stargate - A portal plugin for Bukkit
* Copyright (C) 2011, 2012 Steven "Drakia" Scott <Contact@TheDgtl.net>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
public abstract class StargateEvent extends Event implements Cancellable {
protected Portal portal;
protected boolean cancelled;

View File

@ -5,6 +5,24 @@ import net.TheDgtl.Stargate.Portal;
import org.bukkit.entity.Player;
import org.bukkit.event.HandlerList;
/**
* Stargate - A portal plugin for Bukkit
* Copyright (C) 2011, 2012 Steven "Drakia" Scott <Contact@TheDgtl.net>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
public class StargateOpenEvent extends StargateEvent {
private Player player;
private boolean force;

View File

@ -6,6 +6,24 @@ import org.bukkit.Location;
import org.bukkit.entity.Player;
import org.bukkit.event.HandlerList;
/**
* Stargate - A portal plugin for Bukkit
* Copyright (C) 2011, 2012 Steven "Drakia" Scott <Contact@TheDgtl.net>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
public class StargatePortalEvent extends StargateEvent {
private Player player;
private Portal destination;

View File

@ -13,8 +13,21 @@ import com.nijikokun.register.payment.Method.MethodAccount;
import com.nijikokun.register.payment.Methods;
/**
* iConomyHandler.java
* @author Steven "Drakia" Scott
* Stargate - A portal plugin for Bukkit
* Copyright (C) 2011, 2012 Steven "Drakia" Scott <Contact@TheDgtl.net>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
public class iConomyHandler {

View File

@ -1,6 +1,6 @@
name: Stargate
main: net.TheDgtl.Stargate.Stargate
version: 0.7.5.10
version: 0.7.5.11
description: Stargate mod for Bukkit
author: Drakia
website: http://www.thedgtl.net