mirror of
https://github.com/BentoBoxWorld/Warps.git
synced 2024-11-10 21:09:50 +01:00
Merge remote-tracking branch 'origin/develop'
This commit is contained in:
commit
8083ce6f01
17
.github/ISSUE_TEMPLATE/bug_report.md
vendored
17
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@ -5,7 +5,7 @@ about: Create a report to help us improve
|
|||||||
---
|
---
|
||||||
|
|
||||||
**Description**
|
**Description**
|
||||||
A clear and concise description of what the bug is.
|
<!-- A clear and concise description of what the bug is. -->
|
||||||
|
|
||||||
**Steps to reproduce the behavior:**
|
**Steps to reproduce the behavior:**
|
||||||
1. Go to '...'
|
1. Go to '...'
|
||||||
@ -14,20 +14,13 @@ A clear and concise description of what the bug is.
|
|||||||
4. See error
|
4. See error
|
||||||
|
|
||||||
**Expected behavior**
|
**Expected behavior**
|
||||||
A clear and concise description of what you expected to happen.
|
<!-- A clear and concise description of what you expected to happen. -->
|
||||||
|
|
||||||
**Screenshots**
|
**Screenshots**
|
||||||
If applicable, add screenshots to help explain your problem.
|
<!-- If applicable, add screenshots to help explain your problem. -->
|
||||||
|
|
||||||
**Server Information:**
|
**Server Information:**
|
||||||
|
Do `bbox version` in the console and paste the result here:
|
||||||
[Please complete the following information:]
|
|
||||||
- Database being used (YAML, JSON, MySQL, MongoDB): []
|
|
||||||
- OS: [e.g. iOS]
|
|
||||||
- Java Version: [e.g. Java 8]
|
|
||||||
- BentoBox version: [e.g. 1.7.2.21]
|
|
||||||
- Addons installed? [Do '/bentobox version' and copy/paste from the console]
|
|
||||||
- Other plugins? [Do '/plugins' and copy/paste from the console]
|
|
||||||
|
|
||||||
**Additional context**
|
**Additional context**
|
||||||
Add any other context about the problem here.
|
<!-- Add any other context about the problem here. -->
|
||||||
|
@ -3,8 +3,7 @@ sudo: false
|
|||||||
addons:
|
addons:
|
||||||
sonarcloud:
|
sonarcloud:
|
||||||
organization: "bentobox-world"
|
organization: "bentobox-world"
|
||||||
token:
|
|
||||||
secure: $SONAR_TOKEN
|
|
||||||
jdk:
|
jdk:
|
||||||
- openjdk8
|
- openjdk8
|
||||||
- openjdk11
|
- openjdk11
|
||||||
|
2
pom.xml
2
pom.xml
@ -66,7 +66,7 @@
|
|||||||
<!-- Do not change unless you want different name for local builds. -->
|
<!-- Do not change unless you want different name for local builds. -->
|
||||||
<build.number>-LOCAL</build.number>
|
<build.number>-LOCAL</build.number>
|
||||||
<!-- This allows to change between versions. -->
|
<!-- This allows to change between versions. -->
|
||||||
<build.version>1.8.1</build.version>
|
<build.version>1.8.2</build.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<!-- Profiles will allow to automatically change build version. -->
|
<!-- Profiles will allow to automatically change build version. -->
|
||||||
|
@ -83,7 +83,7 @@ public class Warp extends Addon {
|
|||||||
// Save default config.yml
|
// Save default config.yml
|
||||||
this.saveDefaultConfig();
|
this.saveDefaultConfig();
|
||||||
// Load the plugin's config
|
// Load the plugin's config
|
||||||
if (this.loadSettings()) {
|
if (this.loadSettings() && settings.isAllowInOtherWorlds()) {
|
||||||
// Load the master warp and warps command
|
// Load the master warp and warps command
|
||||||
new WarpCommand(this);
|
new WarpCommand(this);
|
||||||
new WarpsCommand(this);
|
new WarpsCommand(this);
|
||||||
|
@ -317,7 +317,7 @@ public class WarpSignsManager {
|
|||||||
*/
|
*/
|
||||||
private void warpPlayer(@NonNull User user, @NonNull Location inFront, @NonNull UUID signOwner, @NonNull BlockFace directionFacing, boolean pvp) {
|
private void warpPlayer(@NonNull User user, @NonNull Location inFront, @NonNull UUID signOwner, @NonNull BlockFace directionFacing, boolean pvp) {
|
||||||
// convert blockface to angle
|
// convert blockface to angle
|
||||||
float yaw = blockFaceToFloat(directionFacing);
|
float yaw = Util.blockFaceToFloat(directionFacing);
|
||||||
final Location actualWarp = new Location(inFront.getWorld(), inFront.getBlockX() + 0.5D, inFront.getBlockY(),
|
final Location actualWarp = new Location(inFront.getWorld(), inFront.getBlockX() + 0.5D, inFront.getBlockY(),
|
||||||
inFront.getBlockZ() + 0.5D, yaw, 30F);
|
inFront.getBlockZ() + 0.5D, yaw, 30F);
|
||||||
user.teleport(actualWarp);
|
user.teleport(actualWarp);
|
||||||
@ -333,52 +333,6 @@ public class WarpSignsManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts block face direction to radial degrees. Returns 0 if block face
|
|
||||||
* is not radial.
|
|
||||||
*
|
|
||||||
* @param face
|
|
||||||
* @return degrees
|
|
||||||
*/
|
|
||||||
private float blockFaceToFloat(@NonNull BlockFace face) {
|
|
||||||
switch (face) {
|
|
||||||
case EAST:
|
|
||||||
return 90F;
|
|
||||||
case EAST_NORTH_EAST:
|
|
||||||
return 67.5F;
|
|
||||||
case EAST_SOUTH_EAST:
|
|
||||||
return 0F;
|
|
||||||
case NORTH:
|
|
||||||
return 0F;
|
|
||||||
case NORTH_EAST:
|
|
||||||
return 45F;
|
|
||||||
case NORTH_NORTH_EAST:
|
|
||||||
return 22.5F;
|
|
||||||
case NORTH_NORTH_WEST:
|
|
||||||
return 337.5F;
|
|
||||||
case NORTH_WEST:
|
|
||||||
return 315F;
|
|
||||||
case SOUTH:
|
|
||||||
return 180F;
|
|
||||||
case SOUTH_EAST:
|
|
||||||
return 135F;
|
|
||||||
case SOUTH_SOUTH_EAST:
|
|
||||||
return 157.5F;
|
|
||||||
case SOUTH_SOUTH_WEST:
|
|
||||||
return 202.5F;
|
|
||||||
case SOUTH_WEST:
|
|
||||||
return 225F;
|
|
||||||
case WEST:
|
|
||||||
return 270F;
|
|
||||||
case WEST_NORTH_WEST:
|
|
||||||
return 292.5F;
|
|
||||||
case WEST_SOUTH_WEST:
|
|
||||||
return 247.5F;
|
|
||||||
default:
|
|
||||||
return 0F;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Warps a user to the warp owner by owner
|
* Warps a user to the warp owner by owner
|
||||||
*
|
*
|
||||||
|
1
src/main/resources/locales/id.yml
Normal file
1
src/main/resources/locales/id.yml
Normal file
@ -0,0 +1 @@
|
|||||||
|
|
1
src/main/resources/locales/ro.yml
Normal file
1
src/main/resources/locales/ro.yml
Normal file
@ -0,0 +1 @@
|
|||||||
|
|
Loading…
Reference in New Issue
Block a user