License change.

This commit is contained in:
Drakia 2011-07-02 20:03:42 -07:00
parent 3d898ba2b5
commit 49c77a0d7d
9 changed files with 60 additions and 5 deletions

4
README
View File

@ -130,8 +130,10 @@ maxgates - If non-zero, will define the maximum amount of gates allowed on a net
=============
Changes
=============
[Version 0.5.0b]
[Version 0.5.0]
- Updated the teleport method
- Remove always-open gates from lists
- Hopefully stop Stargate and Nether interference
[Version 0.4.9]
- Left-click to scroll signs up
- Show "(Not Connected)" on fixed-gates with a non-existant destination

View File

@ -4,6 +4,13 @@ import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.block.Block;
/**
* Blox.java
* @author Shaun (sturmeh)
* @author Dinnerbone
* @author Steven "Drakia" Scott
*/
public class Blox {
private int x;
private int y;

View File

@ -15,10 +15,12 @@ import org.bukkit.Material;
import org.bukkit.block.Block;
/**
* Gate.java - Plug-in for hey0's minecraft mod.
* Gate.java
* @author Shaun (sturmeh)
* @author Dinnerbone
* @author Steven "Drakia" Scott
*/
public class Gate {
public static final int ANYTHING = -1;
public static final int ENTRANCE = -2;

View File

@ -25,10 +25,12 @@ import org.bukkit.material.MaterialData;
import org.bukkit.util.Vector;
/**
* Portal.java - Plug-in for hey0's minecraft mod.
* Portal.java
* @author Shaun (sturmeh)
* @author Dinnerbone
* @author Steven "Drakia" Scott
*/
public class Portal {
// Variables used to store portal lists
private static final HashMap<Blox, Portal> lookupBlocks = new HashMap<Blox, Portal>();
@ -356,6 +358,8 @@ public class Portal {
activePlayer = player;
for (String dest : allPortalsNet.get(getNetwork().toLowerCase())) {
Portal portal = getByName(dest, getNetwork());
// Check if dest is always open (Don't show if so)
if (portal.isAlwaysOn()) continue;
// Check if this player can access the dest world
if (Stargate.worldFilter && !Stargate.hasPerm(player, "stargate.world." + portal.getWorld().getName(), player.isOp())) continue;
// Check if dest is this portal

View File

@ -1,9 +1,10 @@
package net.TheDgtl.Stargate;
/**
* RelativeBlockVector.java - Plug-in for hey0's minecraft mod.
* RelativeBlockVector.java
* @author Shaun (sturmeh)
* @author Dinnerbone
* @author Steven "Drakia" Scott
*/
public class RelativeBlockVector {
private int right = 0;

View File

@ -7,6 +7,13 @@ import org.bukkit.block.Block;
import org.bukkit.block.BlockState;
import org.bukkit.block.Sign;
/**
* SignPost.java
* @author Shaun (sturmeh)
* @author Dinnerbone
* @author Steven "Drakia" Scott
*/
public class SignPost {
private Blox parent;
private Blox block;

View File

@ -7,6 +7,7 @@ import java.util.logging.Level;
import java.util.logging.Logger;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Server;
import org.bukkit.World;
@ -30,6 +31,7 @@ import org.bukkit.event.entity.EntityListener;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerListener;
import org.bukkit.event.player.PlayerMoveEvent;
import org.bukkit.event.player.PlayerPortalEvent;
import org.bukkit.event.server.PluginDisableEvent;
import org.bukkit.event.server.PluginEnableEvent;
import org.bukkit.event.server.ServerListener;
@ -138,6 +140,9 @@ public class Stargate extends JavaPlugin {
//pm.registerEvent(Event.Type.ENTITY_DAMAGE, entityListener, Priority.Normal, this);
//pm.registerEvent(Event.Type.ENTITY_COMBUST, entityListener, Priority.Normal, this);
// Used to disable built-in portal for Stargates
pm.registerEvent(Event.Type.PLAYER_PORTAL, playerListener, Priority.Normal, this);
// Dependency Loading
pm.registerEvent(Event.Type.PLUGIN_ENABLE, serverListener, Priority.Monitor, this);
pm.registerEvent(Event.Type.PLUGIN_DISABLE, serverListener, Priority.Monitor, this);
@ -368,6 +373,28 @@ public class Stargate extends JavaPlugin {
}
private class pListener extends PlayerListener {
@Override
public void onPlayerPortal(PlayerPortalEvent event) {
// Do a quick check for a stargate
Location from = event.getFrom();
World world = from.getWorld();
int cX = from.getBlockX();
int cY = from.getBlockY();
int cZ = from.getBlockZ();
for (int i = 0; i < 3; i++) {
for (int j = 0; j < 3; j++) {
for (int k = 0; k < 3; k++) {
Block b = world.getBlockAt(cX + i, cY + j, cZ + k);
if (b.getType() != Material.PORTAL) continue;
Portal portal = Portal.getByEntrance(b);
if (portal != null) {
event.setCancelled(true);
return;
}
}
}
}
}
@Override
public void onPlayerMove(PlayerMoveEvent event) {
Player player = event.getPlayer();

View File

@ -4,6 +4,11 @@ import com.iConomy.*;
import com.iConomy.system.Account;
import com.iConomy.system.Holdings;
/**
* iConomyHandler.java
* @author Steven "Drakia" Scott
*/
public class iConomyHandler {
public static String pName = "Stargate";
public static boolean useiConomy = false;

View File

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