001/* 002 * Trident - A Multithreaded Server Alternative 003 * Copyright 2014 The TridentSDK Team 004 * 005 * Licensed under the Apache License, Version 2.0 (the "License"); 006 * you may not use this file except in compliance with the License. 007 * You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017package net.tridentsdk.world; 018 019import net.tridentsdk.util.Pair; 020 021import javax.annotation.concurrent.ThreadSafe; 022 023/** 024 * Access to the world border properties 025 * 026 * @author The TridentSDK Team 027 * @since 0.4-alpha 028 * @deprecated the world border is deprecated because the units which are used are unclear and are subject to change at 029 * any time. Use at your own risk. 030 */ 031@ThreadSafe 032@Deprecated 033public interface WorldBorder { 034 /** 035 * Gets the size of the worldborder 036 * 037 * @return The size of the worldborder 038 */ 039 int size(); 040 041 /** 042 * Modifies the border square's length and width 043 * 044 * @param mod a positive integer to indicate an expansion by that amount, a negative to indicate a regression by 045 * that amount 046 * @param time the time over which the border will expand or contract, 0 to apply immediately 047 */ 048 void modify(int mod, int time); 049 050 /** 051 * Gets the position where the worldborder is centered 052 * 053 * <p>The returned immutable pair of integers represents the X and Y coordinates respectively</p> 054 * 055 * @return The position where the worldborder is centered 056 */ 057 Pair<Integer, Integer> center(); 058 059 /** 060 * Sets the center X and Z coordinates for the border 061 * 062 * @param x the X coordinate 063 * @param z the Z coordinate 064 */ 065 void setCenter(int x, int z); 066 067 /** 068 * Gets to what size a border is contracting, 60000000 by default 069 * 070 * @return To what size a border is contracting, 60000000 by default 071 */ 072 int sizeContraction(); 073 074 /** 075 * Gets the time the border has to contract to the contraction target 076 * 077 * @return The time the border has to contract to the contraction target 078 */ 079 int contractionTime(); 080}