-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b5619a8
commit 393352d
Showing
13 changed files
with
286 additions
and
305 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/de/cuuky/varo/game/world/border/DefaultVaroBorder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package de.cuuky.varo.game.world.border; | ||
|
||
import org.bukkit.Location; | ||
import org.bukkit.World; | ||
|
||
public class DefaultVaroBorder implements RectangularVaroBorder { | ||
|
||
private final World world; | ||
|
||
public DefaultVaroBorder(World world) { | ||
this.world = world; | ||
} | ||
|
||
@Override | ||
public double getSize() { | ||
return this.world.getWorldBorder().getSize(); | ||
} | ||
|
||
@Override | ||
public void setSize(double size, long time) { | ||
this.world.getWorldBorder().setSize(size, time); | ||
} | ||
|
||
@Override | ||
public Location getCenter() { | ||
return this.world.getWorldBorder().getCenter(); | ||
} | ||
|
||
@Override | ||
public void setCenter(Location location) { | ||
this.world.getWorldBorder().setCenter(location); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/* | ||
* VaroPlugin | ||
* Copyright (C) 2022 Cuuky, Almighty-Satan | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero 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 Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package de.cuuky.varo.game.world.border; | ||
|
||
import org.bukkit.Location; | ||
import org.bukkit.World; | ||
|
||
public class NopVaroBorder implements VaroBorder { | ||
|
||
private final World world; | ||
|
||
public NopVaroBorder(World world) { | ||
this.world = world; | ||
} | ||
|
||
@Override | ||
public double getSize() { | ||
return 0; | ||
} | ||
|
||
@Override | ||
public void setSize(double size, long time) { | ||
// nop | ||
} | ||
|
||
@Override | ||
public Location getCenter() { | ||
return new Location(this.world, 0, 0, 0); | ||
} | ||
|
||
@Override | ||
public void setCenter(Location location) { | ||
// nop | ||
} | ||
|
||
@Override | ||
public double getDistance(Location location) { | ||
return 0; | ||
} | ||
|
||
@Override | ||
public boolean isOutside(Location location) { | ||
return false; | ||
} | ||
} |
Oops, something went wrong.