001/* 002 * PlotSquared, a land and world management plugin for Minecraft. 003 * Copyright (C) IntellectualSites <https://intellectualsites.com> 004 * Copyright (C) IntellectualSites team and contributors 005 * 006 * This program is free software: you can redistribute it and/or modify 007 * it under the terms of the GNU General Public License as published by 008 * the Free Software Foundation, either version 3 of the License, or 009 * (at your option) any later version. 010 * 011 * This program is distributed in the hope that it will be useful, 012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 014 * GNU General Public License for more details. 015 * 016 * You should have received a copy of the GNU General Public License 017 * along with this program. If not, see <https://www.gnu.org/licenses/>. 018 */ 019package com.plotsquared.core.events; 020 021import com.google.common.collect.Sets; 022 023import java.util.EnumSet; 024import java.util.Set; 025 026/** 027 * The reason for an internal player teleport. 028 */ 029public enum TeleportCause { 030 031 COMMAND, 032 COMMAND_AREA_CREATE, 033 COMMAND_AREA_TELEPORT, 034 COMMAND_AUTO, 035 COMMAND_CLAIM, 036 COMMAND_CLEAR, 037 COMMAND_CLUSTER_TELEPORT, 038 COMMAND_DELETE, 039 COMMAND_HOME, 040 COMMAND_LIKE, 041 COMMAND_MIDDLE, 042 COMMAND_RATE, 043 COMMAND_SETUP, 044 COMMAND_TEMPLATE, 045 COMMAND_VISIT, 046 DEATH, 047 DENIED, 048 KICK, 049 LOGIN, 050 PLUGIN, 051 UNKNOWN; 052 053 /** 054 * @since 6.1.0 055 */ 056 public static final class CauseSets { 057 058 public static final Set<TeleportCause> COMMAND = Sets.immutableEnumSet(EnumSet.range( 059 TeleportCause.COMMAND, 060 TeleportCause.COMMAND_VISIT 061 )); 062 @SuppressWarnings("unused") 063 public static final Set<TeleportCause> PLUGIN = Sets.immutableEnumSet(EnumSet.range( 064 TeleportCause.DEATH, 065 TeleportCause.PLUGIN 066 )); 067 068 } 069}